Re: [Haskell-cafe] Functor0?

2012-01-15 Thread Tony Morris
On 01/16/2012 03:26 PM, Evan Laforge wrote: > Often when I define some type that wraps something else, I find myself writing > a function like the following: > > newtype Thing = Thing X > liftThing f (Thing x) = Thing (f x) > > It's like a Functor, but I can't make it an instance because Functor >

[Haskell-cafe] Functor0?

2012-01-15 Thread Evan Laforge
Often when I define some type that wraps something else, I find myself writing a function like the following: newtype Thing = Thing X liftThing f (Thing x) = Thing (f x) It's like a Functor, but I can't make it an instance because Functor requires that the type be parametric. So I've been using