tamarin-prover-utils- Utility library for the tamarin prover.

PortabilityGHC only
MaintainerSimon Meier <iridcode@gmail.com>
Safe HaskellNone




Extensions to the first-class labels (fclabels) package.



nthL :: Int -> [a] :-> aSource

Lens for the nth element of the list.

imageL :: Ord k => k -> Map k v :-> vSource

Lens for the element at a given position of a map.

fstL :: (a, b) :-> aSource

Lens for the first element of a tuple.

sndL :: (a, b) :-> bSource

Lens for the second element of a tuple.

module Data.Label

Labels and applicative functors

liftLA :: Applicative f => (a :-> b) -> f a :-> f bSource

Lift a label into an applicative functor.

modA :: Applicative f => (a :-> b) -> (b -> f b) -> a -> f aSource

Effectful modification of a labeled value.

Labels and Monads

askM :: MonadReader r m => (r :-> a) -> m aSource

Get part of the state from a reader.

setM :: MonadState s m => (s :-> a) -> a -> m ()Source

Set some part of the state.

getM :: MonadState s m => (s :-> a) -> m aSource

Get some part of the state.

modM :: MonadState s m => (s :-> a) -> (a -> a) -> m ()Source

Modify some part of the state.

(=:) :: MonadState s m => :-> s a -> a -> m ()

Alias for puts that reads like an assignment.