hnix-0.5.1: Haskell implementation of the Nix language

Safe HaskellNone
LanguageHaskell2010

Nix.Value

Synopsis

Documentation

data NValueF m r Source #

An NValue is the most reduced form of an NExpr after evaluation is completed. s is related to the type of errors that might occur during construction or use of a value.

Constructors

NVConstantF NAtom 
NVStrF Text (DList Text)

A string has a value and a context, which can be used to record what a string has been build from

NVPathF FilePath 
NVListF [r] 
NVSetF (AttrSet r) (AttrSet SourcePos) 
NVClosureF (Params ()) (m (NValue m) -> m (NValue m))

A function is a closed set of parameters representing the "call signature", used at application time to check the type of arguments passed to the function. Since it supports default values which may depend on other values within the final argument set, this dependency is represented as a set of pending evaluations. The arguments are finally normalized into a set which is passed to the function.

Note that 'm r' is being used here because effectively a function and its set of default arguments is "never fully evaluated". This enforces in the type that it must be re-evaluated for each call.

NVBuiltinF String (m (NValue m) -> m (NValue m))

A builtin function is itself already in normal form. Also, it may or may not choose to evaluate its argument in the production of a result.

Instances

Applicative m => ToNix Bool m (NValueNF m) Source # 

Methods

toNix :: Bool -> m (NValueNF m) Source #

Applicative m => ToNix Float m (NValueNF m) Source # 

Methods

toNix :: Float -> m (NValueNF m) Source #

Applicative m => ToNix Int m (NValueNF m) Source # 

Methods

toNix :: Int -> m (NValueNF m) Source #

Applicative m => ToNix Integer m (NValueNF m) Source # 

Methods

toNix :: Integer -> m (NValueNF m) Source #

Applicative m => ToNix () m (NValueNF m) Source # 

Methods

toNix :: () -> m (NValueNF m) Source #

Applicative m => ToNix ByteString m (NValueNF m) Source # 

Methods

toNix :: ByteString -> m (NValueNF m) Source #

Applicative m => ToNix Text m (NValueNF m) Source # 

Methods

toNix :: Text -> m (NValueNF m) Source #

Applicative m => ToNix Path m (NValueNF m) Source # 

Methods

toNix :: Path -> m (NValueNF m) Source #

Convertible e m => FromNix Bool m (NValueNF m) Source # 
Convertible e m => FromNix Float m (NValueNF m) Source # 
Convertible e m => FromNix Int m (NValueNF m) Source # 
Convertible e m => FromNix Integer m (NValueNF m) Source # 
Convertible e m => FromNix () m (NValueNF m) Source # 

Methods

fromNix :: NValueNF m -> m () Source #

fromNixMay :: NValueNF m -> m (Maybe ()) Source #

Convertible e m => FromNix ByteString m (NValueNF m) Source # 
(Convertible e m, MonadEffects m) => FromNix Text m (NValueNF m) Source # 
(Convertible e m, MonadEffects m, MonadThunk (NValue m) (NThunk m) m) => FromNix Value m (NValueNF m) Source # 
Convertible e m => FromNix Path m (NValueNF m) Source # 
Applicative m => ToValue Bool m (NValueNF m) Source # 

Methods

toValue :: Bool -> m (NValueNF m) Source #

Applicative m => ToValue Float m (NValueNF m) Source # 

Methods

toValue :: Float -> m (NValueNF m) Source #

Applicative m => ToValue Int m (NValueNF m) Source # 

Methods

toValue :: Int -> m (NValueNF m) Source #

Applicative m => ToValue Integer m (NValueNF m) Source # 

Methods

toValue :: Integer -> m (NValueNF m) Source #

Applicative m => ToValue () m (NValueNF m) Source # 

Methods

toValue :: () -> m (NValueNF m) Source #

Applicative m => ToValue ByteString m (NValueNF m) Source # 

Methods

toValue :: ByteString -> m (NValueNF m) Source #

Applicative m => ToValue Text m (NValueNF m) Source # 

Methods

toValue :: Text -> m (NValueNF m) Source #

Applicative m => ToValue Path m (NValueNF m) Source # 

Methods

toValue :: Path -> m (NValueNF m) Source #

Convertible e m => FromValue Bool m (NValueNF m) Source # 
Convertible e m => FromValue Float m (NValueNF m) Source # 
Convertible e m => FromValue Int m (NValueNF m) Source # 
Convertible e m => FromValue Integer m (NValueNF m) Source # 
Convertible e m => FromValue () m (NValueNF m) Source # 

Methods

fromValue :: NValueNF m -> m () Source #

fromValueMay :: NValueNF m -> m (Maybe ()) Source #

Convertible e m => FromValue ByteString m (NValueNF m) Source # 
(Convertible e m, MonadEffects m) => FromValue Text m (NValueNF m) Source # 
(Convertible e m, MonadEffects m) => FromValue Value m (NValueNF m) Source # 
Convertible e m => FromValue Path m (NValueNF m) Source # 
Functor (NValueF m) Source # 

Methods

fmap :: (a -> b) -> NValueF m a -> NValueF m b #

(<$) :: a -> NValueF m b -> NValueF m a #

Foldable (NValueF m) Source # 

Methods

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

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

foldr :: (a -> b -> b) -> b -> NValueF m a -> b #

foldr' :: (a -> b -> b) -> b -> NValueF m a -> b #

foldl :: (b -> a -> b) -> b -> NValueF m a -> b #

foldl' :: (b -> a -> b) -> b -> NValueF m a -> b #

foldr1 :: (a -> a -> a) -> NValueF m a -> a #

foldl1 :: (a -> a -> a) -> NValueF m a -> a #

toList :: NValueF m a -> [a] #

null :: NValueF m a -> Bool #

length :: NValueF m a -> Int #

elem :: Eq a => a -> NValueF m a -> Bool #

maximum :: Ord a => NValueF m a -> a #

minimum :: Ord a => NValueF m a -> a #

sum :: Num a => NValueF m a -> a #

product :: Num a => NValueF m a -> a #

Traversable (NValueF m) Source # 

Methods

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

sequenceA :: Applicative f => NValueF m (f a) -> f (NValueF m a) #

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

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

(Applicative m, ToNix a m (NValueNF m)) => ToNix [a] m (NValueNF m) Source # 

Methods

toNix :: [a] -> m (NValueNF m) Source #

(Convertible e m, FromValue a m (NValueNF m), Show a) => FromNix [a] m (NValueNF m) Source # 

Methods

fromNix :: NValueNF m -> m [a] Source #

fromNixMay :: NValueNF m -> m (Maybe [a]) Source #

(ToValue a m (NValueNF m), Applicative m) => ToValue [a] m (NValueNF m) Source # 

Methods

toValue :: [a] -> m (NValueNF m) Source #

(Convertible e m, FromValue a m (NValueNF m), Show a) => FromValue [a] m (NValueNF m) Source # 

Methods

fromValue :: NValueNF m -> m [a] Source #

fromValueMay :: NValueNF m -> m (Maybe [a]) Source #

Show (NValueF m (NThunk m)) Source # 

Methods

showsPrec :: Int -> NValueF m (NThunk m) -> ShowS #

show :: NValueF m (NThunk m) -> String #

showList :: [NValueF m (NThunk m)] -> ShowS #

Show (NValueF m (Fix (NValueF m))) Source # 

Methods

showsPrec :: Int -> NValueF m (Fix (NValueF m)) -> ShowS #

show :: NValueF m (Fix (NValueF m)) -> String #

showList :: [NValueF m (Fix (NValueF m))] -> ShowS #

Generic (NValueF m r) Source # 

Associated Types

type Rep (NValueF m r) :: * -> * #

Methods

from :: NValueF m r -> Rep (NValueF m r) x #

to :: Rep (NValueF m r) x -> NValueF m r #

Applicative m => ToNix (Text, DList Text) m (NValueNF m) Source # 

Methods

toNix :: (Text, DList Text) -> m (NValueNF m) Source #

Applicative m => ToNix (HashMap Text (NValueNF m), HashMap Text SourcePos) m (NValueNF m) Source # 
Applicative m => ToNix (HashMap Text (NValueNF m)) m (NValueNF m) Source # 

Methods

toNix :: HashMap Text (NValueNF m) -> m (NValueNF m) Source #

(Convertible e m, MonadEffects m) => FromNix (Text, DList Text) m (NValueNF m) Source # 
Convertible e m => FromNix (HashMap Text (NValueNF m), HashMap Text SourcePos) m (NValueNF m) Source # 
Convertible e m => FromNix (HashMap Text (NValueNF m)) m (NValueNF m) Source # 
Applicative m => ToValue (Text, DList Text) m (NValueNF m) Source # 

Methods

toValue :: (Text, DList Text) -> m (NValueNF m) Source #

Applicative m => ToValue (HashMap Text (NValueNF m), HashMap Text SourcePos) m (NValueNF m) Source # 
Applicative m => ToValue (HashMap Text (NValueNF m)) m (NValueNF m) Source # 

Methods

toValue :: HashMap Text (NValueNF m) -> m (NValueNF m) Source #

(Convertible e m, MonadEffects m) => FromValue (Text, DList Text) m (NValueNF m) Source # 
Convertible e m => FromValue (HashMap Text (NValueNF m), HashMap Text SourcePos) m (NValueNF m) Source # 
Convertible e m => FromValue (HashMap Text (NValueNF m)) m (NValueNF m) Source # 
type Rep (NValueF m r) Source # 
type Rep (NValueF m r) = D1 * (MetaData "NValueF" "Nix.Value" "hnix-0.5.1-1AEILKRXuiNL8eYeTMwPu7" False) ((:+:) * ((:+:) * (C1 * (MetaCons "NVConstantF" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * NAtom))) ((:+:) * (C1 * (MetaCons "NVStrF" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (DList Text))))) (C1 * (MetaCons "NVPathF" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * FilePath))))) ((:+:) * ((:+:) * (C1 * (MetaCons "NVListF" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [r]))) (C1 * (MetaCons "NVSetF" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (AttrSet r))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (AttrSet SourcePos)))))) ((:+:) * (C1 * (MetaCons "NVClosureF" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Params ()))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (m (NValue m) -> m (NValue m)))))) (C1 * (MetaCons "NVBuiltinF" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (m (NValue m) -> m (NValue m)))))))))

type NValueNF m = Fix (NValueF m) Source #

An NValueNF is a fully evaluated value in normal form. An 'NValue m' is a value in head normal form, where only the "top layer" has been evaluated. An action of type 'm (NValue m)' is a pending evualation that has yet to be performed. An 'NThunk m' is either a pending evaluation, or a value in head normal form. A NThunkSet is a set of mappings from keys to thunks.

data Provenance m Source #

Constructors

Provenance 

Fields

data NThunk m Source #

Constructors

NThunk 

Instances

(MonadThunk (NValue m) (NThunk m) m, ToNix a m (NValue m)) => ToNix a m (NThunk m) Source # 

Methods

toNix :: a -> m (NThunk m) Source #

(MonadThunk (NValue m) (NThunk m) m, FromNix a m (NValue m)) => FromNix a m (NThunk m) Source # 

Methods

fromNix :: NThunk m -> m a Source #

fromNixMay :: NThunk m -> m (Maybe a) Source #

(MonadThunk (NValue m) (NThunk m) m, ToValue a m (NValue m)) => ToValue a m (NThunk m) Source # 

Methods

toValue :: a -> m (NThunk m) Source #

(MonadThunk (NValue m) (NThunk m) m, FromValue a m (NValue m)) => FromValue a m (NThunk m) Source # 

Methods

fromValue :: NThunk m -> m a Source #

fromValueMay :: NThunk m -> m (Maybe a) Source #

Show (NThunk m) Source # 

Methods

showsPrec :: Int -> NThunk m -> ShowS #

show :: NThunk m -> String #

showList :: [NThunk m] -> ShowS #

MonadThunk (NValue m) (NThunk m) m => ToNix (NThunk m) m (NValue m) Source # 

Methods

toNix :: NThunk m -> m (NValue m) Source #

MonadThunk (NValue m) (NThunk m) m => FromNix (NThunk m) m (NValue m) Source # 

Methods

fromNix :: NValue m -> m (NThunk m) Source #

fromNixMay :: NValue m -> m (Maybe (NThunk m)) Source #

Applicative m => ToValue [NThunk m] m (NValue m) Source # 

Methods

toValue :: [NThunk m] -> m (NValue m) Source #

Convertible e m => FromValue [NThunk m] m (NValue m) Source # 

Methods

fromValue :: NValue m -> m [NThunk m] Source #

fromValueMay :: NValue m -> m (Maybe [NThunk m]) Source #

(Convertible e m, MonadThunk (NValue m) (NThunk m) m) => FromValue (NThunk m) m (NValue m) Source # 

Methods

fromValue :: NValue m -> m (NThunk m) Source #

fromValueMay :: NValue m -> m (Maybe (NThunk m)) Source #

Show (NValueF m (NThunk m)) Source # 

Methods

showsPrec :: Int -> NValueF m (NThunk m) -> ShowS #

show :: NValueF m (NThunk m) -> String #

showList :: [NValueF m (NThunk m)] -> ShowS #

Applicative m => ToNix (HashMap Text (NThunk m), HashMap Text SourcePos) m (NValue m) Source # 
Convertible e m => FromNix (HashMap Text (NThunk m), HashMap Text SourcePos) m (NValue m) Source # 
Applicative m => ToValue (HashMap Text (NThunk m), HashMap Text SourcePos) m (NValue m) Source # 
Applicative m => ToValue (HashMap Text (NThunk m)) m (NValue m) Source # 

Methods

toValue :: HashMap Text (NThunk m) -> m (NValue m) Source #

Convertible e m => FromValue (HashMap Text (NThunk m), HashMap Text SourcePos) m (NValue m) Source # 
Convertible e m => FromValue (HashMap Text (NThunk m)) m (NValue m) Source # 
Monad m => MonadReader (Context (Lazy m) (NThunk (Lazy m))) (Lazy m) # 

Methods

ask :: Lazy m (Context (Lazy m) (NThunk (Lazy m))) #

local :: (Context (Lazy m) (NThunk (Lazy m)) -> Context (Lazy m) (NThunk (Lazy m))) -> Lazy m a -> Lazy m a #

reader :: (Context (Lazy m) (NThunk (Lazy m)) -> a) -> Lazy m a #

data NValue m Source #

Constructors

NValue 

Instances

Applicative m => ToNix Bool m (NValue m) Source # 

Methods

toNix :: Bool -> m (NValue m) Source #

Applicative m => ToNix Float m (NValue m) Source # 

Methods

toNix :: Float -> m (NValue m) Source #

Applicative m => ToNix Int m (NValue m) Source # 

Methods

toNix :: Int -> m (NValue m) Source #

Applicative m => ToNix Integer m (NValue m) Source # 

Methods

toNix :: Integer -> m (NValue m) Source #

Applicative m => ToNix () m (NValue m) Source # 

Methods

toNix :: () -> m (NValue m) Source #

Applicative m => ToNix ByteString m (NValue m) Source # 

Methods

toNix :: ByteString -> m (NValue m) Source #

Applicative m => ToNix Text m (NValue m) Source # 

Methods

toNix :: Text -> m (NValue m) Source #

(Convertible e m, MonadThunk (NValue m) (NThunk m) m) => ToNix Value m (NValue m) Source # 

Methods

toNix :: Value -> m (NValue m) Source #

Applicative m => ToNix Path m (NValue m) Source # 

Methods

toNix :: Path -> m (NValue m) Source #

Convertible e m => FromNix Bool m (NValue m) Source # 

Methods

fromNix :: NValue m -> m Bool Source #

fromNixMay :: NValue m -> m (Maybe Bool) Source #

Convertible e m => FromNix Float m (NValue m) Source # 
Convertible e m => FromNix Int m (NValue m) Source # 

Methods

fromNix :: NValue m -> m Int Source #

fromNixMay :: NValue m -> m (Maybe Int) Source #

Convertible e m => FromNix Integer m (NValue m) Source # 
Convertible e m => FromNix () m (NValue m) Source # 

Methods

fromNix :: NValue m -> m () Source #

fromNixMay :: NValue m -> m (Maybe ()) Source #

Convertible e m => FromNix ByteString m (NValue m) Source # 
(Convertible e m, MonadEffects m, MonadThunk (NValue m) (NThunk m) m) => FromNix Text m (NValue m) Source # 

Methods

fromNix :: NValue m -> m Text Source #

fromNixMay :: NValue m -> m (Maybe Text) Source #

(Convertible e m, MonadEffects m, MonadThunk (NValue m) (NThunk m) m) => FromNix Value m (NValue m) Source # 
(Convertible e m, MonadThunk (NValue m) (NThunk m) m) => FromNix Path m (NValue m) Source # 

Methods

fromNix :: NValue m -> m Path Source #

fromNixMay :: NValue m -> m (Maybe Path) Source #

Applicative m => ToValue Bool m (NValue m) Source # 

Methods

toValue :: Bool -> m (NValue m) Source #

Applicative m => ToValue Float m (NValue m) Source # 

Methods

toValue :: Float -> m (NValue m) Source #

Applicative m => ToValue Int m (NValue m) Source # 

Methods

toValue :: Int -> m (NValue m) Source #

Applicative m => ToValue Integer m (NValue m) Source # 

Methods

toValue :: Integer -> m (NValue m) Source #

Applicative m => ToValue () m (NValue m) Source # 

Methods

toValue :: () -> m (NValue m) Source #

Applicative m => ToValue ByteString m (NValue m) Source # 

Methods

toValue :: ByteString -> m (NValue m) Source #

Applicative m => ToValue Text m (NValue m) Source # 

Methods

toValue :: Text -> m (NValue m) Source #

(Convertible e m, MonadThunk (NValue m) (NThunk m) m) => ToValue Value m (NValue m) Source # 

Methods

toValue :: Value -> m (NValue m) Source #

MonadThunk (NValue m) (NThunk m) m => ToValue SourcePos m (NValue m) Source # 

Methods

toValue :: SourcePos -> m (NValue m) Source #

Applicative m => ToValue Path m (NValue m) Source # 

Methods

toValue :: Path -> m (NValue m) Source #

Convertible e m => FromValue Bool m (NValue m) Source # 
Convertible e m => FromValue Float m (NValue m) Source # 
Convertible e m => FromValue Int m (NValue m) Source # 
Convertible e m => FromValue Integer m (NValue m) Source # 
Convertible e m => FromValue () m (NValue m) Source # 

Methods

fromValue :: NValue m -> m () Source #

fromValueMay :: NValue m -> m (Maybe ()) Source #

Convertible e m => FromValue ByteString m (NValue m) Source # 
(Convertible e m, MonadThunk (NValue m) (NThunk m) m, MonadEffects m) => FromValue Text m (NValue m) Source # 
(Convertible e m, MonadThunk (NValue m) (NThunk m) m) => FromValue Path m (NValue m) Source # 
Eq (NValue m) Source # 

Methods

(==) :: NValue m -> NValue m -> Bool #

(/=) :: NValue m -> NValue m -> Bool #

Ord (NValue m) Source # 

Methods

compare :: NValue m -> NValue m -> Ordering #

(<) :: NValue m -> NValue m -> Bool #

(<=) :: NValue m -> NValue m -> Bool #

(>) :: NValue m -> NValue m -> Bool #

(>=) :: NValue m -> NValue m -> Bool #

max :: NValue m -> NValue m -> NValue m #

min :: NValue m -> NValue m -> NValue m #

Show (NValue m) Source # 

Methods

showsPrec :: Int -> NValue m -> ShowS #

show :: NValue m -> String #

showList :: [NValue m] -> ShowS #

(Convertible e m, MonadThunk (NValue m) (NThunk m) m, ToNix a m (NValue m)) => ToNix [a] m (NValue m) Source # 

Methods

toNix :: [a] -> m (NValue m) Source #

MonadThunk (NValue m) (NThunk m) m => ToNix (NThunk m) m (NValue m) Source # 

Methods

toNix :: NThunk m -> m (NValue m) Source #

(Convertible e m, MonadThunk (NValue m) (NThunk m) m, FromNix a m (NValue m)) => FromNix [a] m (NValue m) Source # 

Methods

fromNix :: NValue m -> m [a] Source #

fromNixMay :: NValue m -> m (Maybe [a]) Source #

MonadThunk (NValue m) (NThunk m) m => FromNix (NThunk m) m (NValue m) Source # 

Methods

fromNix :: NValue m -> m (NThunk m) Source #

fromNixMay :: NValue m -> m (Maybe (NThunk m)) Source #

Applicative m => ToValue [NThunk m] m (NValue m) Source # 

Methods

toValue :: [NThunk m] -> m (NValue m) Source #

Convertible e m => FromValue [NThunk m] m (NValue m) Source # 

Methods

fromValue :: NValue m -> m [NThunk m] Source #

fromValueMay :: NValue m -> m (Maybe [NThunk m]) Source #

(Convertible e m, MonadThunk (NValue m) (NThunk m) m) => FromValue (NThunk m) m (NValue m) Source # 

Methods

fromValue :: NValue m -> m (NThunk m) Source #

fromValueMay :: NValue m -> m (Maybe (NThunk m)) Source #

Applicative m => ToNix (Text, DList Text) m (NValue m) Source # 

Methods

toNix :: (Text, DList Text) -> m (NValue m) Source #

Applicative m => ToNix (HashMap Text (NThunk m), HashMap Text SourcePos) m (NValue m) Source # 
(Convertible e m, MonadThunk (NValue m) (NThunk m) m, ToNix a m (NValue m)) => ToNix (HashMap Text a) m (NValue m) Source # 

Methods

toNix :: HashMap Text a -> m (NValue m) Source #

(Convertible e m, MonadEffects m, MonadThunk (NValue m) (NThunk m) m) => FromNix (Text, DList Text) m (NValue m) Source # 
Convertible e m => FromNix (HashMap Text (NThunk m), HashMap Text SourcePos) m (NValue m) Source # 
(Convertible e m, MonadThunk (NValue m) (NThunk m) m, FromNix a m (NValue m)) => FromNix (HashMap Text a) m (NValue m) Source # 

Methods

fromNix :: NValue m -> m (HashMap Text a) Source #

fromNixMay :: NValue m -> m (Maybe (HashMap Text a)) Source #

Applicative m => ToValue (Text, DList Text) m (NValue m) Source # 

Methods

toValue :: (Text, DList Text) -> m (NValue m) Source #

Applicative m => ToValue (HashMap Text (NThunk m), HashMap Text SourcePos) m (NValue m) Source # 
Applicative m => ToValue (HashMap Text (NThunk m)) m (NValue m) Source # 

Methods

toValue :: HashMap Text (NThunk m) -> m (NValue m) Source #

(Convertible e m, MonadThunk (NValue m) (NThunk m) m, MonadEffects m) => FromValue (Text, DList Text) m (NValue m) Source # 
Convertible e m => FromValue (HashMap Text (NThunk m), HashMap Text SourcePos) m (NValue m) Source # 
Convertible e m => FromValue (HashMap Text (NThunk m)) m (NValue m) Source # 

pattern NVConstant :: forall (m :: * -> *). NAtom -> NValue m Source #

pattern NVStr :: forall (m :: * -> *). Text -> DList Text -> NValue m Source #

pattern NVPath :: forall (m :: * -> *). FilePath -> NValue m Source #

pattern NVList :: forall (m :: * -> *). [NThunk m] -> NValue m Source #

pattern NVSet :: forall (m :: * -> *). AttrSet (NThunk m) -> AttrSet SourcePos -> NValue m Source #

pattern NVClosure :: forall (m :: * -> *). Params () -> (m (NValue m) -> m (NValue m)) -> NValue m Source #

nvClosure :: Params () -> (m (NValue m) -> m (NValue m)) -> NValue m Source #

nvClosureP :: Provenance m -> Params () -> (m (NValue m) -> m (NValue m)) -> NValue m Source #

pattern NVBuiltin :: forall (m :: * -> *). String -> (m (NValue m) -> m (NValue m)) -> NValue m Source #

nvBuiltin :: String -> (m (NValue m) -> m (NValue m)) -> NValue m Source #

nvBuiltinP :: Provenance m -> String -> (m (NValue m) -> m (NValue m)) -> NValue m Source #

checkComparable :: (Framed e m, Typeable m) => NValue m -> NValue m -> m () Source #

builtin :: Monad m => String -> (m (NValue m) -> m (NValue m)) -> m (NValue m) Source #

builtin2 :: Monad m => String -> (m (NValue m) -> m (NValue m) -> m (NValue m)) -> m (NValue m) Source #

builtin3 :: Monad m => String -> (m (NValue m) -> m (NValue m) -> m (NValue m) -> m (NValue m)) -> m (NValue m) Source #

thunkEq :: MonadThunk (NValue m) (NThunk m) m => NThunk m -> NThunk m -> m Bool Source #

alignEqM :: (Align f, Traversable f, Monad m) => (a -> b -> m Bool) -> f a -> f b -> m Bool Source #

Checks whether two containers are equal, using the given item equality predicate. If there are any item slots that don't match between the two containers, the result will be False.

valueEq :: MonadThunk (NValue m) (NThunk m) m => NValue m -> NValue m -> m Bool Source #

_NVBuiltinF :: Applicative f => ((String, m (NValue m) -> m (NValue m)) -> f (String, m (NValue m) -> m (NValue m))) -> NValueF m r -> f (NValueF m r) Source #

_NVClosureF :: Applicative f => ((Params (), m (NValue m) -> m (NValue m)) -> f (Params (), m (NValue m) -> m (NValue m))) -> NValueF m r -> f (NValueF m r) Source #

_NVListF :: Applicative f => ([r] -> f [r]) -> NValueF m r -> f (NValueF m r) Source #

_NVPathF :: Applicative f => (FilePath -> f FilePath) -> NValueF m r -> f (NValueF m r) Source #

_NVStrF :: Applicative f => ((Text, DList Text) -> f (Text, DList Text)) -> NValueF m r -> f (NValueF m r) Source #

_NVConstantF :: Applicative f => (NAtom -> f NAtom) -> NValueF m r -> f (NValueF m r) Source #

lexicalScope :: Functor f => (Scopes m (NThunk m) -> f (Scopes m (NThunk m))) -> Provenance m -> f (Provenance m) Source #

baseThunk :: Functor f => (Thunk m (NValue m) -> f (Thunk m (NValue m))) -> NThunk m -> f (NThunk m) Source #

thunkProvenance :: Functor f => ([Provenance m] -> f [Provenance m]) -> NThunk m -> f (NThunk m) Source #

baseValue :: Functor f => (NValueF m (NThunk m) -> f (NValueF m (NThunk m))) -> NValue m -> f (NValue m) Source #

valueProvenance :: Functor f => ([Provenance m] -> f [Provenance m]) -> NValue m -> f (NValue m) Source #

alterF :: (Eq k, Hashable k, Functor f) => (Maybe v -> f (Maybe v)) -> k -> HashMap k v -> f (HashMap k v) Source #