maam-0.3.0.0: Monadic Abstracting Abstract Machines (MAAM) built on Galois Transformers

Safe HaskellNone
LanguageHaskell2010

FP.Prelude.Lens

Documentation

newtype Lens a b Source

Constructors

Lens 

Fields

runLens :: a -> (b, b -> a)
 

data Prism a b Source

Constructors

Prism 

Fields

construct :: b -> a
 
view :: a -> Maybe b
 

class Alter t where Source

Methods

alter :: t a b -> (b -> b) -> a -> a Source

class AlterM t where Source

Methods

alterM :: Monad m => t a b -> (b -> m b) -> a -> m a Source

Instances

update :: Alter t => t a b -> b -> a -> a Source

updateM :: (AlterM t, Monad m) => t a b -> m b -> a -> m a Source

lens :: (a -> b) -> (a -> b -> a) -> Lens a b Source

isoLens :: (a -> b) -> (b -> a) -> Lens a b Source

access :: Lens a b -> a -> b Source

prism :: (b -> a) -> (a -> Maybe b) -> Prism a b Source

isoPrism :: (b -> a) -> (a -> b) -> Prism a b Source

unsafeView :: Prism a b -> a -> b Source

shape :: Prism a b -> a -> 𝔹 Source

leftL :: Prism (a b) a Source

rightR :: Prism (a b) b Source

fstL :: Lens (a, b) a Source

sndL :: Lens (a, b) b Source