hnix-0.5.1: Haskell implementation of the Nix language

Safe HaskellNone
LanguageHaskell2010

Nix.Scope

Documentation

newtype Scope a Source #

Constructors

Scope 

Fields

Instances

Functor Scope Source # 

Methods

fmap :: (a -> b) -> Scope a -> Scope b #

(<$) :: a -> Scope b -> Scope a #

Foldable Scope Source # 

Methods

fold :: Monoid m => Scope m -> m #

foldMap :: Monoid m => (a -> m) -> Scope a -> m #

foldr :: (a -> b -> b) -> b -> Scope a -> b #

foldr' :: (a -> b -> b) -> b -> Scope a -> b #

foldl :: (b -> a -> b) -> b -> Scope a -> b #

foldl' :: (b -> a -> b) -> b -> Scope a -> b #

foldr1 :: (a -> a -> a) -> Scope a -> a #

foldl1 :: (a -> a -> a) -> Scope a -> a #

toList :: Scope a -> [a] #

null :: Scope a -> Bool #

length :: Scope a -> Int #

elem :: Eq a => a -> Scope a -> Bool #

maximum :: Ord a => Scope a -> a #

minimum :: Ord a => Scope a -> a #

sum :: Num a => Scope a -> a #

product :: Num a => Scope a -> a #

Traversable Scope Source # 

Methods

traverse :: Applicative f => (a -> f b) -> Scope a -> f (Scope b) #

sequenceA :: Applicative f => Scope (f a) -> f (Scope a) #

mapM :: Monad m => (a -> m b) -> Scope a -> m (Scope b) #

sequence :: Monad m => Scope (m a) -> m (Scope a) #

Show (Scope a) Source # 

Methods

showsPrec :: Int -> Scope a -> ShowS #

show :: Scope a -> String #

showList :: [Scope a] -> ShowS #

data Scopes m v Source #

Constructors

Scopes 

Fields

Instances

Show (Scopes m v) Source # 

Methods

showsPrec :: Int -> Scopes m v -> ShowS #

show :: Scopes m v -> String #

showList :: [Scopes m v] -> ShowS #

Semigroup (Scopes m v) Source # 

Methods

(<>) :: Scopes m v -> Scopes m v -> Scopes m v #

sconcat :: NonEmpty (Scopes m v) -> Scopes m v #

stimes :: Integral b => b -> Scopes m v -> Scopes m v #

Monoid (Scopes m v) Source # 

Methods

mempty :: Scopes m v #

mappend :: Scopes m v -> Scopes m v -> Scopes m v #

mconcat :: [Scopes m v] -> Scopes m v #

Has (Context m v) (Scopes m v) Source # 

Methods

hasLens :: Lens' (Context m v) (Scopes m v) Source #

type Scoped e v m = (MonadReader e m, Has e (Scopes m v)) Source #

currentScopes :: Scoped e v m => m (Scopes m v) Source #

clearScopes :: forall v m e r. Scoped e v m => m r -> m r Source #

pushScope :: forall v m e r. Scoped e v m => AttrSet v -> m r -> m r Source #

pushWeakScope :: forall v m e r. Scoped e v m => m (AttrSet v) -> m r -> m r Source #

pushScopes :: Scoped e v m => Scopes m v -> m r -> m r Source #

lookupVar :: forall e v m. (Scoped e v m, Monad m) => Text -> m (Maybe v) Source #

withScopes :: forall v m e a. Scoped e v m => Scopes m v -> m a -> m a Source #