Safe Haskell | None |
---|---|
Language | Haskell2010 |
The source location annotated nix expression type and supporting types.
- data SrcSpan = SrcSpan {}
- data Ann ann a = Ann {
- annotation :: ann
- annotated :: a
- type AnnF ann f = Compose (Ann ann) f
- annToAnnF :: Ann ann (f (Fix (AnnF ann f))) -> Fix (AnnF ann f)
- type NExprLocF = AnnF SrcSpan NExprF
- type NExprLoc = Fix NExprLocF
- pattern AnnE :: forall ann (g :: * -> *). ann -> g (Fix (Compose (Ann ann) g)) -> Fix (Compose (Ann ann) g)
- stripAnnotation :: Functor f => Fix (AnnF ann f) -> Fix f
- stripAnn :: AnnF ann f r -> f r
- nUnary :: Ann SrcSpan NUnaryOp -> NExprLoc -> NExprLoc
- nBinary :: Ann SrcSpan NBinaryOp -> NExprLoc -> NExprLoc -> NExprLoc
- nSelectLoc :: NExprLoc -> Ann SrcSpan (NAttrPath NExprLoc) -> Maybe NExprLoc -> NExprLoc
- nHasAttr :: NExprLoc -> Ann SrcSpan (NAttrPath NExprLoc) -> NExprLoc
- nApp :: NExprLoc -> NExprLoc -> NExprLoc
- nAbs :: Ann SrcSpan (Params NExprLoc) -> NExprLoc -> NExprLoc
- nStr :: Ann SrcSpan (NString NExprLoc) -> NExprLoc
- deltaInfo :: SourcePos -> (Text, Int, Int)
- nNull :: NExprLoc
- nullSpan :: SrcSpan
- pattern NSym_ :: SrcSpan -> VarName -> NExprLocF r
- pattern NConstant_ :: SrcSpan -> NAtom -> NExprLocF r
- pattern NStr_ :: SrcSpan -> NString r -> NExprLocF r
- pattern NList_ :: SrcSpan -> [r] -> NExprLocF r
- pattern NSet_ :: SrcSpan -> [Binding r] -> NExprLocF r
- pattern NRecSet_ :: SrcSpan -> [Binding r] -> NExprLocF r
- pattern NLiteralPath_ :: SrcSpan -> FilePath -> NExprLocF r
- pattern NEnvPath_ :: SrcSpan -> FilePath -> NExprLocF r
- pattern NSelect_ :: SrcSpan -> r -> NAttrPath r -> Maybe r -> NExprLocF r
- pattern NHasAttr_ :: SrcSpan -> r -> NAttrPath r -> NExprLocF r
- pattern NAbs_ :: SrcSpan -> Params r -> r -> NExprLocF r
- pattern NLet_ :: SrcSpan -> [Binding r] -> r -> NExprLocF r
- pattern NIf_ :: SrcSpan -> r -> r -> r -> NExprLocF r
- pattern NWith_ :: SrcSpan -> r -> r -> NExprLocF r
- pattern NAssert_ :: SrcSpan -> r -> r -> NExprLocF r
- pattern NUnary_ :: SrcSpan -> NUnaryOp -> r -> NExprLocF r
- pattern NBinary_ :: SrcSpan -> NBinaryOp -> r -> r -> NExprLocF r
- module Data.Functor.Compose
- data SourcePos :: * = SourcePos {
- sourceName :: FilePath
- sourceLine :: !Pos
- sourceColumn :: !Pos
- unPos :: Pos -> Int
- mkPos :: Int -> Pos
Documentation
A location in a source file
Eq SrcSpan Source # | |
Data SrcSpan Source # | |
Ord SrcSpan Source # | |
Show SrcSpan Source # | |
Generic SrcSpan Source # | |
Semigroup SrcSpan Source # | |
Hashable SrcSpan Source # | |
Hashable NExprLoc Source # | |
ToJSON SrcSpan Source # | |
FromJSON SrcSpan Source # | |
Binary SrcSpan Source # | |
Binary NExprLoc Source # | |
NFData SrcSpan Source # | |
NFData NExprLoc Source # | |
Serialise SrcSpan Source # | |
Serialise NExprLoc Source # | |
Binary r => Binary (NExprLocF r) Source # | |
Has (Context m v) SrcSpan Source # | |
Serialise r => Serialise (Compose * * (Ann SrcSpan) NExprF r) Source # | |
type Rep SrcSpan Source # | |
A type constructor applied to a type along with an annotation
Intended to be used with Fix
:
type MyType = Fix (Compose (Ann Annotation) F)
Ann | |
|
pattern AnnE :: forall ann (g :: * -> *). ann -> g (Fix (Compose (Ann ann) g)) -> Fix (Compose (Ann ann) g) Source #
pattern NSym_ :: SrcSpan -> VarName -> NExprLocF r Source #
Pattern systems for matching on NExprLocF constructions.
module Data.Functor.Compose
The data type SourcePos
represents source positions. It contains the
name of the source file, a line number, and a column number. Source line
and column positions change intensively during parsing, so we need to
make them strict to avoid memory leaks.
SourcePos | |
|