hnix-0.10.1: Haskell implementation of the Nix language
Safe HaskellNone
LanguageHaskell2010

Nix.Expr.Types.Annotated

Description

The source location annotated nix expression type and supporting types.

Synopsis

Documentation

data Ann ann a 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)

Constructors

Ann 

Fields

Instances

Instances details
ToJSON2 Ann Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

liftToJSON2 :: (a -> Value) -> ([a] -> Value) -> (b -> Value) -> ([b] -> Value) -> Ann a b -> Value #

liftToJSONList2 :: (a -> Value) -> ([a] -> Value) -> (b -> Value) -> ([b] -> Value) -> [Ann a b] -> Value #

liftToEncoding2 :: (a -> Encoding) -> ([a] -> Encoding) -> (b -> Encoding) -> ([b] -> Encoding) -> Ann a b -> Encoding #

liftToEncodingList2 :: (a -> Encoding) -> ([a] -> Encoding) -> (b -> Encoding) -> ([b] -> Encoding) -> [Ann a b] -> Encoding #

FromJSON2 Ann Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

liftParseJSON2 :: (Value -> Parser a) -> (Value -> Parser [a]) -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser (Ann a b) #

liftParseJSONList2 :: (Value -> Parser a) -> (Value -> Parser [a]) -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser [Ann a b] #

Eq2 Ann Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Ann a c -> Ann b d -> Bool #

Ord2 Ann Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Ann a c -> Ann b d -> Ordering #

Read2 Ann Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Ann a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Ann a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Ann a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Ann a b] #

Show2 Ann Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Ann a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Ann a b] -> ShowS #

Binary NExprLoc Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

put :: NExprLoc -> Put #

get :: Get NExprLoc #

putList :: [NExprLoc] -> Put #

Serialise NExprLoc Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

ToExpr NExprLoc Source # 
Instance details

Defined in Nix.TH

Functor (Ann ann) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

fmap :: (a -> b) -> Ann ann a -> Ann ann b #

(<$) :: a -> Ann ann b -> Ann ann a #

Foldable (Ann ann) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

fold :: Monoid m => Ann ann m -> m #

foldMap :: Monoid m => (a -> m) -> Ann ann a -> m #

foldMap' :: Monoid m => (a -> m) -> Ann ann a -> m #

foldr :: (a -> b -> b) -> b -> Ann ann a -> b #

foldr' :: (a -> b -> b) -> b -> Ann ann a -> b #

foldl :: (b -> a -> b) -> b -> Ann ann a -> b #

foldl' :: (b -> a -> b) -> b -> Ann ann a -> b #

foldr1 :: (a -> a -> a) -> Ann ann a -> a #

foldl1 :: (a -> a -> a) -> Ann ann a -> a #

toList :: Ann ann a -> [a] #

null :: Ann ann a -> Bool #

length :: Ann ann a -> Int #

elem :: Eq a => a -> Ann ann a -> Bool #

maximum :: Ord a => Ann ann a -> a #

minimum :: Ord a => Ann ann a -> a #

sum :: Num a => Ann ann a -> a #

product :: Num a => Ann ann a -> a #

Traversable (Ann ann) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

traverse :: Applicative f => (a -> f b) -> Ann ann a -> f (Ann ann b) #

sequenceA :: Applicative f => Ann ann (f a) -> f (Ann ann a) #

mapM :: Monad m => (a -> m b) -> Ann ann a -> m (Ann ann b) #

sequence :: Monad m => Ann ann (m a) -> m (Ann ann a) #

ToJSON ann => ToJSON1 (Ann ann) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

liftToJSON :: (a -> Value) -> ([a] -> Value) -> Ann ann a -> Value #

liftToJSONList :: (a -> Value) -> ([a] -> Value) -> [Ann ann a] -> Value #

liftToEncoding :: (a -> Encoding) -> ([a] -> Encoding) -> Ann ann a -> Encoding #

liftToEncodingList :: (a -> Encoding) -> ([a] -> Encoding) -> [Ann ann a] -> Encoding #

FromJSON ann => FromJSON1 (Ann ann) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

liftParseJSON :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Ann ann a) #

liftParseJSONList :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Ann ann a] #

Eq ann => Eq1 (Ann ann) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

liftEq :: (a -> b -> Bool) -> Ann ann a -> Ann ann b -> Bool #

Ord ann => Ord1 (Ann ann) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

liftCompare :: (a -> b -> Ordering) -> Ann ann a -> Ann ann b -> Ordering #

Read ann => Read1 (Ann ann) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Ann ann a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Ann ann a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Ann ann a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Ann ann a] #

Show ann => Show1 (Ann ann) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Ann ann a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Ann ann a] -> ShowS #

Binary r => Binary (NExprLocF r) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

put :: NExprLocF r -> Put #

get :: Get (NExprLocF r) #

putList :: [NExprLocF r] -> Put #

NFData ann => NFData1 (Ann ann) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

liftRnf :: (a -> ()) -> Ann ann a -> () #

Hashable ann => Hashable1 (Ann ann) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Ann ann a -> Int #

Generic1 (Ann ann :: Type -> Type) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Associated Types

type Rep1 (Ann ann) :: k -> Type #

Methods

from1 :: forall (a :: k). Ann ann a -> Rep1 (Ann ann) a #

to1 :: forall (a :: k). Rep1 (Ann ann) a -> Ann ann a #

(Eq ann, Eq a) => Eq (Ann ann a) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

(==) :: Ann ann a -> Ann ann a -> Bool #

(/=) :: Ann ann a -> Ann ann a -> Bool #

(Data ann, Data a) => Data (Ann ann a) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ann ann a -> c (Ann ann a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ann ann a) #

toConstr :: Ann ann a -> Constr #

dataTypeOf :: Ann ann a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Ann ann a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Ann ann a)) #

gmapT :: (forall b. Data b => b -> b) -> Ann ann a -> Ann ann a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ann ann a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ann ann a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ann ann a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ann ann a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ann ann a -> m (Ann ann a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ann ann a -> m (Ann ann a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ann ann a -> m (Ann ann a) #

(Ord ann, Ord a) => Ord (Ann ann a) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

compare :: Ann ann a -> Ann ann a -> Ordering #

(<) :: Ann ann a -> Ann ann a -> Bool #

(<=) :: Ann ann a -> Ann ann a -> Bool #

(>) :: Ann ann a -> Ann ann a -> Bool #

(>=) :: Ann ann a -> Ann ann a -> Bool #

max :: Ann ann a -> Ann ann a -> Ann ann a #

min :: Ann ann a -> Ann ann a -> Ann ann a #

(Read ann, Read a) => Read (Ann ann a) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

readsPrec :: Int -> ReadS (Ann ann a) #

readList :: ReadS [Ann ann a] #

readPrec :: ReadPrec (Ann ann a) #

readListPrec :: ReadPrec [Ann ann a] #

(Show ann, Show a) => Show (Ann ann a) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

showsPrec :: Int -> Ann ann a -> ShowS #

show :: Ann ann a -> String #

showList :: [Ann ann a] -> ShowS #

Generic (Ann ann a) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Associated Types

type Rep (Ann ann a) :: Type -> Type #

Methods

from :: Ann ann a -> Rep (Ann ann a) x #

to :: Rep (Ann ann a) x -> Ann ann a #

(Hashable ann, Hashable a) => Hashable (Ann ann a) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

hashWithSalt :: Int -> Ann ann a -> Int #

hash :: Ann ann a -> Int #

(Binary ann, Binary a) => Binary (Ann ann a) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

put :: Ann ann a -> Put #

get :: Get (Ann ann a) #

putList :: [Ann ann a] -> Put #

(NFData ann, NFData a) => NFData (Ann ann a) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

rnf :: Ann ann a -> () #

(Serialise ann, Serialise a) => Serialise (Ann ann a) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

encode :: Ann ann a -> Encoding #

decode :: Decoder s (Ann ann a) #

encodeList :: [Ann ann a] -> Encoding #

decodeList :: Decoder s [Ann ann a] #

Monad m => MonadState (HashMap FilePath NExprLoc) (StandardTF r m) Source # 
Instance details

Defined in Nix.Standard

Serialise r => Serialise (Compose (Ann SrcSpan) NExprF r) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

type Rep1 (Ann ann :: Type -> Type) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

type Rep1 (Ann ann :: Type -> Type) = D1 ('MetaData "Ann" "Nix.Expr.Types.Annotated" "hnix-0.10.1-inplace" 'False) (C1 ('MetaCons "Ann" 'PrefixI 'True) (S1 ('MetaSel ('Just "annotation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Just "annotated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type Rep (Ann ann a) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

type Rep (Ann ann a) = D1 ('MetaData "Ann" "Nix.Expr.Types.Annotated" "hnix-0.10.1-inplace" 'False) (C1 ('MetaCons "Ann" 'PrefixI 'True) (S1 ('MetaSel ('Just "annotation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Just "annotated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

data SrcSpan Source #

A location in a source file

Constructors

SrcSpan 

Instances

Instances details
Eq SrcSpan Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

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

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

Data SrcSpan Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

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

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

toConstr :: SrcSpan -> Constr #

dataTypeOf :: SrcSpan -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord SrcSpan Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Show SrcSpan Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Generic SrcSpan Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Associated Types

type Rep SrcSpan :: Type -> Type #

Methods

from :: SrcSpan -> Rep SrcSpan x #

to :: Rep SrcSpan x -> SrcSpan #

Semigroup SrcSpan Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Hashable SrcSpan Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

hashWithSalt :: Int -> SrcSpan -> Int #

hash :: SrcSpan -> Int #

ToJSON SrcSpan Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

FromJSON SrcSpan Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Binary SrcSpan Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

put :: SrcSpan -> Put #

get :: Get SrcSpan #

putList :: [SrcSpan] -> Put #

Binary NExprLoc Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

put :: NExprLoc -> Put #

get :: Get NExprLoc #

putList :: [NExprLoc] -> Put #

NFData SrcSpan Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

rnf :: SrcSpan -> () #

Serialise SrcSpan Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Serialise NExprLoc Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

ToExpr NExprLoc Source # 
Instance details

Defined in Nix.TH

Binary r => Binary (NExprLocF r) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

Methods

put :: NExprLocF r -> Put #

get :: Get (NExprLocF r) #

putList :: [NExprLocF r] -> Put #

Has (Context m t) SrcSpan Source # 
Instance details

Defined in Nix.Context

Monad m => MonadState (HashMap FilePath NExprLoc) (StandardTF r m) Source # 
Instance details

Defined in Nix.Standard

Serialise r => Serialise (Compose (Ann SrcSpan) NExprF r) Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

type Rep SrcSpan Source # 
Instance details

Defined in Nix.Expr.Types.Annotated

type Rep SrcSpan = D1 ('MetaData "SrcSpan" "Nix.Expr.Types.Annotated" "hnix-0.10.1-inplace" 'False) (C1 ('MetaCons "SrcSpan" 'PrefixI 'True) (S1 ('MetaSel ('Just "spanBegin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos) :*: S1 ('MetaSel ('Just "spanEnd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos)))

type NExprLoc = Fix NExprLocF Source #

A nix expression with source location at each subexpression.

type AnnF ann f = Compose (Ann ann) f Source #

pattern NBinary_ :: SrcSpan -> NBinaryOp -> r -> r -> NExprLocF r Source #

pattern NUnary_ :: SrcSpan -> NUnaryOp -> r -> NExprLocF r Source #

pattern NAssert_ :: SrcSpan -> r -> r -> NExprLocF r Source #

pattern NWith_ :: SrcSpan -> r -> r -> NExprLocF r Source #

pattern NIf_ :: SrcSpan -> r -> r -> r -> NExprLocF r Source #

pattern NLet_ :: SrcSpan -> [Binding r] -> r -> NExprLocF r Source #

pattern NAbs_ :: SrcSpan -> Params r -> r -> NExprLocF r Source #

pattern NHasAttr_ :: SrcSpan -> r -> NAttrPath r -> NExprLocF r Source #

pattern NSelect_ :: SrcSpan -> r -> NAttrPath r -> Maybe r -> NExprLocF r Source #

pattern NSet_ :: SrcSpan -> NRecordType -> [Binding r] -> NExprLocF r Source #

pattern NList_ :: SrcSpan -> [r] -> NExprLocF r Source #

pattern NStr_ :: SrcSpan -> NString r -> NExprLocF r Source #

pattern NSynHole_ :: SrcSpan -> Text -> NExprLocF r Source #

pattern NSym_ :: SrcSpan -> VarName -> NExprLocF r Source #

Pattern systems for matching on NExprLocF constructions.

pattern AnnE :: forall ann (g :: * -> *). ann -> g (Fix (Compose (Ann ann) g)) -> Fix (Compose (Ann ann) g) Source #

annToAnnF :: Ann ann (f (Fix (AnnF ann f))) -> Fix (AnnF ann f) Source #

stripAnnotation :: Functor f => Fix (AnnF ann f) -> Fix f Source #

stripAnn :: AnnF ann f r -> f r Source #

data SourcePos #

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.

Constructors

SourcePos 

Fields

Instances

Instances details
Eq SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Data SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Methods

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

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

toConstr :: SourcePos -> Constr #

dataTypeOf :: SourcePos -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Read SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Show SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Generic SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Associated Types

type Rep SourcePos :: Type -> Type #

Hashable SourcePos Source # 
Instance details

Defined in Nix.Expr.Types

ToJSON SourcePos Source # 
Instance details

Defined in Nix.Expr.Types

FromJSON SourcePos Source # 
Instance details

Defined in Nix.Expr.Types

Binary SourcePos Source # 
Instance details

Defined in Nix.Expr.Types

NFData SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Methods

rnf :: SourcePos -> () #

Serialise SourcePos Source # 
Instance details

Defined in Nix.Expr.Types

Convertible e t f m => ToValue SourcePos m (NValue' t f m (NValue t f m)) Source # 
Instance details

Defined in Nix.Convert

Methods

toValue :: SourcePos -> m (NValue' t f m (NValue t f m)) Source #

(Convertible e t f m, ToValue a m (NValue t f m)) => ToValue (AttrSet a, AttrSet SourcePos) m (Deeper (NValue' t f m (NValue t f m))) Source # 
Instance details

Defined in Nix.Convert

Methods

toValue :: (AttrSet a, AttrSet SourcePos) -> m (Deeper (NValue' t f m (NValue t f m))) Source #

ToValue (AttrSet (Symbolic m), AttrSet SourcePos) m (Symbolic m) Source # 
Instance details

Defined in Nix.Lint

(Convertible e t f m, FromValue a m (NValue t f m)) => FromValue (AttrSet a, AttrSet SourcePos) m (Deeper (NValue' t f m (NValue t f m))) Source # 
Instance details

Defined in Nix.Convert

Methods

fromValue :: Deeper (NValue' t f m (NValue t f m)) -> m (AttrSet a, AttrSet SourcePos) Source #

fromValueMay :: Deeper (NValue' t f m (NValue t f m)) -> m (Maybe (AttrSet a, AttrSet SourcePos)) Source #

FromValue (AttrSet (Symbolic m), AttrSet SourcePos) m (Symbolic m) Source # 
Instance details

Defined in Nix.Lint

Convertible e t f m => ToValue (AttrSet (NValue t f m), AttrSet SourcePos) m (NValue' t f m (NValue t f m)) Source # 
Instance details

Defined in Nix.Convert

Methods

toValue :: (AttrSet (NValue t f m), AttrSet SourcePos) -> m (NValue' t f m (NValue t f m)) Source #

Convertible e t f m => FromValue (AttrSet (NValue t f m), AttrSet SourcePos) m (NValue' t f m (NValue t f m)) Source # 
Instance details

Defined in Nix.Convert

Methods

fromValue :: NValue' t f m (NValue t f m) -> m (AttrSet (NValue t f m), AttrSet SourcePos) Source #

fromValueMay :: NValue' t f m (NValue t f m) -> m (Maybe (AttrSet (NValue t f m), AttrSet SourcePos)) Source #

type Rep SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

type Rep SourcePos = D1 ('MetaData "SourcePos" "Text.Megaparsec.Pos" "megaparsec-8.0.0-4ZnGSGzBMTKKqHelzKVP3n" 'False) (C1 ('MetaCons "SourcePos" 'PrefixI 'True) (S1 ('MetaSel ('Just "sourceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: (S1 ('MetaSel ('Just "sourceLine") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Pos) :*: S1 ('MetaSel ('Just "sourceColumn") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Pos))))

unPos :: Pos -> Int #

Extract Int from Pos.

Since: megaparsec-6.0.0

mkPos :: Int -> Pos #

Construction of Pos from Int. The function throws InvalidPosException when given a non-positive argument.

Since: megaparsec-6.0.0