summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorAlex Dixon <alex@vinder>2023-04-06 15:14:30 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-04-07 18:27:45 -0400
commit5193c2b00194a4f536f0c31fe48ef4648b55a416 (patch)
tree29d30996993087de3c20db2b6bbe7e9810196cc3 /libraries
parentcbbfb283dc58f6d582638ee60a96dc5c4b8acc4a (diff)
downloadhaskell-5193c2b00194a4f536f0c31fe48ef4648b55a416.tar.gz
Remove trailing whitespace from ($) commentary
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/GHC/Base.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs
index f5b0db645a..7302bc5642 100644
--- a/libraries/base/GHC/Base.hs
+++ b/libraries/base/GHC/Base.hs
@@ -1606,8 +1606,8 @@ flip f x y = f y x
-- (\x -> undefined x) `seq` () and thus would just evaluate to (), but now
-- it is equivalent to undefined `seq` () which diverges.
-{- | @($)@ is the __function application__ operator.
-
+{- | @($)@ is the __function application__ operator.
+
Applying @($)@ to a function @f@ and an argument @x@ gives the same result as applying @f@ to @x@ directly. The definition is akin to this:
@
@@ -1649,7 +1649,7 @@ we can deploy the function application operator:
@
-- | Sum numbers in a string: strSum "100 5 -7" == 98
strSum :: 'String' -> 'Int'
-strSum s = 'sum' '$' 'Data.Maybe.mapMaybe' 'Text.Read.readMaybe' '$' 'words' s
+strSum s = 'sum' '$' 'Data.Maybe.mapMaybe' 'Text.Read.readMaybe' '$' 'words' s
@
@($)@ is also used as a section (a partially applied operator), in order to indicate that we wish to apply some yet-unspecified function to a given value. For example, to apply the argument @5@ to a list of functions: