Feature not evaluated in the GHCI
1 answer
maxBound
is a function of the class Bounded
. By default, GHCi appears to select the instance for ()
that returns ()
. You can force it to use a different instance by adding a type signature.
let bInt :: Int; bInt = maxBound
bInt -- 9223372036854775807
let x = maxBound
x :: () -- ()
x :: Bool -- True
x :: Char -- '\1114111'
+4
source to share