Lilac, 8 months ago Kinda. You can’t define a name, but you can get the compiler to interpret literals as a function. If you have a Num instance for (Integer -> Integer) where, fromInteger i = x -> x * i the compiler can interpret integer literals as functions like so x = 2(5) :: Integer
Kinda. You can’t define a name, but you can get the compiler to interpret literals as a function. If you have a Num instance for (Integer -> Integer) where,
fromInteger i = x -> x * i
the compiler can interpret integer literals as functions like so
x = 2(5) :: Integer