Changes between Version 9 and Version 10 of NewtypeWrappers


Ignore:
Timestamp:
Jul 16, 2013 7:38:03 AM (20 months ago)
Author:
nomeata
Comment:

Reflect current discussions.

Legend:

Unmodified
Added
Removed
Modified
  • NewtypeWrappers

    v9 v10  
    238238As to the implementation, I quite naively expect that the definition of `NT` and related function in terms of Core to be straight-forward (`newtype NT a b = a ~_R b`). The code that does the `deriving` is maybe non-trivial, as it has to build the term from available newtype axioms (where the constructor is in scope), coercions given as parameters and the application of type constructors to coercions (again, where the data constructors are in scope).  
    239239 
     240It was [http://www.haskell.org/pipermail/ghc-devs/2013-July/001667.html later argued] that the benefits over the type-class apporoach (Approach 2) do not warrant the extra syntactical complexity. 
    240241 
    241242== Type soundness ==