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

Copyright(c) 2011 Simon Meier
LicenseGPL v3 (see LICENSE)
MaintainerSimon Meier <iridcode@gmail.com>
PortabilityGHC only
Safe HaskellNone
LanguageHaskell98

Extension.Data.Label

Contents

Description

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

Synopsis

Documentation

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

Lens for the nth element of the list.

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

Lens for the first element of a tuple.

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

Lens for the second element of a tuple.

module Data.Label

Labels and applicative functors

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

Effectful modification of a labeled value.

Labels and Monads

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

Get part of the state from a reader.

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

Set some part of the state.

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

Get some part of the state.

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

Modify some part of the state.

(=:) :: MonadState f m => Lens (->) f o -> o -> m () infixr 2 #

Alias for puts that reads like an assignment.