[Haskell-cafe] Re: Monad instance for partially applied type constructor?

Stefan Holdermans stefan at vectorfabrics.com
Thu Sep 30 01:08:30 EDT 2010


Ryan Ingram wrote:

>>> Haskell doesn't have true type functions; what you are really saying
>>> is
>>> instance Monad (\v -> Vect k (Monomial v))

Daniel Fischer wrote:

> I think there was a theoretical reason why that isn't allowed (making type 
> inference undecidable? I don't remember, I don't recall ...).

Indeed: type inference in the presence of type-level lambdas requires higher-order unification, which is undecidable [1].



[1] Gérard P. Huet: The Undecidability of Unification in Third Order Logic Information and Control 22(3): 257-267 (1973)

More information about the Haskell-Cafe mailing list