pure mempty: Short-curcuit, stub.
Modulehnix-0.17.0Haskell2010
Nix.Utils
This is a module of custom Prelude code.
It is for import for projects other then HNix.
For HNix - this module gets reexported by Prelude, so for HNix please fix-up pass-through there.
- 7 types
- 1 class
- 37 values
- Packagehnix-0.17.0
- Exports45
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceUtils.hs
Duplicates object into a tuple.
Apply a single function to both components of a pair.
both succ (1,2) == (2,3)Taken From package extra
Gives tuple laziness.
Takem from utility-ht.
In foldr order apply functions.
traverse2 :: (Applicative m, Applicative n, Traversable t)=> (a -> m (n b))Run function that runs 2 Applicative actions
-> t aon every element in Traversable
-> m (n (t b))collect the results.
maybe-like eliminator, for foldable empty/inhabited structures.
Lambda analog of maybe or either for Free monad.
Instances22Eq, Data, Ord, Read, Show, IsString, …
Eq PathDefined in hnix-0.17.0 · Nix.UtilsData PathDefined in hnix-0.17.0 · Nix.UtilsOrd PathDefined in hnix-0.17.0 · Nix.UtilsRead PathDefined in hnix-0.17.0 · Nix.UtilsShow PathDefined in hnix-0.17.0 · Nix.UtilsIsString PathDefined in hnix-0.17.0 · Nix.UtilsGeneric PathDefined in hnix-0.17.0 · Nix.UtilsSemigroup PathDefined in hnix-0.17.0 · Nix.UtilsMonoid PathDefined in hnix-0.17.0 · Nix.UtilsNFData PathDefined in hnix-0.17.0 · Nix.UtilsBinary PathDefined in hnix-0.17.0 · Nix.UtilsHashable PathDefined in hnix-0.17.0 · Nix.UtilsFromJSON PathDefined in hnix-0.17.0 · Nix.UtilsToJSON PathDefined in hnix-0.17.0 · Nix.UtilsSerialise PathDefined in hnix-0.17.0 · Nix.UtilsToText PathDefined in hnix-0.17.0 · Nix.Utils(Convertible e t f m, MonadValue (NValue t f m) m) => FromValue Path m (NValue' t f m (NValue t f m))Defined in hnix-0.17.0 · Nix.ConvertConvertible e t f m => ToValue Path m (NValue' t f m (NValue t f m))Defined in hnix-0.17.0 · Nix.ConvertMonad m => MonadReader (Maybe Path, Scopes (Reducer m) NExprLoc) (Reducer m)Defined in hnix-0.17.0 · Nix.ReduceMonad m => MonadState (HashMap Path NExprLoc, HashMap Text Text) (Reducer m)Defined in hnix-0.17.0 · Nix.ReduceMonad m => MonadState (HashMap Path NExprLoc, HashMap Text Text) (StandardTF r m)Defined in hnix-0.17.0 · Nix.Standardtype Rep Path = D1 ('MetaDataDefined in hnix-0.17.0 · Nix.Utils"Path"
"Nix.Utils"
"hnix-0.17.0-Iy75YcImuzK7FD0KGfkLv7"
'True) (C1 ('MetaCons"Path"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))
This set of Path funcs is to control system filepath types & typesafety and to easily migrate from FilePath to anything suitable (like path or so).
Paths FilePath.addExtensions.
Paths FilePath.readFile.
F-algebra defines how to reduce the fixed-point of a functor to a value. > type Alg f a = f a -> a
Do according transformation.
It is a transformation of a recursion scheme.
See TransformF.
Do according transformation.
It is a transformation between functors.
adi is Abstracting Definitional Interpreters:
https://arxiv.org/abs/1707.04755
All ADI does is interleaves every layer of evaluation by inserting intermitten layers between them, in that way the evaluation can be extended/embelished in any way wanted. Look at its use to see great examples.
Essentially, it does for evaluation what recursion schemes do for representation: allows threading layers through existing structure, only in this case through behavior.
Instances7Has, …
Has a aDefined in hnix-0.17.0 · Nix.UtilsHas (Context m t) SrcSpanDefined in hnix-0.17.0 · Nix.ContextHas (Context m t) FramesDefined in hnix-0.17.0 · Nix.ContextHas (Context m t) OptionsDefined in hnix-0.17.0 · Nix.ContextHas (a, b) aDefined in hnix-0.17.0 · Nix.UtilsHas (a, b) bDefined in hnix-0.17.0 · Nix.UtilsHas (Context m t) (Scopes m t)Defined in hnix-0.17.0 · Nix.Context
Retrive monad state by Lens'.
Hashmap Text -- type synonymDemote a setter to a semantic editor combinator.
over :: Prism s t a b -> Reviwer s t a b
over :: Grid s t a b -> Grate s t a b
over :: Adapter s t a b -> Grate s t a b
Covert an AdapterLike optic into a GrateLike optic.
view :: Getter s t a b -> s -> a
Demote a lens or getter to a projection function.
view :: Monoid a => Fold s t a b -> s -> a
Returns the monoidal summary of a traversal or a fold.