
22 Dec
2016
22 Dec
'16
10:38 a.m.
what is the "default" structure if you don't specify any
similar to: display::Show a => a -> String display = show fa::(Applicative f, Num a) => f a fa = pure 1 f and a are *bounded* by Applicative and Num, so to say. No default. Or, it is typed however type is a bit broader than *
In this case it defaults f to IO and a to Int,
does it though? Prelude> let a1 = pure 1 Prelude> let a2 = pure 1 Prelude> a1 == a2 <interactive>:20:1: error: • Ambiguous type variable ‘a0’ arising from a use of ‘a1’ prevents the constraint ‘(Num a0)’ from being solved.