newtyper-0.1: Extra functions for the Control.Newtype typeclass

Safe HaskellSafe-Infered

Control.Newtyper

Documentation

packM :: (Monad m, Newtype n o) => (a -> m o) -> a -> m nSource

unpackM :: (Monad m, Newtype n o) => (a -> m n) -> a -> m oSource

packF :: (Functor f, Newtype n o) => (a -> f o) -> a -> f nSource

unpackF :: (Functor f, Newtype n o) => (a -> f n) -> a -> f oSource