
Somebody claiming to be Simon Peyton-Jones wrote:
I'd like to propose a way to "promote" newtypes over their enclosing type. Here's the writeup http://hackage.haskell.org/trac/ghc/wiki/NewtypeWrappers
The high-level idea, I love. I always wondered about `map MkAge blah`.
Any comments? Below is the problem statement, taken from the above page.
-1 to the unsoundness, but as you say, this is an existing problem. Also, instead of: newtype wrap somefun :: [Int] -> [Age] foo = somefun [12,14] Maybe: foo = ([12, 14] :: newtype wrap [Age]) I don't know how feasible this syntax is, but I like it a lot better, and it makes it more clear (to me) that this is purely type-level syntax. -- Stephen Paul Weber, @singpolyma See http://singpolyma.net for how I prefer to be contacted edition right joseph