newtype and rules

Simon Peyton-Jones simonpj at microsoft.com
Fri Feb 10 04:18:46 EST 2006


| I am curious if rules pragmas are applied before or after newtype
| desugaring? 

The matching function respects newtypes.

| basically what I want to know is if I have a newtype of an
| Int say, and make a rule acting on the newtype, will it be applied to
| any Int as well?

No, it shouldn't be.

Simon


More information about the Glasgow-haskell-users mailing list