[Haskell-beginners] Showing Types

Alex Rozenshteyn rpglover64 at gmail.com
Tue Mar 8 15:09:21 UTC 2016


> But it works on concrete types, not functions.

Isn't the problem type variables, not functions?

Prelude Data.Typeable> :set -XScopedTypeVariables
Prelude Data.Typeable> let fun x = case x of {Just (i::Int) -> i + 1;
Nothing -> 0}
Prelude Data.Typeable> :t fun
fun :: Maybe Int -> Int
Prelude Data.Typeable> typeOf fun
Maybe Int -> Int
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160308/09175447/attachment.html>


More information about the Beginners mailing list