newtype-generics 0.4.2 → 0.5
raw patch · 2 files changed
+5/−5 lines, 2 files
Files
- Control/Newtype.hs +4/−4
- newtype-generics.cabal +1/−1
Control/Newtype.hs view
@@ -148,13 +148,13 @@ over _ f = pack . f . unpack -- | 'under' lifted into a Functor.-underF :: (Newtype n, Newtype n', o' ~ O n', o ~ O n, Functor f)- => (o -> n) -> (f n -> f n') -> (f o -> f o')+underF :: (Newtype n, Newtype n', o' ~ O n', o ~ O n, Functor f, Functor g)+ => (o -> n) -> (f n -> g n') -> (f o -> g o') underF _ f = fmap unpack . f . fmap pack -- | 'over' lifted into a Functor.-overF :: (Newtype n, Newtype n', o' ~ O n', o ~ O n, Functor f)- => (o -> n) -> (f o -> f o') -> (f n -> f n')+overF :: (Newtype n, Newtype n', o' ~ O n', o ~ O n, Functor f, Functor g)+ => (o -> n) -> (f o -> g o') -> (f n -> g n') overF _ f = fmap pack . f . fmap unpack instance Newtype All where
newtype-generics.cabal view
@@ -1,5 +1,5 @@ Name: newtype-generics-Version: 0.4.2+Version: 0.5 Synopsis: A typeclass and set of functions for working with newtypes, with generics support. Description: Per Conor McBride, the Newtype typeclass represents the packing and unpacking of a newtype, and allows you to operatate under that newtype with functions such as ala.