Legend:

In summary: The programmer expects zero-cost conversions between a newtypes ''N'' and the type ''T'' it is based on. We want to allow the programmer to have zero-cost conversions between ''C N'' and ''C T''. Requirements:

47

In summary: The programmer expects zero-cost conversions between a newtype ''N'' and the type ''T'' it is based on. We want to allow the programmer to have zero-cost conversions between ''C N'' and ''C T''. Requirements:

48

48

* It should be sound, i.e. have an implementation in Core with existing coercions, without new coercions or `unsafeCoerce`.

49

49

* It should respect module boundaries, i.e. not allow the user to create a function which he could not write using plain Haskell (and non-zero cost).