Safe Haskell | None |
---|---|
Language | Haskell2010 |
A bunch of shorthands for making nix expressions.
Functions with an F
suffix return a more general type without the outer
Fix
wrapper.
Synopsis
- mkInt :: Integer -> NExpr
- mkIntF :: Integer -> NExprF a
- mkFloat :: Float -> NExpr
- mkFloatF :: Float -> NExprF a
- mkStr :: Text -> NExpr
- mkIndentedStr :: Int -> Text -> NExpr
- mkPath :: Bool -> FilePath -> NExpr
- mkPathF :: Bool -> FilePath -> NExprF a
- mkEnvPath :: FilePath -> NExpr
- mkEnvPathF :: FilePath -> NExprF a
- mkRelPath :: FilePath -> NExpr
- mkRelPathF :: FilePath -> NExprF a
- mkSym :: Text -> NExpr
- mkSymF :: Text -> NExprF a
- mkSynHole :: Text -> NExpr
- mkSynHoleF :: Text -> NExprF a
- mkSelector :: Text -> NAttrPath NExpr
- mkBool :: Bool -> NExpr
- mkBoolF :: Bool -> NExprF a
- mkNull :: NExpr
- mkNullF :: NExprF a
- mkOper :: NUnaryOp -> NExpr -> NExpr
- mkOper2 :: NBinaryOp -> NExpr -> NExpr -> NExpr
- mkParamset :: [(Text, Maybe NExpr)] -> Bool -> Params NExpr
- mkRecSet :: [Binding NExpr] -> NExpr
- mkNonRecSet :: [Binding NExpr] -> NExpr
- mkLets :: [Binding NExpr] -> NExpr -> NExpr
- mkList :: [NExpr] -> NExpr
- mkWith :: NExpr -> NExpr -> NExpr
- mkAssert :: NExpr -> NExpr -> NExpr
- mkIf :: NExpr -> NExpr -> NExpr -> NExpr
- mkFunction :: Params NExpr -> NExpr -> NExpr
- inherit :: [NKeyName e] -> SourcePos -> Binding e
- inheritFrom :: e -> [NKeyName e] -> SourcePos -> Binding e
- bindTo :: Text -> NExpr -> Binding NExpr
- ($=) :: Text -> NExpr -> Binding NExpr
- appendBindings :: [Binding NExpr] -> NExpr -> NExpr
- modifyFunctionBody :: (NExpr -> NExpr) -> NExpr -> NExpr
- letsE :: [(Text, NExpr)] -> NExpr -> NExpr
- letE :: Text -> NExpr -> NExpr -> NExpr
- attrsE :: [(Text, NExpr)] -> NExpr
- recAttrsE :: [(Text, NExpr)] -> NExpr
- mkNot :: NExpr -> NExpr
- mkBinop :: NBinaryOp -> NExpr -> NExpr -> NExpr
- ($==) :: NExpr -> NExpr -> NExpr
- ($!=) :: NExpr -> NExpr -> NExpr
- ($<) :: NExpr -> NExpr -> NExpr
- ($<=) :: NExpr -> NExpr -> NExpr
- ($>) :: NExpr -> NExpr -> NExpr
- ($>=) :: NExpr -> NExpr -> NExpr
- ($&&) :: NExpr -> NExpr -> NExpr
- ($||) :: NExpr -> NExpr -> NExpr
- ($->) :: NExpr -> NExpr -> NExpr
- ($//) :: NExpr -> NExpr -> NExpr
- ($+) :: NExpr -> NExpr -> NExpr
- ($-) :: NExpr -> NExpr -> NExpr
- ($*) :: NExpr -> NExpr -> NExpr
- ($/) :: NExpr -> NExpr -> NExpr
- ($++) :: NExpr -> NExpr -> NExpr
- (@@) :: NExpr -> NExpr -> NExpr
- (==>) :: Params NExpr -> NExpr -> NExpr
- (@.) :: NExpr -> Text -> NExpr
Documentation
mkEnvPath :: FilePath -> NExpr Source #
Make a path expression which pulls from the NIX_PATH env variable.
mkEnvPathF :: FilePath -> NExprF a Source #
mkRelPathF :: FilePath -> NExprF a Source #
mkSynHoleF :: Text -> NExprF a Source #
inherit :: [NKeyName e] -> SourcePos -> Binding e Source #
An inherit
clause without an expression to pull from.
inheritFrom :: e -> [NKeyName e] -> SourcePos -> Binding e Source #
An inherit
clause with an expression to pull from.
bindTo :: Text -> NExpr -> Binding NExpr Source #
Shorthand for producing a binding of a name to an expression.
appendBindings :: [Binding NExpr] -> NExpr -> NExpr Source #
Append a list of bindings to a set or let expression. For example, adding `[a = 1, b = 2]` to `let c = 3; in 4` produces `let a = 1; b = 2; c = 3; in 4`.