Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Comb (repr :: Type -> Type) a where
- Pure :: Haskell a -> Comb repr a
- Satisfy :: Satisfiable repr tok => [ErrorItem tok] -> Haskell (tok -> Bool) -> Comb repr tok
- Item :: Satisfiable repr tok => Comb repr tok
- Try :: Comb repr a -> Comb repr a
- Look :: Comb repr a -> Comb repr a
- NegLook :: Comb repr a -> Comb repr ()
- Eof :: Comb repr ()
- (:<*>) :: Comb repr (a -> b) -> Comb repr a -> Comb repr b
- (:<|>) :: Comb repr a -> Comb repr a -> Comb repr a
- Empty :: Comb repr a
- Branch :: Comb repr (Either a b) -> Comb repr (a -> c) -> Comb repr (b -> c) -> Comb repr c
- Match :: Eq a => [Haskell (a -> Bool)] -> [Comb repr b] -> Comb repr a -> Comb repr b -> Comb repr b
- ChainPre :: Comb repr (a -> a) -> Comb repr a -> Comb repr a
- ChainPost :: Comb repr a -> Comb repr (a -> a) -> Comb repr a
- Def :: Name -> Comb repr a -> Comb repr a
- Ref :: Bool -> Name -> Comb repr a
- pattern (:<$>) :: Haskell (a -> b) -> Comb repr a -> Comb repr b
- pattern (:$>) :: Comb repr a -> Haskell b -> Comb repr b
- pattern (:<$) :: Haskell a -> Comb repr b -> Comb repr a
- pattern (:*>) :: Comb repr a -> Comb repr b -> Comb repr b
- pattern (:<*) :: Comb repr a -> Comb repr b -> Comb repr a
- newtype OptimizeComb letName repr a = OptimizeComb {
- unOptimizeComb :: Comb repr a
- optimizeComb :: Trans (OptimizeComb Name repr) repr => OptimizeComb Name repr a -> repr a
- optimizeCombNode :: Comb repr a -> Comb repr a
Type Comb
data Comb (repr :: Type -> Type) a where Source #
Pattern-matchable Comb
inators of the grammar.
(repr)
is not strictly necessary since it's only a phantom type
(no constructor use it as a value), but having it:
Pure :: Haskell a -> Comb repr a | |
Satisfy :: Satisfiable repr tok => [ErrorItem tok] -> Haskell (tok -> Bool) -> Comb repr tok | |
Item :: Satisfiable repr tok => Comb repr tok | |
Try :: Comb repr a -> Comb repr a | |
Look :: Comb repr a -> Comb repr a | |
NegLook :: Comb repr a -> Comb repr () | |
Eof :: Comb repr () | |
(:<*>) :: Comb repr (a -> b) -> Comb repr a -> Comb repr b infixl 4 | |
(:<|>) :: Comb repr a -> Comb repr a -> Comb repr a infixl 3 | |
Empty :: Comb repr a | |
Branch :: Comb repr (Either a b) -> Comb repr (a -> c) -> Comb repr (b -> c) -> Comb repr c | |
Match :: Eq a => [Haskell (a -> Bool)] -> [Comb repr b] -> Comb repr a -> Comb repr b -> Comb repr b | |
ChainPre :: Comb repr (a -> a) -> Comb repr a -> Comb repr a | |
ChainPost :: Comb repr a -> Comb repr (a -> a) -> Comb repr a | |
Def :: Name -> Comb repr a -> Comb repr a | |
Ref :: Bool -> Name -> Comb repr a |
Instances
Type OptimizeComb
newtype OptimizeComb letName repr a Source #
OptimizeComb | |
|
Instances
Letable letName (Comb repr) => Letable letName (OptimizeComb letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize def :: letName -> OptimizeComb letName repr a -> OptimizeComb letName repr a Source # ref :: Bool -> letName -> OptimizeComb letName repr a Source # | |
Trans3 (Comb repr) (OptimizeComb letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize trans3 :: (Comb repr a -> Comb repr b -> Comb repr c -> Comb repr d) -> OptimizeComb letName repr a -> OptimizeComb letName repr b -> OptimizeComb letName repr c -> OptimizeComb letName repr d Source # | |
Trans2 (Comb repr) (OptimizeComb letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize trans2 :: (Comb repr a -> Comb repr b -> Comb repr c) -> OptimizeComb letName repr a -> OptimizeComb letName repr b -> OptimizeComb letName repr c Source # | |
Trans1 (Comb repr) (OptimizeComb letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize trans1 :: (Comb repr a -> Comb repr b) -> OptimizeComb letName repr a -> OptimizeComb letName repr b Source # | |
Trans (Comb repr) (OptimizeComb letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize trans :: Comb repr a -> OptimizeComb letName repr a Source # | |
Lookable (OptimizeComb letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize look :: OptimizeComb letName repr a -> OptimizeComb letName repr a Source # negLook :: OptimizeComb letName repr a -> OptimizeComb letName repr () Source # eof :: OptimizeComb letName repr () Source # | |
Foldable (OptimizeComb letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize chainPre :: OptimizeComb letName repr (a -> a) -> OptimizeComb letName repr a -> OptimizeComb letName repr a Source # chainPost :: OptimizeComb letName repr a -> OptimizeComb letName repr (a -> a) -> OptimizeComb letName repr a Source # | |
Matchable (OptimizeComb letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize conditional :: Eq a => [Haskell (a -> Bool)] -> [OptimizeComb letName repr b] -> OptimizeComb letName repr a -> OptimizeComb letName repr b -> OptimizeComb letName repr b Source # match :: Eq a => [Haskell a] -> OptimizeComb letName repr a -> (Haskell a -> OptimizeComb letName repr b) -> OptimizeComb letName repr b -> OptimizeComb letName repr b Source # | |
Selectable (OptimizeComb letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize branch :: OptimizeComb letName repr (Either a b) -> OptimizeComb letName repr (a -> c) -> OptimizeComb letName repr (b -> c) -> OptimizeComb letName repr c Source # | |
Alternable (OptimizeComb letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize (<|>) :: OptimizeComb letName repr a -> OptimizeComb letName repr a -> OptimizeComb letName repr a Source # empty :: OptimizeComb letName repr a Source # try :: OptimizeComb letName repr a -> OptimizeComb letName repr a Source # (<+>) :: (Applicable (OptimizeComb letName repr), Alternable (OptimizeComb letName repr)) => OptimizeComb letName repr a -> OptimizeComb letName repr b -> OptimizeComb letName repr (Either a b) Source # | |
Applicable (OptimizeComb letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize (<$>) :: Haskell (a -> b) -> OptimizeComb letName repr a -> OptimizeComb letName repr b Source # (<&>) :: OptimizeComb letName repr a -> Haskell (a -> b) -> OptimizeComb letName repr b Source # (<$) :: Haskell a -> OptimizeComb letName repr b -> OptimizeComb letName repr a Source # ($>) :: OptimizeComb letName repr a -> Haskell b -> OptimizeComb letName repr b Source # pure :: Haskell a -> OptimizeComb letName repr a Source # (<*>) :: OptimizeComb letName repr (a -> b) -> OptimizeComb letName repr a -> OptimizeComb letName repr b Source # liftA2 :: Haskell (a -> b -> c) -> OptimizeComb letName repr a -> OptimizeComb letName repr b -> OptimizeComb letName repr c Source # (<*) :: OptimizeComb letName repr a -> OptimizeComb letName repr b -> OptimizeComb letName repr a Source # (*>) :: OptimizeComb letName repr a -> OptimizeComb letName repr b -> OptimizeComb letName repr b Source # (<**>) :: OptimizeComb letName repr a -> OptimizeComb letName repr (a -> b) -> OptimizeComb letName repr b Source # | |
Trans (Comb repr) repr => Trans (OptimizeComb letName repr) repr Source # | |
Defined in Symantic.Parser.Grammar.Optimize trans :: OptimizeComb letName repr a -> repr a Source # | |
Satisfiable repr tok => Satisfiable (OptimizeComb letName repr) tok Source # | |
Defined in Symantic.Parser.Grammar.Optimize | |
Trans (OptimizeComb letName repr) (Comb repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize trans :: OptimizeComb letName repr a -> Comb repr a Source # | |
type Output (OptimizeComb _letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize |
optimizeComb :: Trans (OptimizeComb Name repr) repr => OptimizeComb Name repr a -> repr a Source #
optimizeCombNode :: Comb repr a -> Comb repr a Source #
Orphan instances
MakeLetName Name Source # | |
makeLetName :: SharingName -> IO Name Source # |