Overriding fromInteger in Haskell
问题 So I like Haskell, but am dissatisfied with the Num class. So I want to make my own typeclass hierarchic for algebraic types. The problem is, even if I import Prelude hiding Num and everything associated with it, still the only way to make the literal 1 have type t is to make t instance Num. I would love to make my own fromInteger class and leave Num out of the picture entirely, like this import Prelude hiding (everything having to do with Num) import qualified Prelude (everything having to