hnix-0.4.0: Haskell implementation of the Nix language

Safe HaskellSafe
LanguageHaskell2010

Nix.Atoms

Synopsis

Documentation

data NAtom Source #

Atoms are values that evaluate to themselves. This means that they appear in both the parsed AST (in the form of literals) and the evaluated form.

Constructors

NInt !Integer

An integer. The c nix implementation currently only supports integers that fit in the range of Int64.

NBool !Bool

Booleans.

NNull

Null values. There's only one of this variant.

NUri !Text

URIs, which are just string literals, but do not need quotes.

Instances

Eq NAtom Source # 

Methods

(==) :: NAtom -> NAtom -> Bool #

(/=) :: NAtom -> NAtom -> Bool #

Data NAtom Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NAtom -> c NAtom #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NAtom #

toConstr :: NAtom -> Constr #

dataTypeOf :: NAtom -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c NAtom) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NAtom) #

gmapT :: (forall b. Data b => b -> b) -> NAtom -> NAtom #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NAtom -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NAtom -> r #

gmapQ :: (forall d. Data d => d -> u) -> NAtom -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NAtom -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NAtom -> m NAtom #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NAtom -> m NAtom #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NAtom -> m NAtom #

Ord NAtom Source # 

Methods

compare :: NAtom -> NAtom -> Ordering #

(<) :: NAtom -> NAtom -> Bool #

(<=) :: NAtom -> NAtom -> Bool #

(>) :: NAtom -> NAtom -> Bool #

(>=) :: NAtom -> NAtom -> Bool #

max :: NAtom -> NAtom -> NAtom #

min :: NAtom -> NAtom -> NAtom #

Show NAtom Source # 

Methods

showsPrec :: Int -> NAtom -> ShowS #

show :: NAtom -> String #

showList :: [NAtom] -> ShowS #

Generic NAtom Source # 

Associated Types

type Rep NAtom :: * -> * #

Methods

from :: NAtom -> Rep NAtom x #

to :: Rep NAtom x -> NAtom #

type Rep NAtom Source # 

class ToAtom t where Source #

Minimal complete definition

toAtom

Methods

toAtom :: t -> NAtom Source #

class FromAtom t where Source #

Minimal complete definition

fromAtom, fromAtoms, fromAtomSet

convert :: (ToAtom prim, FromAtom t) => prim -> t Source #

Convert a primitive into something which can be made from a constant. So for example `convert 1 :: Expression`

atomToEnvString :: NAtom -> Text Source #

Conversion to environment variables for constants.