[Haskell-cafe] Display an inferred type during compilation
Corentin Dupont
corentin.dupont at gmail.com
Sat Apr 27 18:55:16 CEST 2013
Hi Cafe,
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).
I'm thinking of something like:
main :: IO ()
main = do
a <- someCode
displayTypeAtCompileTime a
return ()
$ ghc -c test.hs
test.hs:4:3: your type is: Foo
Thanks,
Corentin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130427/67181be5/attachment.htm>
More information about the Haskell-Cafe
mailing list