Portability | ghc |
---|---|
Stability | beta |
Maintainer | Neil Sculthorpe <neil@ittc.ku.edu> |
Safe Haskell | Safe-Infered |
- class Injection a b where
- injectM :: (Monad m, Injection a a') => a -> m a'
- retractM :: (MonadPlus m, Injection a a') => a' -> m a
- injectT :: (Monad m, Injection a a') => Translate c m a a'
- retractT :: (MonadPlus m, Injection a a') => Translate c m a' a
- extractT :: (Monad m, Injection a a') => Translate c m a' b -> Translate c m a b
- promoteT :: (MonadPlus m, Injection a a') => Translate c m a b -> Translate c m a' b
- extractR :: (MonadPlus m, Injection a a') => Rewrite c m a' -> Rewrite c m a
- promoteR :: (MonadPlus m, Injection a a') => Rewrite c m a -> Rewrite c m a'
- injectL :: (MonadPlus m, Injection a a') => Lens c m a a'
- retractL :: (MonadPlus m, Injection a a') => Lens c m a' a
Injection Class
class Injection a b whereSource
A class of injective functions from a
to b
, and their retractions.
The following law is expected to hold:
retract (inject a) == Just a