Safe Haskell | None |
---|---|

Language | Haskell98 |

- type Instance = IRec
- data SorI
- type IRec = (SorI, Id)
- data Useless
- data SRule_
- type NTType = Id -> InsAttVals -> M Foo
- type SeqType = Id -> InsAttVals -> [SemRule] -> Result -> M Foo
- type AltType = NTType
- type SemRule = (Instance, (InsAttVals, Id) -> InsAttVals)
- data Tree a
- type NodeName = MemoL
- type Start1 = (Int, InsAttVals)
- type Start = ((Int, InsAttVals), [String])
- type End = (Int, InsAttVals)
- type Atts = [AttValue]
- type InsAttVals = [(Instance, Atts)]
- type Mtable = [(MemoL, [(Start1, (Context, Result))])]
- type Result = [((Start1, End), [Tree MemoL])]
- type State = Mtable
- type Context = ([MemoL], [(Int, [(MemoL, Int)])])
- type M a = Start -> Context -> StateM a
- type Seq a = Id -> InsAttVals -> [SemRule] -> Result -> Start -> Context -> StateM a
- type Foo = (Context, Result)
- newtype StateM t = State {}
- get :: StateM State
- put :: State -> StateM ()
- modify :: (State -> State) -> StateM ()
- (<|>) :: AltType -> AltType -> AltType
- (*>) :: SeqType -> SeqType -> SeqType
- pickEnd :: (((t1, t2), (t4, t3)), t) -> (t4, [t5])
- addP :: [(((Int, InsAttVals), (Int, InsAttVals)), [Tree NodeName])] -> (((Int, InsAttVals), (Int, InsAttVals)), [Tree NodeName]) -> [(((Int, [t]), (Int, [t1])), [Tree NodeName])]
- addToBranch :: ((Start1, End), [Tree NodeName]) -> ((Start1, End), [Tree NodeName]) -> [Tree NodeName]
- empty_cuts :: ([t], [t1])
- empty :: [(Instance, Atts)] -> M Foo
- term :: String -> Instance -> [(Instance, Atts)] -> [(Instance, Atts)] -> M Foo
- memoize :: MemoL -> (Id -> [(Instance, Atts)] -> ((Int, t), [a1]) -> ([t1], [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], b), Result)) -> Id -> [(Instance, Atts)] -> ((Int, t), [a1]) -> (a2, [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], [(Int, [(MemoL, Int)])]), [(((Int, InsAttVals), (Int, [((SorI, Id), [AttValue])])), [Tree a])])
- findContext :: Eq t => [(t, t1)] -> t -> [(t, t1)]
- funccount :: (Num a, Eq a2, Eq a1) => [(a2, [(a1, a)])] -> a2 -> a1 -> a
- fst1 :: [(t, t1)] -> t
- snd1 :: [(t, t1)] -> t1
- makeContext :: Eq t1 => [t1] -> [(t, [(t1, t2)])] -> ([t1], [(t, [(t1, t2)])])
- makeContext_ :: Eq t => [t] -> [(t, t1)] -> [(t, t1)]
- makeContext__ :: Eq t => t -> [(t, t1)] -> [(t, t1)]
- incContext :: (Num t1, Eq t2, Eq t) => [(t2, [(t, t1)])] -> t -> t2 -> [(t2, [(t, t1)])]
- addNT :: (Num t1, Eq a) => [(a, t1)] -> a -> t -> [(a, t1)]
- addNode :: NodeName -> (SorI, Id) -> (t, [(Instance, Atts)]) -> [(((Int, t1), (Int, [((SorI, t2), [AttValue])])), [a])] -> [(((Int, t1), (Int, [((SorI, Id), [AttValue])])), [Tree a1])]
- mapName :: t1 -> [(t, t2)] -> [(t1, t2)]
- packAmb :: (Eq a3, Eq a2) => [(((a2, t1), (a3, [(t, [a])])), [a1])] -> [(((a2, t1), (a3, [(t, [a])])), [a1])]
- isEq :: (Eq a1, Eq a) => ((a, t), (a1, t1)) -> ((a, t2), (a1, t3)) -> Bool
- lookupT :: (Ord a2, Eq a3, Eq t2, Eq a1, Eq t1, Eq t, Eq a) => a -> a3 -> [(a3, [(a1, a2)])] -> [(a, [((a3, t2), (([t], [(a3, [(a1, a2)])]), t1))])] -> Maybe [(([t], [(a3, [(a1, a2)])]), t1)]
- lookupT1 :: (Ord a2, Eq a3, Eq t2, Eq a1, Eq t1, Eq t, Eq a) => a -> a3 -> [(a3, [(a1, a2)])] -> [(a, [((a3, t2), (([t], [(a3, [(a1, a2)])]), t1))])] -> [(([t], [(a3, [(a1, a2)])]), t1)]
- lookupRes :: Eq a => [((a, t1), t)] -> a -> [t]
- checkUsability :: (Ord a1, Eq a2, Eq a, Eq t) => a2 -> [(a2, [(a, a1)])] -> [(([t], [(a2, [(a, a1)])]), t1)] -> [(([t], [(a2, [(a, a1)])]), t1)]
- findInp :: Eq a => a -> [(a, [t])] -> [t]
- checkUsability_ :: (Ord a1, Eq a) => [(a, a1)] -> [(a, a1)] -> [(t, t1)] -> [(t, t1)]
- condCheck :: (Ord a1, Eq a) => [(a, a1)] -> [(a, a1)] -> [Bool]
- condCheck_ :: (Ord a1, Eq a) => [(a, a1)] -> (a, a1) -> Bool
- udt :: (Context, Result) -> State -> MemoL -> Start1 -> State
- update :: (Eq a1, Eq a, Eq t1) => [(a, [((t1, [a1]), t)])] -> a -> (t1, [a1]) -> t -> [(a, [((t1, [a1]), t)])]
- my_merge :: (Eq a1, Eq a) => (a1, [a]) -> t -> [((a1, [a]), t)] -> [((a1, [a]), t)]
- pickResult :: ((t1, t2), t) -> t2
- terminal :: ((SorI, t5) -> [((SorI, t5), t4)] -> t2 -> ((t7, [t8]), t6) -> t3 -> t) -> t4 -> t5 -> t2 -> ((t7, t1), t6) -> t3 -> t
- nt :: NTType -> Id -> SeqType
- parser :: SeqType -> [SemRule] -> Id -> InsAttVals -> M Foo
- mapSynthesize :: [([(Instance, Atts)], t1) -> [((t7, t5), t6)]] -> [(((t2, t3), (t4, [((t7, t1), t6)])), [Tree t8])] -> t -> t1 -> [(((t2, t3), (t4, [((t7, t1), t6)])), [Tree t8])]
- mapInherited :: [([(Instance, Atts)], t3) -> [a]] -> [(((t, t1), (t2, [(Instance, Atts)])), [Tree t4])] -> [(Instance, Atts)] -> t3 -> [a]
- gMax :: [(t, [AttValue])] -> [(t, [AttValue])]
- groupAtts :: [(t, [a])] -> [(t, [a])]
- findAtts :: Tree t -> [(Instance, Atts)]
- addAtts :: [a] -> [a] -> [a]
- rule_i :: (t4 -> AttValue) -> t -> t3 -> t1 -> (t2 -> a -> AttValue) -> t2 -> ((SorI, t3), a -> [((SorI, t3), [AttValue])])
- rule_s :: (t4 -> AttValue) -> t -> t3 -> t1 -> (t2 -> a -> AttValue) -> t2 -> ((SorI, t3), a -> [((SorI, t3), [AttValue])])
- rule :: t3 -> (t5 -> AttValue) -> t -> t4 -> t1 -> (t2 -> a -> AttValue) -> t2 -> ((t3, t4), a -> [((t3, t4), [AttValue])])
- synthesized :: (a -> AttValue) -> Useless -> Id -> [(Instance, Atts)] -> Id -> [AttValue]
- inherited :: (a -> AttValue) -> Useless -> Id -> [(Instance, Atts)] -> Id -> [AttValue]
- valOf :: SorI -> (a -> AttValue) -> Useless -> Id -> [(Instance, Atts)] -> Id -> [AttValue]
- getAttVals :: Instance -> [(Instance, Atts)] -> (a -> AttValue) -> [AttValue]
- apply :: [(Instance, Atts)] -> Id -> ([(Instance, Atts)] -> Id -> AttValue) -> Int
- apply_ :: t -> t1 -> (t -> t1 -> AttValue) -> Int -> Int -> Int
- apply__ :: [(Instance, Atts)] -> Id -> ([(Instance, Atts)] -> Id -> AttValue) -> DisplayTree
- applyMax :: t -> t1 -> (t -> t1 -> [AttValue]) -> Int
- getMax :: AttValue -> AttValue -> AttValue
- findMax :: [t -> t1 -> [AttValue]] -> (t, t1) -> AttValue
- convertRep :: [t -> t1 -> [AttValue]] -> (t, t1) -> AttValue
- makeTree :: [[(Instance, Atts)] -> Id -> AttValue] -> ([(Instance, Atts)], Id) -> AttValue
- mt :: [DisplayTree] -> DisplayTree
- applyBiOp :: [t -> t1 -> [AttValue]] -> (t, t1) -> AttValue
- getAtts :: (a -> t) -> (t1, t2) -> (t1 -> t2 -> [a]) -> t
- copy :: [t -> t1 -> [a]] -> (t, t1) -> a
- getTypVal :: Eq a => [(t1 -> a, a -> t)] -> a -> t
- toTree :: [[(Instance, Atts)] -> Id -> AttValue] -> ([(Instance, Atts)], Id) -> AttValue
- start :: Id -> [(Instance, Atts)] -> ((Int, InsAttVals), [String]) -> (a1, [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], [(Int, [(MemoL, Int)])]), [(((Int, InsAttVals), (Int, [((SorI, Id), [AttValue])])), [Tree a])])
- tree :: Id -> [(Instance, Atts)] -> ((Int, InsAttVals), [String]) -> ([MemoL], [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], [(Int, [(MemoL, Int)])]), [(((Int, InsAttVals), (Int, [((SorI, Id), [AttValue])])), [Tree MemoL])])
- num :: Id -> [(Instance, Atts)] -> ((Int, InsAttVals), [String]) -> (a1, [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], [(Int, [(MemoL, Int)])]), [(((Int, InsAttVals), (Int, [((SorI, Id), [AttValue])])), [Tree a])])
- eT :: Id -> [(Instance, Atts)] -> ((Int, InsAttVals), [String]) -> (a1, [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], [(Int, [(MemoL, Int)])]), [(((Int, InsAttVals), (Int, [((SorI, Id), [AttValue])])), [Tree a])])
- expr :: Id -> [(Instance, Atts)] -> ((Int, InsAttVals), [String]) -> ([MemoL], [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], [(Int, [(MemoL, Int)])]), [(((Int, InsAttVals), (Int, [((SorI, Id), [AttValue])])), [Tree MemoL])])
- op :: Id -> [(Instance, Atts)] -> ((Int, InsAttVals), [String]) -> (a1, [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], [(Int, [(MemoL, Int)])]), [(((Int, InsAttVals), (Int, [((SorI, Id), [AttValue])])), [Tree a])])
- po :: PP' a => (String -> IO ()) -> a -> IO ()
- render80 :: Doc -> String
- class PP' a where
- showID :: Show a => (t, a) -> String
- formatAttsFinalAlt :: MemoL -> Int -> State -> IO [Doc]

# Documentation

type SemRule = (Instance, (InsAttVals, Id) -> InsAttVals) Source

type Start1 = (Int, InsAttVals) Source

type Start = ((Int, InsAttVals), [String]) Source

type End = (Int, InsAttVals) Source

type InsAttVals = [(Instance, Atts)] Source

addP :: [(((Int, InsAttVals), (Int, InsAttVals)), [Tree NodeName])] -> (((Int, InsAttVals), (Int, InsAttVals)), [Tree NodeName]) -> [(((Int, [t]), (Int, [t1])), [Tree NodeName])] Source

addToBranch :: ((Start1, End), [Tree NodeName]) -> ((Start1, End), [Tree NodeName]) -> [Tree NodeName] Source

empty_cuts :: ([t], [t1]) Source

memoize :: MemoL -> (Id -> [(Instance, Atts)] -> ((Int, t), [a1]) -> ([t1], [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], b), Result)) -> Id -> [(Instance, Atts)] -> ((Int, t), [a1]) -> (a2, [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], [(Int, [(MemoL, Int)])]), [(((Int, InsAttVals), (Int, [((SorI, Id), [AttValue])])), [Tree a])]) Source

findContext :: Eq t => [(t, t1)] -> t -> [(t, t1)] Source

makeContext :: Eq t1 => [t1] -> [(t, [(t1, t2)])] -> ([t1], [(t, [(t1, t2)])]) Source

makeContext_ :: Eq t => [t] -> [(t, t1)] -> [(t, t1)] Source

makeContext__ :: Eq t => t -> [(t, t1)] -> [(t, t1)] Source

incContext :: (Num t1, Eq t2, Eq t) => [(t2, [(t, t1)])] -> t -> t2 -> [(t2, [(t, t1)])] Source

addNode :: NodeName -> (SorI, Id) -> (t, [(Instance, Atts)]) -> [(((Int, t1), (Int, [((SorI, t2), [AttValue])])), [a])] -> [(((Int, t1), (Int, [((SorI, Id), [AttValue])])), [Tree a1])] Source

packAmb :: (Eq a3, Eq a2) => [(((a2, t1), (a3, [(t, [a])])), [a1])] -> [(((a2, t1), (a3, [(t, [a])])), [a1])] Source

lookupT :: (Ord a2, Eq a3, Eq t2, Eq a1, Eq t1, Eq t, Eq a) => a -> a3 -> [(a3, [(a1, a2)])] -> [(a, [((a3, t2), (([t], [(a3, [(a1, a2)])]), t1))])] -> Maybe [(([t], [(a3, [(a1, a2)])]), t1)] Source

lookupT1 :: (Ord a2, Eq a3, Eq t2, Eq a1, Eq t1, Eq t, Eq a) => a -> a3 -> [(a3, [(a1, a2)])] -> [(a, [((a3, t2), (([t], [(a3, [(a1, a2)])]), t1))])] -> [(([t], [(a3, [(a1, a2)])]), t1)] Source

checkUsability :: (Ord a1, Eq a2, Eq a, Eq t) => a2 -> [(a2, [(a, a1)])] -> [(([t], [(a2, [(a, a1)])]), t1)] -> [(([t], [(a2, [(a, a1)])]), t1)] Source

checkUsability_ :: (Ord a1, Eq a) => [(a, a1)] -> [(a, a1)] -> [(t, t1)] -> [(t, t1)] Source

condCheck_ :: (Ord a1, Eq a) => [(a, a1)] -> (a, a1) -> Bool Source

update :: (Eq a1, Eq a, Eq t1) => [(a, [((t1, [a1]), t)])] -> a -> (t1, [a1]) -> t -> [(a, [((t1, [a1]), t)])] Source

pickResult :: ((t1, t2), t) -> t2 Source

terminal :: ((SorI, t5) -> [((SorI, t5), t4)] -> t2 -> ((t7, [t8]), t6) -> t3 -> t) -> t4 -> t5 -> t2 -> ((t7, t1), t6) -> t3 -> t Source

mapSynthesize :: [([(Instance, Atts)], t1) -> [((t7, t5), t6)]] -> [(((t2, t3), (t4, [((t7, t1), t6)])), [Tree t8])] -> t -> t1 -> [(((t2, t3), (t4, [((t7, t1), t6)])), [Tree t8])] Source

mapInherited :: [([(Instance, Atts)], t3) -> [a]] -> [(((t, t1), (t2, [(Instance, Atts)])), [Tree t4])] -> [(Instance, Atts)] -> t3 -> [a] Source

rule_i :: (t4 -> AttValue) -> t -> t3 -> t1 -> (t2 -> a -> AttValue) -> t2 -> ((SorI, t3), a -> [((SorI, t3), [AttValue])]) Source

rule_s :: (t4 -> AttValue) -> t -> t3 -> t1 -> (t2 -> a -> AttValue) -> t2 -> ((SorI, t3), a -> [((SorI, t3), [AttValue])]) Source

rule :: t3 -> (t5 -> AttValue) -> t -> t4 -> t1 -> (t2 -> a -> AttValue) -> t2 -> ((t3, t4), a -> [((t3, t4), [AttValue])]) Source

convertRep :: [t -> t1 -> [AttValue]] -> (t, t1) -> AttValue Source

mt :: [DisplayTree] -> DisplayTree Source

start :: Id -> [(Instance, Atts)] -> ((Int, InsAttVals), [String]) -> (a1, [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], [(Int, [(MemoL, Int)])]), [(((Int, InsAttVals), (Int, [((SorI, Id), [AttValue])])), [Tree a])]) Source

tree :: Id -> [(Instance, Atts)] -> ((Int, InsAttVals), [String]) -> ([MemoL], [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], [(Int, [(MemoL, Int)])]), [(((Int, InsAttVals), (Int, [((SorI, Id), [AttValue])])), [Tree MemoL])]) Source

num :: Id -> [(Instance, Atts)] -> ((Int, InsAttVals), [String]) -> (a1, [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], [(Int, [(MemoL, Int)])]), [(((Int, InsAttVals), (Int, [((SorI, Id), [AttValue])])), [Tree a])]) Source

eT :: Id -> [(Instance, Atts)] -> ((Int, InsAttVals), [String]) -> (a1, [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], [(Int, [(MemoL, Int)])]), [(((Int, InsAttVals), (Int, [((SorI, Id), [AttValue])])), [Tree a])]) Source

expr :: Id -> [(Instance, Atts)] -> ((Int, InsAttVals), [String]) -> ([MemoL], [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], [(Int, [(MemoL, Int)])]), [(((Int, InsAttVals), (Int, [((SorI, Id), [AttValue])])), [Tree MemoL])]) Source

op :: Id -> [(Instance, Atts)] -> ((Int, InsAttVals), [String]) -> (a1, [(Int, [(MemoL, Int)])]) -> StateM (([MemoL], [(Int, [(MemoL, Int)])]), [(((Int, InsAttVals), (Int, [((SorI, Id), [AttValue])])), [Tree a])]) Source