HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Modulehnix-0.17.0Haskell2010

Nix.Expr.Types.Annotated

The source location annotated nix expression type and supporting types.

Synopsis
  • Packagehnix-0.17.0
  • Exports58
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceAnnotated.hs
patternpattern Ann :: ann -> f (Ann ann f) -> Ann ann f

Pattern: Fix (Compose (AnnUnit _ _)). Fix composes units of (annotations & the annotated) into one object. Giving annotated expression.

datadata AnnUnit ann expr

A type constructor applied to a type along with an annotation

Intended to be used with Fix: type MyType = Fix (Compose (AnnUnit Annotation) F)

Constructors

Instances38Eq2, Ord2, Read2, Show2, FromJSON2, ToJSON2, …
datadata SrcSpan

Demarcation of a chunk in a source file.

Instances22Eq, Data, Ord, Show, Generic, Semigroup, …
newtypenewtype Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1)

Right-to-left composition of functors. The composition of applicative functors is always applicative, but the composition of monads is not always a monad.

Examples
Example1 expression
fmap (subtract 1) (Compose (Just [1, 2, 3]))Compose (Just [0,1,2])
Example1 expression
Compose (Just [1, 2, 3]) <> Compose NothingCompose (Just [1,2,3])
Example1 expression
Compose (Just [(++ "World"), (++ "Haskell")]) <*> Compose (Just ["Hello, "])Compose (Just ["Hello, World","Hello, Haskell"])

Constructors

Instances107Scoped, Generic1, TestEquality, Binary, Serialise, Composition, …