How does GHCi show types?
Is there a magic function (showType :: a -> String) that does that? Or
is this feature buried somewhere deep in the compiler?
Can I show, compare and reason about types in a Haskell program?
This would be cool:
```haskell
test = do
let len = sum . map (const 1)
when (isInfixOf "Integer" (showType len)) $ putStrLn "restrictive type
inferred; maybe try turning off monomorphism restriction"
```
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners