3 ms·
In the absence of some kind of module or object on its left hand side, return has a polymorphic type. e.g. return 'c' :: Monad m => m Char You can actually s
by dllthomas 10y ago
In the absence of some kind of module or object on its left hand side, return has a polymorphic type.
e.g.
return 'c' :: Monad m => m Char
You can actually sort of think of this as a function from typeclass dictionary to value, except the compiler will pass that dictionary itself once it's inferred what it should be (and will then inline/optimize it away, where it can).