Reputation: 12361
Is there a way of printing the function or expression type to the command line in a compiled Haskell
program, much like how ghci
has :t
which prints out the type?
Upvotes: 5
Views: 694
Reputation: 38901
With a Typeable
constraint (from Data.Typeable
), you can use show . typeOf
.
Upvotes: 10