symparsec
Safe HaskellNone
LanguageGHC2021

Symparsec.Parser.Common

Description

Common definitions used by parsers.

Synopsis

Common definitions

type family UnconsState (s :: PState) :: (Maybe Char, PState) where ... Source #

Get the next character in the string and update the parser state.

If at end of the string, the state is returned untouched, and len is guaranteed to be 0.

Equations

UnconsState ('State rem 0 idx) = '('Nothing :: Maybe Char, 'State rem 0 idx) 
UnconsState ('State rem len idx) = UnconsState' (UnconsSymbol rem) len idx 

type Error1 (str1 :: str) = 'Error '[str1] Source #

type EStrInputTooShort (nNeed :: Natural) (nGot :: Natural) = ((("needed " ++ ShowNatDec nNeed) ++ " chars, but only ") ++ ShowNatDec nGot) ++ " remain" Source #

type EStrWrongChar (chExpect :: Char) (chGot :: Char) = ((("expected '" ++ ShowChar chExpect) ++ "', got '") ++ ShowChar chGot) ++ "'" Source #

type Impossible = TypeError ('Text "impossible parser state") :: k Source #

Impossible parser state.

Use when you can prove that an equation is impossible.

Re-exports

data Doc s #

Simple pretty document ADT.

Designed to work on both type level (as a limited ErrorMessage) and term level (as a boring ADT).

Note that ShowType is magical (see compilerGHCCore/Type.hs#L1309), so we need to remove it for term level.

singletons-base defines a version of this, but retains the ShowType constructor and is in the singletons ecosystem.

Constructors

Text s

plain ol' text

(Doc s) :<>: (Doc s)

append docs next to each other

(Doc s) :$$: (Doc s)

stack docs on top of each other (newline)

Instances

Instances details
Demotable SDoc # 
Instance details

Defined in TypeLevelShow.Doc

Associated Types

type Demote SDoc 
Instance details

Defined in TypeLevelShow.Doc

Methods

demote :: forall (k1 :: PDoc). SDoc k1 -> Demote SDoc #

SingDoc doc => SingI (doc :: PDoc) # 
Instance details

Defined in TypeLevelShow.Doc

Associated Types

type Sing 
Instance details

Defined in TypeLevelShow.Doc

type Sing = SDoc

Methods

sing' :: Sing doc #

Show s => Show (Doc s) # 
Instance details

Defined in TypeLevelShow.Doc

Methods

showsPrec :: Int -> Doc s -> ShowS #

show :: Doc s -> String #

showList :: [Doc s] -> ShowS #

type Sing # 
Instance details

Defined in TypeLevelShow.Doc

type Sing = SDoc
type Demote SDoc # 
Instance details

Defined in TypeLevelShow.Doc

type (++) (l :: Symbol) (r :: Symbol) = AppendSymbol l r #

type family App (f :: a ~> b) (x :: a) :: b #

Type level function application.

Instances

Instances details
type App ShowNatDigitHexLowerSym (d :: Natural) # 
Instance details

Defined in TypeLevelShow.Natural.Digit

type App ShowNatDigitHexUpperSym (d :: Natural) # 
Instance details

Defined in TypeLevelShow.Natural.Digit

type App NotSym (x :: Bool) # 
Instance details

Defined in DeFun.Bool

type App NotSym (x :: Bool) = Not x
type App IsAlphaSym (ch :: Char) Source # 
Instance details

Defined in Symparsec.Parser.While.Predicates

type App IsAlphaSym (ch :: Char) = IsAlpha ch
type App IsDecDigitSym (ch :: Char) Source # 
Instance details

Defined in Symparsec.Parser.While.Predicates

type App IsDecDigitSym (ch :: Char) = IsDecDigit ch
type App IsHexDigitSym (ch :: Char) Source # 
Instance details

Defined in Symparsec.Parser.While.Predicates

type App IsHexDigitSym (ch :: Char) = IsHexDigit ch
type App (LAndSym1 x :: FunKind Bool Bool -> Type) (y :: Bool) # 
Instance details

Defined in DeFun.Bool

type App (LAndSym1 x :: FunKind Bool Bool -> Type) (y :: Bool) = LAnd x y
type App (LOrSym1 x :: FunKind Bool Bool -> Type) (y :: Bool) # 
Instance details

Defined in DeFun.Bool

type App (LOrSym1 x :: FunKind Bool Bool -> Type) (y :: Bool) = LOr x y
type App (IdSym :: FunKind a a -> Type) (x :: a) # 
Instance details

Defined in DeFun.Function

type App (IdSym :: FunKind a a -> Type) (x :: a) = Id x
type App (Con1 f :: FunKind a b -> Type) (x :: a) # 
Instance details

Defined in DeFun.Core

type App (Con1 f :: FunKind a b -> Type) (x :: a) = f x
type App (JoinSym1 f :: FunKind a b -> Type) (x :: a) # 
Instance details

Defined in DeFun.Function

type App (JoinSym1 f :: FunKind a b -> Type) (x :: a) = Join f x
type App (ConstSym1 x :: FunKind b a -> Type) (y :: b) # 
Instance details

Defined in DeFun.Function

type App (ConstSym1 x :: FunKind b a -> Type) (y :: b) = Const x y
type App (ApSym2 f g :: FunKind a c -> Type) (x :: a) # 
Instance details

Defined in DeFun.Function

type App (ApSym2 f g :: FunKind a c -> Type) (x :: a) = Ap f g x
type App (CompSym2 f g :: FunKind a c -> Type) (x :: a) # 
Instance details

Defined in DeFun.Function

type App (CompSym2 f g :: FunKind a c -> Type) (x :: a) = Comp f g x
type App (FlipSym2 f b2 :: FunKind a1 c -> Type) (a2 :: a1) # 
Instance details

Defined in DeFun.Function

type App (FlipSym2 f b2 :: FunKind a1 c -> Type) (a2 :: a1) = Flip f b2 a2
type App PExpr (s :: PState) Source # 
Instance details

Defined in Symparsec.Example.Expr

type App PExpr (s :: PState) = PExprNext s ('[] :: [ExprTok]) ('[] :: [Expr Natural]) (UnconsState s)
type App Eof (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Eof

type App Eof (s :: PState)
type App TakeRest (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.TakeRest

type App TakeRest (s :: PState)
type App TakeSym (n :: Natural) Source # 
Instance details

Defined in Symparsec.Parser.Take

type App TakeSym (n :: Natural) = Take n
type App ParseDigitBinSym (ch :: Char) Source # 
Instance details

Defined in Symparsec.Parser.Natural.Digits

type App ParseDigitDecSym (ch :: Char) Source # 
Instance details

Defined in Symparsec.Parser.Natural.Digits

type App ParseDigitHexSym (ch :: Char) Source # 
Instance details

Defined in Symparsec.Parser.Natural.Digits

type App ParseDigitOctSym (ch :: Char) Source # 
Instance details

Defined in Symparsec.Parser.Natural.Digits

type App (Ensure n :: FunKind PState (PReply ()) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Ensure

type App (Ensure n :: FunKind PState (PReply ()) -> Type) (s :: PState)
type App (Literal lit :: FunKind PState (PReply ()) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Literal

type App (Literal lit :: FunKind PState (PReply ()) -> Type) (s :: PState)
type App (SkipUnsafe n :: FunKind PState (PReply ()) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Skip

type App (SkipUnsafe n :: FunKind PState (PReply ()) -> Type) (s :: PState)
type App (Take n :: FunKind PState (PReply Symbol) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Take

type App (Take n :: FunKind PState (PReply Symbol) -> Type) (s :: PState)
type App (TakeWhile chPred :: FunKind PState (PReply Symbol) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.TakeWhile

type App (TakeWhile chPred :: FunKind PState (PReply Symbol) -> Type) (s :: PState)
type App (Empty :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Alternative

type App (Empty :: FunKind PState (PReply a) -> Type) (s :: PState) = 'Reply ('Err (Error1 "called empty parser") :: Result Symbol Natural a) s
type App (NatBase base parseDigit :: FunKind PState (PReply Natural) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Natural

type App (NatBase base parseDigit :: FunKind PState (PReply Natural) -> Type) (s :: PState)
type App (NatBaseWhile base parseDigit :: FunKind PState (PReply Natural) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Natural

type App (NatBaseWhile base parseDigit :: FunKind PState (PReply Natural) -> Type) (s :: PState)
type App (Try p :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Try

type App (Try p :: FunKind PState (PReply a) -> Type) (s :: PState)
type App (Pure a2 :: FunKind PState (PReply a1) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Applicative

type App (Pure a2 :: FunKind PState (PReply a1) -> Type) (s :: PState) = 'Reply ('OK a2 :: Result Symbol Natural a1) s
type App (IsolateSym p :: FunKind Natural (PParser a) -> Type) (n :: Natural) Source # 
Instance details

Defined in Symparsec.Parser.Isolate

type App (IsolateSym p :: FunKind Natural (PParser a) -> Type) (n :: Natural) = Isolate n p
type App (NatBase1 base parseDigit digit :: FunKind PState (PReply Natural) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Natural

type App (NatBase1 base parseDigit digit :: FunKind PState (PReply Natural) -> Type) (s :: PState)
type App (Count n p :: FunKind PState (PReply [k]) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Count

type App (Count n p :: FunKind PState (PReply [k]) -> Type) (s :: PState)
type App (l <|> r :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Alternative

type App (l <|> r :: FunKind PState (PReply a) -> Type) (s :: PState)
type App (Isolate n p :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Isolate

type App (Isolate n p :: FunKind PState (PReply a) -> Type) (s :: PState)
type App (While chPred p :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.While

type App (While chPred p :: FunKind PState (PReply a) -> Type) (s :: PState)
type App (f <$> p :: FunKind PState (PReply a2) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Functor

type App (f <$> p :: FunKind PState (PReply a2) -> Type) (s :: PState)
type App (l <*> r :: FunKind PState (PReply b) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Applicative

type App (l <*> r :: FunKind PState (PReply b) -> Type) (s :: PState)
type App (l >>= r :: FunKind PState (PReply b) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Monad

type App (l >>= r :: FunKind PState (PReply b) -> Type) (s :: PState)
type App LAndSym (x :: Bool) # 
Instance details

Defined in DeFun.Bool

type App LAndSym (x :: Bool) = LAndSym1 x
type App LOrSym (x :: Bool) # 
Instance details

Defined in DeFun.Bool

type App LOrSym (x :: Bool) = LOrSym1 x
type App (ConstSym :: FunKind a (b ~> a) -> Type) (x :: a) # 
Instance details

Defined in DeFun.Function

type App (ConstSym :: FunKind a (b ~> a) -> Type) (x :: a) = ConstSym1 x :: FunKind b a -> Type
type App (FoldlSym1 f :: FunKind b ([a] ~> b) -> Type) (z :: b) # 
Instance details

Defined in DeFun.List

type App (FoldlSym1 f :: FunKind b ([a] ~> b) -> Type) (z :: b) = FoldlSym2 f z
type App (FoldrSym1 f :: FunKind b ([a] ~> b) -> Type) (z :: b) # 
Instance details

Defined in DeFun.List

type App (FoldrSym1 f :: FunKind b ([a] ~> b) -> Type) (z :: b) = FoldrSym2 f z
type App (Con2 f :: FunKind a1 (a2 ~> b) -> Type) (arg :: a1) # 
Instance details

Defined in DeFun.Core

type App (Con2 f :: FunKind a1 (a2 ~> b) -> Type) (arg :: a1) = Con1 (f arg)
type App (FlipSym1 f :: FunKind b (a ~> c) -> Type) (x :: b) # 
Instance details

Defined in DeFun.Function

type App (FlipSym1 f :: FunKind b (a ~> c) -> Type) (x :: b) = FlipSym2 f x
type App (Con3 f :: FunKind a1 (a2 ~> (b ~> c)) -> Type) (arg :: a1) # 
Instance details

Defined in DeFun.Core

type App (Con3 f :: FunKind a1 (a2 ~> (b ~> c)) -> Type) (arg :: a1) = Con2 (f arg)
type App (FoldlSym2 f z :: FunKind [a] b -> Type) (xs :: [a]) # 
Instance details

Defined in DeFun.List

type App (FoldlSym2 f z :: FunKind [a] b -> Type) (xs :: [a]) = Foldl f z xs
type App (FoldrSym2 f z :: FunKind [a] b -> Type) (xs :: [a]) # 
Instance details

Defined in DeFun.List

type App (FoldrSym2 f z :: FunKind [a] b -> Type) (xs :: [a]) = Foldr f z xs
type App (SequenceSym :: FunKind [[a]] [[a]] -> Type) (xss :: [[a]]) # 
Instance details

Defined in DeFun.List

type App (SequenceSym :: FunKind [[a]] [[a]] -> Type) (xss :: [[a]]) = Sequence xss
type App (ConcatSym :: FunKind [[a]] [a] -> Type) (xss :: [[a]]) # 
Instance details

Defined in DeFun.List

type App (ConcatSym :: FunKind [[a]] [a] -> Type) (xss :: [[a]]) = Concat xss
type App (ReverseSym :: FunKind [a] [a] -> Type) (xs :: [a]) # 
Instance details

Defined in DeFun.List

type App (ReverseSym :: FunKind [a] [a] -> Type) (xs :: [a]) = Reverse xs
type App (AppendSym1 xs :: FunKind [a] [a] -> Type) (ys :: [a]) # 
Instance details

Defined in DeFun.List

type App (AppendSym1 xs :: FunKind [a] [a] -> Type) (ys :: [a]) = Append xs ys
type App (FilterSym1 p :: FunKind [a] [a] -> Type) (xs :: [a]) # 
Instance details

Defined in DeFun.List

type App (FilterSym1 p :: FunKind [a] [a] -> Type) (xs :: [a]) = Filter p xs
type App (ConcatMapSym1 f :: FunKind [a] [b] -> Type) (xs :: [a]) # 
Instance details

Defined in DeFun.List

type App (ConcatMapSym1 f :: FunKind [a] [b] -> Type) (xs :: [a]) = ConcatMap f xs
type App (MapSym1 f :: FunKind [a] [b] -> Type) (xs :: [a]) # 
Instance details

Defined in DeFun.List

type App (MapSym1 f :: FunKind [a] [b] -> Type) (xs :: [a]) = Map f xs
type App (Map2Sym2 f xs :: FunKind [b] [c] -> Type) (ys :: [b]) # 
Instance details

Defined in DeFun.List

type App (Map2Sym2 f xs :: FunKind [b] [c] -> Type) (ys :: [b]) = Map2 f xs ys
type App (ZipWithSym2 f xs :: FunKind [b] [c] -> Type) (ys :: [b]) # 
Instance details

Defined in DeFun.List

type App (ZipWithSym2 f xs :: FunKind [b] [c] -> Type) (ys :: [b]) = ZipWith f xs ys
type App (AppendSym :: FunKind [a] ([a] ~> [a]) -> Type) (xs :: [a]) # 
Instance details

Defined in DeFun.List

type App (AppendSym :: FunKind [a] ([a] ~> [a]) -> Type) (xs :: [a]) = AppendSym1 xs
type App (Map2Sym1 f :: FunKind [a] ([b] ~> [c]) -> Type) (xs :: [a]) # 
Instance details

Defined in DeFun.List

type App (Map2Sym1 f :: FunKind [a] ([b] ~> [c]) -> Type) (xs :: [a]) = Map2Sym2 f xs
type App (ZipWithSym1 f :: FunKind [a] ([b] ~> [c]) -> Type) (xs :: [a]) # 
Instance details

Defined in DeFun.List

type App (ZipWithSym1 f :: FunKind [a] ([b] ~> [c]) -> Type) (xs :: [a]) = ZipWithSym2 f xs
type App (FilterSym :: FunKind (a ~> Bool) ([a] ~> [a]) -> Type) (p :: a ~> Bool) # 
Instance details

Defined in DeFun.List

type App (FilterSym :: FunKind (a ~> Bool) ([a] ~> [a]) -> Type) (p :: a ~> Bool) = FilterSym1 p
type App (JoinSym :: FunKind (a ~> (a ~> b)) (a ~> b) -> Type) (f :: a ~> (a ~> b)) # 
Instance details

Defined in DeFun.Function

type App (JoinSym :: FunKind (a ~> (a ~> b)) (a ~> b) -> Type) (f :: a ~> (a ~> b)) = JoinSym1 f
type App (FoldrSym :: FunKind (a ~> (b ~> b)) (b ~> ([a] ~> b)) -> Type) (f :: a ~> (b ~> b)) # 
Instance details

Defined in DeFun.List

type App (FoldrSym :: FunKind (a ~> (b ~> b)) (b ~> ([a] ~> b)) -> Type) (f :: a ~> (b ~> b)) = FoldrSym1 f
type App (ConcatMapSym :: FunKind (a ~> [b]) ([a] ~> [b]) -> Type) (f :: a ~> [b]) # 
Instance details

Defined in DeFun.List

type App (ConcatMapSym :: FunKind (a ~> [b]) ([a] ~> [b]) -> Type) (f :: a ~> [b]) = ConcatMapSym1 f
type App (MapSym :: FunKind (a ~> b) ([a] ~> [b]) -> Type) (f :: a ~> b) # 
Instance details

Defined in DeFun.List

type App (MapSym :: FunKind (a ~> b) ([a] ~> [b]) -> Type) (f :: a ~> b) = MapSym1 f
type App (FoldlSym :: FunKind (b ~> (a ~> b)) (b ~> ([a] ~> b)) -> Type) (f :: b ~> (a ~> b)) # 
Instance details

Defined in DeFun.List

type App (FoldlSym :: FunKind (b ~> (a ~> b)) (b ~> ([a] ~> b)) -> Type) (f :: b ~> (a ~> b)) = FoldlSym1 f
type App (ApSym :: FunKind (a ~> (b ~> c)) ((a ~> b) ~> (a ~> c)) -> Type) (f :: a ~> (b ~> c)) # 
Instance details

Defined in DeFun.Function

type App (ApSym :: FunKind (a ~> (b ~> c)) ((a ~> b) ~> (a ~> c)) -> Type) (f :: a ~> (b ~> c)) = ApSym1 f
type App (Map2Sym :: FunKind (a ~> (b ~> c)) ([a] ~> ([b] ~> [c])) -> Type) (f :: a ~> (b ~> c)) # 
Instance details

Defined in DeFun.List

type App (Map2Sym :: FunKind (a ~> (b ~> c)) ([a] ~> ([b] ~> [c])) -> Type) (f :: a ~> (b ~> c)) = Map2Sym1 f
type App (ZipWithSym :: FunKind (a ~> (b ~> c)) ([a] ~> ([b] ~> [c])) -> Type) (f :: a ~> (b ~> c)) # 
Instance details

Defined in DeFun.List

type App (ZipWithSym :: FunKind (a ~> (b ~> c)) ([a] ~> ([b] ~> [c])) -> Type) (f :: a ~> (b ~> c)) = ZipWithSym1 f
type App (FlipSym :: FunKind (a ~> (b ~> c)) (b ~> (a ~> c)) -> Type) (f :: a ~> (b ~> c)) # 
Instance details

Defined in DeFun.Function

type App (FlipSym :: FunKind (a ~> (b ~> c)) (b ~> (a ~> c)) -> Type) (f :: a ~> (b ~> c)) = FlipSym1 f
type App (CompSym :: FunKind (b ~> c) ((a ~> b) ~> (a ~> c)) -> Type) (f :: b ~> c) # 
Instance details

Defined in DeFun.Function

type App (CompSym :: FunKind (b ~> c) ((a ~> b) ~> (a ~> c)) -> Type) (f :: b ~> c) = CompSym1 f :: FunKind (a ~> b) (a ~> c) -> Type
type App (ApSym1 f :: FunKind (a ~> b) (a ~> c) -> Type) (g :: a ~> b) # 
Instance details

Defined in DeFun.Function

type App (ApSym1 f :: FunKind (a ~> b) (a ~> c) -> Type) (g :: a ~> b) = ApSym2 f g
type App (CompSym1 f :: FunKind (a ~> b) (a ~> c) -> Type) (g :: a ~> b) # 
Instance details

Defined in DeFun.Function

type App (CompSym1 f :: FunKind (a ~> b) (a ~> c) -> Type) (g :: a ~> b) = CompSym2 f g

Common imports

Not used by all parsers, but common enough that we'll export them here.

data Symbol #

(Kind) This is the kind of type-level symbols.

Instances

Instances details
SingKind Symbol

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Associated Types

type DemoteRep Symbol 
Instance details

Defined in GHC.Internal.Generics

type DemoteRep Symbol = String

Methods

fromSing :: forall (a :: Symbol). Sing a -> DemoteRep Symbol

TestCoercion SSymbol #

Since: base-4.18.0.0

Instance details

Defined in GHC.Internal.TypeLits

Methods

testCoercion :: forall (a :: Symbol) (b :: Symbol). SSymbol a -> SSymbol b -> Maybe (Coercion a b) #

TestEquality SSymbol #

Since: base-4.18.0.0

Instance details

Defined in GHC.Internal.TypeLits

Methods

testEquality :: forall (a :: Symbol) (b :: Symbol). SSymbol a -> SSymbol b -> Maybe (a :~: b) #

KnownSymbol a => SingI (a :: Symbol)

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Methods

sing :: Sing a

Demotable SError Source # 
Instance details

Defined in Symparsec.Parser

Associated Types

type Demote SError 
Instance details

Defined in Symparsec.Parser

Methods

demote :: forall (k1 :: PError). SError k1 -> Demote SError #

Demotable SState Source # 
Instance details

Defined in Symparsec.Parser

Associated Types

type Demote SState 
Instance details

Defined in Symparsec.Parser

Methods

demote :: forall (k1 :: PState). SState k1 -> Demote SState #

Demotable SDoc # 
Instance details

Defined in TypeLevelShow.Doc

Associated Types

type Demote SDoc 
Instance details

Defined in TypeLevelShow.Doc

Methods

demote :: forall (k1 :: PDoc). SDoc k1 -> Demote SDoc #

Demotable SSymbol # 
Instance details

Defined in Singleraeh.Demote

Associated Types

type Demote SSymbol 
Instance details

Defined in Singleraeh.Demote

Methods

demote :: forall (k1 :: Symbol). SSymbol k1 -> Demote SSymbol #

SingDoc doc => SingI (doc :: PDoc) # 
Instance details

Defined in TypeLevelShow.Doc

Associated Types

type Sing 
Instance details

Defined in TypeLevelShow.Doc

type Sing = SDoc

Methods

sing' :: Sing doc #

KnownSymbol str => SingI (str :: Symbol) # 
Instance details

Defined in Singleraeh.SingI

Associated Types

type Sing 
Instance details

Defined in Singleraeh.SingI

type Sing = SSymbol

Methods

sing' :: Sing str #

Demotable sa => Demotable (SReply sa :: PReply a -> Type) Source # 
Instance details

Defined in Symparsec.Parser

Associated Types

type Demote (SReply sa :: PReply a -> Type) 
Instance details

Defined in Symparsec.Parser

type Demote (SReply sa :: PReply a -> Type) = Reply String Natural (Demote sa)

Methods

demote :: forall (k1 :: PReply a). SReply sa k1 -> Demote (SReply sa) #

Demotable sa => Demotable (SResult sa :: PResult a -> Type) Source # 
Instance details

Defined in Symparsec.Parser

Associated Types

type Demote (SResult sa :: PResult a -> Type) 
Instance details

Defined in Symparsec.Parser

Methods

demote :: forall (k1 :: PResult a). SResult sa k1 -> Demote (SResult sa) #

KnownSymbol s => SingDoc ('Text s) # 
Instance details

Defined in TypeLevelShow.Doc

Methods

singDoc :: SDoc ('Text s) #

(SingDoc l, SingDoc r) => SingDoc (l ':$$: r) # 
Instance details

Defined in TypeLevelShow.Doc

Methods

singDoc :: SDoc (l ':$$: r) #

(SingDoc l, SingDoc r) => SingDoc (l ':<>: r) # 
Instance details

Defined in TypeLevelShow.Doc

Methods

singDoc :: SDoc (l ':<>: r) #

type DemoteRep Symbol # 
Instance details

Defined in GHC.Internal.Generics

type DemoteRep Symbol = String
data Sing (s :: Symbol) # 
Instance details

Defined in GHC.Internal.Generics

data Sing (s :: Symbol) where
type Sing # 
Instance details

Defined in TypeLevelShow.Doc

type Sing = SDoc
type Sing # 
Instance details

Defined in Singleraeh.SingI

type Sing = SSymbol
type Demote SError Source # 
Instance details

Defined in Symparsec.Parser

type Demote SState Source # 
Instance details

Defined in Symparsec.Parser

type Demote SDoc # 
Instance details

Defined in TypeLevelShow.Doc

type Demote SSymbol # 
Instance details

Defined in Singleraeh.Demote

type Compare (a :: Symbol) (b :: Symbol) # 
Instance details

Defined in GHC.Internal.Data.Type.Ord

type Compare (a :: Symbol) (b :: Symbol) = CmpSymbol a b
type App PExpr (s :: PState) Source # 
Instance details

Defined in Symparsec.Example.Expr

type App PExpr (s :: PState) = PExprNext s ('[] :: [ExprTok]) ('[] :: [Expr Natural]) (UnconsState s)
type App Eof (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Eof

type App Eof (s :: PState)
type App TakeRest (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.TakeRest

type App TakeRest (s :: PState)
type App TakeSym (n :: Natural) Source # 
Instance details

Defined in Symparsec.Parser.Take

type App TakeSym (n :: Natural) = Take n
type App (Ensure n :: FunKind PState (PReply ()) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Ensure

type App (Ensure n :: FunKind PState (PReply ()) -> Type) (s :: PState)
type App (Literal lit :: FunKind PState (PReply ()) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Literal

type App (Literal lit :: FunKind PState (PReply ()) -> Type) (s :: PState)
type App (SkipUnsafe n :: FunKind PState (PReply ()) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Skip

type App (SkipUnsafe n :: FunKind PState (PReply ()) -> Type) (s :: PState)
type App (Take n :: FunKind PState (PReply Symbol) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Take

type App (Take n :: FunKind PState (PReply Symbol) -> Type) (s :: PState)
type App (TakeWhile chPred :: FunKind PState (PReply Symbol) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.TakeWhile

type App (TakeWhile chPred :: FunKind PState (PReply Symbol) -> Type) (s :: PState)
type App (Empty :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Alternative

type App (Empty :: FunKind PState (PReply a) -> Type) (s :: PState) = 'Reply ('Err (Error1 "called empty parser") :: Result Symbol Natural a) s
type App (NatBase base parseDigit :: FunKind PState (PReply Natural) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Natural

type App (NatBase base parseDigit :: FunKind PState (PReply Natural) -> Type) (s :: PState)
type App (NatBaseWhile base parseDigit :: FunKind PState (PReply Natural) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Natural

type App (NatBaseWhile base parseDigit :: FunKind PState (PReply Natural) -> Type) (s :: PState)
type App (Try p :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Try

type App (Try p :: FunKind PState (PReply a) -> Type) (s :: PState)
type App (Pure a2 :: FunKind PState (PReply a1) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Applicative

type App (Pure a2 :: FunKind PState (PReply a1) -> Type) (s :: PState) = 'Reply ('OK a2 :: Result Symbol Natural a1) s
type App (IsolateSym p :: FunKind Natural (PParser a) -> Type) (n :: Natural) Source # 
Instance details

Defined in Symparsec.Parser.Isolate

type App (IsolateSym p :: FunKind Natural (PParser a) -> Type) (n :: Natural) = Isolate n p
type App (NatBase1 base parseDigit digit :: FunKind PState (PReply Natural) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Natural

type App (NatBase1 base parseDigit digit :: FunKind PState (PReply Natural) -> Type) (s :: PState)
type App (Count n p :: FunKind PState (PReply [k]) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Count

type App (Count n p :: FunKind PState (PReply [k]) -> Type) (s :: PState)
type App (l <|> r :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Alternative

type App (l <|> r :: FunKind PState (PReply a) -> Type) (s :: PState)
type App (Isolate n p :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Isolate

type App (Isolate n p :: FunKind PState (PReply a) -> Type) (s :: PState)
type App (While chPred p :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.While

type App (While chPred p :: FunKind PState (PReply a) -> Type) (s :: PState)
type App (f <$> p :: FunKind PState (PReply a2) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Functor

type App (f <$> p :: FunKind PState (PReply a2) -> Type) (s :: PState)
type App (l <*> r :: FunKind PState (PReply b) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Applicative

type App (l <*> r :: FunKind PState (PReply b) -> Type) (s :: PState)
type App (l >>= r :: FunKind PState (PReply b) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Monad

type App (l >>= r :: FunKind PState (PReply b) -> Type) (s :: PState)
type Demote (SReply sa :: PReply a -> Type) Source # 
Instance details

Defined in Symparsec.Parser

type Demote (SReply sa :: PReply a -> Type) = Reply String Natural (Demote sa)
type Demote (SResult sa :: PResult a -> Type) Source # 
Instance details

Defined in Symparsec.Parser

type family UnconsSymbol (a :: Symbol) :: Maybe (Char, Symbol) where ... #

This type family yields type-level Just storing the first character of a symbol and its tail if it is defined and Nothing otherwise.

Since: base-4.16.0.0

type family ConsSymbol (a :: Char) (b :: Symbol) :: Symbol where ... #

Extending a type-level symbol with a type-level character

Since: base-4.16.0.0

data Natural #

Natural number

Invariant: numbers <= 0xffffffffffffffff use the NS constructor

Instances

Instances details
PrintfArg Natural #

Since: base-4.8.0.0

Instance details

Defined in Text.Printf

Num Natural #

Note that Natural's Num instance isn't a ring: no element but 0 has an additive inverse. It is a semiring though.

Since: base-4.8.0.0

Instance details

Defined in GHC.Internal.Num

Show Natural #

Since: base-4.8.0.0

Instance details

Defined in GHC.Internal.Show

Eq Natural # 
Instance details

Defined in GHC.Num.Natural

Methods

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

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

Ord Natural # 
Instance details

Defined in GHC.Num.Natural

KnownNat n => HasResolution (n :: Nat) #

For example, Fixed 1000 will give you a Fixed with a resolution of 1000.

Instance details

Defined in Data.Fixed

Methods

resolution :: p n -> Integer #

TestCoercion SNat #

Since: base-4.18.0.0

Instance details

Defined in GHC.Internal.TypeNats

Methods

testCoercion :: forall (a :: Nat) (b :: Nat). SNat a -> SNat b -> Maybe (Coercion a b) #

TestEquality SNat #

Since: base-4.18.0.0

Instance details

Defined in GHC.Internal.TypeNats

Methods

testEquality :: forall (a :: Nat) (b :: Nat). SNat a -> SNat b -> Maybe (a :~: b) #

Demotable SNat # 
Instance details

Defined in Singleraeh.Demote

Associated Types

type Demote SNat 
Instance details

Defined in Singleraeh.Demote

Methods

demote :: forall (k1 :: Nat). SNat k1 -> Demote SNat #

Demotable SState Source # 
Instance details

Defined in Symparsec.Parser

Associated Types

type Demote SState 
Instance details

Defined in Symparsec.Parser

Methods

demote :: forall (k1 :: PState). SState k1 -> Demote SState #

KnownNat n => SingI (n :: Nat) # 
Instance details

Defined in Singleraeh.SingI

Associated Types

type Sing 
Instance details

Defined in Singleraeh.SingI

type Sing = SNat

Methods

sing' :: Sing n #

Demotable sa => Demotable (SReply sa :: PReply a -> Type) Source # 
Instance details

Defined in Symparsec.Parser

Associated Types

type Demote (SReply sa :: PReply a -> Type) 
Instance details

Defined in Symparsec.Parser

type Demote (SReply sa :: PReply a -> Type) = Reply String Natural (Demote sa)

Methods

demote :: forall (k1 :: PReply a). SReply sa k1 -> Demote (SReply sa) #

Demotable sa => Demotable (SResult sa :: PResult a -> Type) Source # 
Instance details

Defined in Symparsec.Parser

Associated Types

type Demote (SResult sa :: PResult a -> Type) 
Instance details

Defined in Symparsec.Parser

Methods

demote :: forall (k1 :: PResult a). SResult sa k1 -> Demote (SResult sa) #

type Sing # 
Instance details

Defined in Singleraeh.SingI

type Sing = SNat
type Demote SNat # 
Instance details

Defined in Singleraeh.Demote

type Demote SState Source # 
Instance details

Defined in Symparsec.Parser

type Compare (a :: Natural) (b :: Natural) # 
Instance details

Defined in GHC.Internal.Data.Type.Ord

type Compare (a :: Natural) (b :: Natural) = CmpNat a b
type App ShowNatDigitHexLowerSym (d :: Natural) # 
Instance details

Defined in TypeLevelShow.Natural.Digit

type App ShowNatDigitHexUpperSym (d :: Natural) # 
Instance details

Defined in TypeLevelShow.Natural.Digit

type App PExpr (s :: PState) Source # 
Instance details

Defined in Symparsec.Example.Expr

type App PExpr (s :: PState) = PExprNext s ('[] :: [ExprTok]) ('[] :: [Expr Natural]) (UnconsState s)
type App Eof (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Eof

type App Eof (s :: PState)
type App TakeRest (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.TakeRest

type App TakeRest (s :: PState)
type App TakeSym (n :: Natural) Source # 
Instance details

Defined in Symparsec.Parser.Take

type App TakeSym (n :: Natural) = Take n
type App ParseDigitBinSym (ch :: Char) Source # 
Instance details

Defined in Symparsec.Parser.Natural.Digits

type App ParseDigitDecSym (ch :: Char) Source # 
Instance details

Defined in Symparsec.Parser.Natural.Digits

type App ParseDigitHexSym (ch :: Char) Source # 
Instance details

Defined in Symparsec.Parser.Natural.Digits

type App ParseDigitOctSym (ch :: Char) Source # 
Instance details

Defined in Symparsec.Parser.Natural.Digits

type App (Ensure n :: FunKind PState (PReply ()) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Ensure

type App (Ensure n :: FunKind PState (PReply ()) -> Type) (s :: PState)
type App (Literal lit :: FunKind PState (PReply ()) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Literal

type App (Literal lit :: FunKind PState (PReply ()) -> Type) (s :: PState)
type App (SkipUnsafe n :: FunKind PState (PReply ()) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Skip

type App (SkipUnsafe n :: FunKind PState (PReply ()) -> Type) (s :: PState)
type App (Take n :: FunKind PState (PReply Symbol) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Take

type App (Take n :: FunKind PState (PReply Symbol) -> Type) (s :: PState)
type App (TakeWhile chPred :: FunKind PState (PReply Symbol) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.TakeWhile

type App (TakeWhile chPred :: FunKind PState (PReply Symbol) -> Type) (s :: PState)
type App (Empty :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Alternative

type App (Empty :: FunKind PState (PReply a) -> Type) (s :: PState) = 'Reply ('Err (Error1 "called empty parser") :: Result Symbol Natural a) s
type App (NatBase base parseDigit :: FunKind PState (PReply Natural) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Natural

type App (NatBase base parseDigit :: FunKind PState (PReply Natural) -> Type) (s :: PState)
type App (NatBaseWhile base parseDigit :: FunKind PState (PReply Natural) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Natural

type App (NatBaseWhile base parseDigit :: FunKind PState (PReply Natural) -> Type) (s :: PState)
type App (Try p :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Try

type App (Try p :: FunKind PState (PReply a) -> Type) (s :: PState)
type App (Pure a2 :: FunKind PState (PReply a1) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Applicative

type App (Pure a2 :: FunKind PState (PReply a1) -> Type) (s :: PState) = 'Reply ('OK a2 :: Result Symbol Natural a1) s
type App (IsolateSym p :: FunKind Natural (PParser a) -> Type) (n :: Natural) Source # 
Instance details

Defined in Symparsec.Parser.Isolate

type App (IsolateSym p :: FunKind Natural (PParser a) -> Type) (n :: Natural) = Isolate n p
type App (NatBase1 base parseDigit digit :: FunKind PState (PReply Natural) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Natural

type App (NatBase1 base parseDigit digit :: FunKind PState (PReply Natural) -> Type) (s :: PState)
type App (Count n p :: FunKind PState (PReply [k]) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Count

type App (Count n p :: FunKind PState (PReply [k]) -> Type) (s :: PState)
type App (l <|> r :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Alternative

type App (l <|> r :: FunKind PState (PReply a) -> Type) (s :: PState)
type App (Isolate n p :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Isolate

type App (Isolate n p :: FunKind PState (PReply a) -> Type) (s :: PState)
type App (While chPred p :: FunKind PState (PReply a) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.While

type App (While chPred p :: FunKind PState (PReply a) -> Type) (s :: PState)
type App (f <$> p :: FunKind PState (PReply a2) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Functor

type App (f <$> p :: FunKind PState (PReply a2) -> Type) (s :: PState)
type App (l <*> r :: FunKind PState (PReply b) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Applicative

type App (l <*> r :: FunKind PState (PReply b) -> Type) (s :: PState)
type App (l >>= r :: FunKind PState (PReply b) -> Type) (s :: PState) Source # 
Instance details

Defined in Symparsec.Parser.Monad

type App (l >>= r :: FunKind PState (PReply b) -> Type) (s :: PState)
type Demote (SReply sa :: PReply a -> Type) Source # 
Instance details

Defined in Symparsec.Parser

type Demote (SReply sa :: PReply a -> Type) = Reply String Natural (Demote sa)
type Demote (SResult sa :: PResult a -> Type) Source # 
Instance details

Defined in Symparsec.Parser

type family (a :: Natural) + (b :: Natural) :: Natural where ... infixl 6 #

Addition of type-level naturals.

Since: base-4.7.0.0

type family (a :: Natural) - (b :: Natural) :: Natural where ... infixl 6 #

Subtraction of type-level naturals.

Since: base-4.7.0.0

type family (a :: Natural) * (b :: Natural) :: Natural where ... infixl 7 #

Multiplication of type-level naturals.

Since: base-4.7.0.0

type ShowChar (ch :: Char) = ConsSymbol ch "" #

type (@@) (a1 :: a ~> k) (b :: a) = App a1 b infixl 9 #

An infix synonym for App.

Note: there is a term version which is a synonym to appLam.

type (~>) a b = Fun a b infixr 0 #

An infix synonmy for Fun.