Type of print function to console without ghci

Is there a way to print a function or type of expression on the command line in a compiled Haskell program, just like ghci has :t , which prints a type?

+6
source share
1 answer

With a Typeable constraint (from Data.Typeable ) you can use show . typeOf show . typeOf .

+11
source

Source: https://habr.com/ru/post/946025/


All Articles