Off the top of my head:
- The types may be abstract/opaque, so we may not want to expose the implementation when printing.
- And the implementation may be complicated so we should better specify what is the most important.
Otherwise it wouldn't be really pretty…
@amiloradovsky But having an optional deriver such as Haskell's `deriving Show` would be nice and wouldn't cause the problems you mention.
It may be possible to implement the derivation as a functor, without type-classes, but apparently few people care.
@otini (I read this thread to fast, sorry: you already mentioned it above.)
@otini the toplevel has access to the typing environment and the type of expressions that are handled. Those get erased at compile time.
I guess this is not a definitive answer, and the compiler could integrate some sort of deriving show.
functional.cafe is an instance for people interested in functional programming and languages.