Commit 9de55417 authored by Simon Marlow's avatar Simon Marlow

Fix doc bugs (#4071)

parent f9ce05ef
......@@ -814,12 +814,12 @@ it &lt;- <replaceable>e</replaceable>
ghci> reverse []
</programlisting>
What should GHCi do? Strictly speaking, the program is ambiguous. <literal>show (reverse [])</literal>
(which is what GHCi computes here) has type <literal>Show a => a</literal> and how that displays depends
(which is what GHCi computes here) has type <literal>Show a => String</literal> and how that displays depends
on the type <literal>a</literal>. For example:
<programlisting>
ghci> (reverse []) :: String
ghci> reverse ([] :: String)
""
ghci> (reverse []) :: [Int]
ghci> reverse ([] :: [Int])
[]
</programlisting>
However, it is tiresome for the user to have to specify the type, so GHCi extends Haskell's type-defaulting
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment