Consider "Read" and "Show" constraints when defaulting
Currently, only Eq
and Ord
constraints are considered when a numeric constraint is defaulted to Int
or Float
.
This way, expressions like read "1.0" :: (Read a, Fractional a) => a
cannot be entered in the REPL without getting an error.
To fix this problem, Read
and Show
constraints should be handled the same way as Eq
and Ord
constraints are handled.