
7 Mar
2016
7 Mar
'16
1:06 p.m.
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" ```