[Haskell-cafe] Transparent identity instances

wren ng thornton wren at freegeek.org
Mon Nov 29 01:57:13 CET 2010

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,

More information about the Haskell-Cafe mailing list