[Haskell-cafe] Selda: confused about type signtures
Marc Busqué
marc at lamarciana.com
Fri Apr 20 19:20:48 UTC 2018
On Fri, 20 Apr 2018, Brandon Allbery wrote:
> The more precise answer to your question is that an explicit type signature is taken as exact. If the type needed is some (Ctx a => a), as here,
> but your type signature just says a, you will get a type error exactly as you did.
> "a" there does not mean "figure out a type for me". It means *any type at all*. Including Void, (), Int, etc., which one would not expect to work
> there.
Thanks! That was an illuminating answer :)
Marc Busqué
http://waiting-for-dev.github.io/about/
More information about the Haskell-Cafe
mailing list