hnix-0.10.1: Haskell implementation of the Nix language
Safe HaskellNone
LanguageHaskell2010

Nix.Scope

Documentation

newtype Scope a Source #

Constructors

Scope 

Fields

Instances

Instances details
Functor Scope Source # 
Instance details

Defined in Nix.Scope

Methods

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

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

Foldable Scope Source # 
Instance details

Defined in Nix.Scope

Methods

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

foldMap :: Monoid m => (a -> m) -> Scope a -> 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 # 
Instance details

Defined in Nix.Scope

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) #

Eq a => Eq (Scope a) Source # 
Instance details

Defined in Nix.Scope

Methods

(==) :: Scope a -> Scope a -> Bool #

(/=) :: Scope a -> Scope a -> Bool #

Show (Scope a) Source # 
Instance details

Defined in Nix.Scope

Methods

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

show :: Scope a -> String #

showList :: [Scope a] -> ShowS #

data Scopes m a Source #

Constructors

Scopes 

Fields

Instances

Instances details
Show (Scopes m a) Source # 
Instance details

Defined in Nix.Scope

Methods

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

show :: Scopes m a -> String #

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

Semigroup (Scopes m a) Source # 
Instance details

Defined in Nix.Scope

Methods

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

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

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

Monoid (Scopes m a) Source # 
Instance details

Defined in Nix.Scope

Methods

mempty :: Scopes m a #

mappend :: Scopes m a -> Scopes m a -> Scopes m a #

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

Has (Context m t) (Scopes m t) Source # 
Instance details

Defined in Nix.Context

Methods

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

emptyScopes :: forall m a. Scopes m a Source #

class Scoped a m | m -> a where Source #

Methods

currentScopes :: m (Scopes m a) Source #

clearScopes :: m r -> m r Source #

pushScopes :: Scopes m a -> m r -> m r Source #

lookupVar :: Text -> m (Maybe a) Source #

Instances

Instances details
MonadReader (Context m (StdValue m)) m => Scoped (StdValue m) m Source # 
Instance details

Defined in Nix.Standard

Methods

currentScopes :: m (Scopes m (StdValue m)) Source #

clearScopes :: m r -> m r Source #

pushScopes :: Scopes m (StdValue m) -> m r -> m r Source #

lookupVar :: Text -> m (Maybe (StdValue m)) Source #

Scoped (Symbolic (Lint s)) (Lint s) Source # 
Instance details

Defined in Nix.Lint

Methods

currentScopes :: Lint s (Scopes (Lint s) (Symbolic (Lint s))) Source #

clearScopes :: Lint s r -> Lint s r Source #

pushScopes :: Scopes (Lint s) (Symbolic (Lint s)) -> Lint s r -> Lint s r Source #

lookupVar :: Text -> Lint s (Maybe (Symbolic (Lint s))) Source #

currentScopesReader :: forall m a e. (MonadReader e m, Has e (Scopes m a)) => m (Scopes m a) Source #

clearScopesReader :: forall m a e r. (MonadReader e m, Has e (Scopes m a)) => m r -> m r Source #

pushScope :: Scoped a m => AttrSet a -> m r -> m r Source #

pushWeakScope :: (Functor m, Scoped a m) => m (AttrSet a) -> m r -> m r Source #

pushScopesReader :: (MonadReader e m, Has e (Scopes m a)) => Scopes m a -> m r -> m r Source #

lookupVarReader :: forall m a e. (MonadReader e m, Has e (Scopes m a)) => Text -> m (Maybe a) Source #

withScopes :: Scoped a m => Scopes m a -> m r -> m r Source #