
27 Apr
2013
27 Apr
'13
1:03 p.m.
On Sat, Apr 27, 2013 at 12:55 PM, Corentin Dupont
can I ask the compiler to display the type of an inferred value during compile time? It would be great if I can output a string during compilation with the type. A little bit like running :type in GHCi, but without GHCi... Because running GHCi is sometime painful (I have to clean my code first).
You could try floating a value to the top level; then I believe -Wall will make ghc print out the inferred type since you didn't give a type signature. -- gwern http://www.gwern.net