On 11/28/10 9:59 AM, Jafet wrote:
But GHC does not accept type synonym instances unless they are fully applied.
That's precisely the problem, and why a newtype is used. More than GHC implementation details, there's the deeper problem that allowing general type-level functions causes decidability problems in type checking/inference. Using a newtype with its explicit wrapping and unwrapping solves the problem of inference by, essentially, adding type annotations. Similar tricks are involved in making recursive types work.
-- Live well, ~wren _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe