[Haskell-cafe] Non polymorphic numerals option -- avoiding type classes

koomi koomi at hackerspace-bamberg.de
Wed Dec 26 20:07:16 CET 2012


You should note that GHCi uses extended defaulting rules as explained in
[1].
This means that a literal like 5 will only be of type Num a => a in GHCi
while in a normal Haskell program it will default to some concrete type
(Integer if there are no other constraints). Also, if you define x = 5
in a .hs file and load the file in GHCi, x will have type Integer.

In my short search I could not find out how to reverse this behavior,
:unset -XExtendedDefaultRules does not seem to work.




More information about the Haskell-Cafe mailing list