Module AST.ASM

Summary of exported operations:

returnP :: a -> [(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])   
failP :: String -> [(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])   
(>+=) :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> (a -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])   
(>+) :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])   
(<$>) :: (a -> b) -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])   
(<*>) :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String (a -> b),[(((Int,Int),(Int,Int)),Token)])) -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])   
mapM :: (a -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])) -> [a] -> [(((Int,Int),(Int,Int)),Token)] -> (Either String [b],[(((Int,Int),(Int,Int)),Token)])   
readSpan :: [(((Int,Int),(Int,Int)),Token)] -> (Either String ((Int,Int),(Int,Int)),[(((Int,Int),(Int,Int)),Token)])   
readToken :: [(((Int,Int),(Int,Int)),Token)] -> (Either String Token,[(((Int,Int),(Int,Int)),Token)])   
ensure :: Show a => Bool -> a -> [(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])   
tokenSpan :: Token -> [(((Int,Int),(Int,Int)),Token)] -> (Either String ((Int,Int),(Int,Int)),[(((Int,Int),(Int,Int)),Token)])   
getTokenSpan :: [(((Int,Int),(Int,Int)),Token)] -> (Either String (((Int,Int),(Int,Int)),Token),[(((Int,Int),(Int,Int)),Token)])   
tokenSpanOneOf :: Token -> Token -> [(((Int,Int),(Int,Int)),Token)] -> (Either String ((Int,Int),(Int,Int)),[(((Int,Int),(Int,Int)),Token)])   
sepBy :: (a -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])) -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String ((Int,Int),(Int,Int)),[(((Int,Int),(Int,Int)),Token)])) -> [a] -> [(((Int,Int),(Int,Int)),Token)] -> (Either String ([b],[((Int,Int),(Int,Int))]),[(((Int,Int),(Int,Int)),Token)])   
between :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])) -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String c,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (a,b,c),[(((Int,Int),(Int,Int)),Token)])   
parens :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (((Int,Int),(Int,Int)),a,((Int,Int),(Int,Int))),[(((Int,Int),(Int,Int)),Token)])   
brackets :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (((Int,Int),(Int,Int)),a,((Int,Int),(Int,Int))),[(((Int,Int),(Int,Int)),Token)])   
braces :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (((Int,Int),(Int,Int)),a,((Int,Int),(Int,Int))),[(((Int,Int),(Int,Int)),Token)])   
optional :: (a -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])) -> Maybe a -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (Maybe b),[(((Int,Int),(Int,Int)),Token)])   
maybeOneOf :: Token -> Token -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (Maybe ((Int,Int),(Int,Int))),[(((Int,Int),(Int,Int)),Token)])   
maybeTokenSpan :: Token -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (Maybe ((Int,Int),(Int,Int))),[(((Int,Int),(Int,Int)),Token)])   
maybeEnclosedBy :: [(Token,Token)] -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (Maybe ((Int,Int),(Int,Int)),a,Maybe ((Int,Int),(Int,Int))),[(((Int,Int),(Int,Int)),Token)])   
maybeParens :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (Maybe ((Int,Int),(Int,Int)),a,Maybe ((Int,Int),(Int,Int))),[(((Int,Int),(Int,Int)),Token)])   
choose :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])   

Exported datatypes:


SpanTokens

Type synonym: SpanTokens = [(Span,Token)]


ASM

Type synonym: ASM a = SpanTokens -> (Either String a,SpanTokens)


Exported operations:

returnP :: a -> [(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])   

Further infos:
  • solution complete, i.e., able to compute all solutions

failP :: String -> [(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])   

Further infos:
  • solution complete, i.e., able to compute all solutions

(>+=) :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> (a -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])   

(>+) :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])   

(<$>) :: (a -> b) -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])   

(<*>) :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String (a -> b),[(((Int,Int),(Int,Int)),Token)])) -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])   

mapM :: (a -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])) -> [a] -> [(((Int,Int),(Int,Int)),Token)] -> (Either String [b],[(((Int,Int),(Int,Int)),Token)])   

readSpan :: [(((Int,Int),(Int,Int)),Token)] -> (Either String ((Int,Int),(Int,Int)),[(((Int,Int),(Int,Int)),Token)])   

Further infos:
  • solution complete, i.e., able to compute all solutions

readToken :: [(((Int,Int),(Int,Int)),Token)] -> (Either String Token,[(((Int,Int),(Int,Int)),Token)])   

Further infos:
  • solution complete, i.e., able to compute all solutions

ensure :: Show a => Bool -> a -> [(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])   

tokenSpan :: Token -> [(((Int,Int),(Int,Int)),Token)] -> (Either String ((Int,Int),(Int,Int)),[(((Int,Int),(Int,Int)),Token)])   

getTokenSpan :: [(((Int,Int),(Int,Int)),Token)] -> (Either String (((Int,Int),(Int,Int)),Token),[(((Int,Int),(Int,Int)),Token)])   

Further infos:
  • solution complete, i.e., able to compute all solutions

tokenSpanOneOf :: Token -> Token -> [(((Int,Int),(Int,Int)),Token)] -> (Either String ((Int,Int),(Int,Int)),[(((Int,Int),(Int,Int)),Token)])   

sepBy :: (a -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])) -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String ((Int,Int),(Int,Int)),[(((Int,Int),(Int,Int)),Token)])) -> [a] -> [(((Int,Int),(Int,Int)),Token)] -> (Either String ([b],[((Int,Int),(Int,Int))]),[(((Int,Int),(Int,Int)),Token)])   

between :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])) -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String c,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (a,b,c),[(((Int,Int),(Int,Int)),Token)])   

parens :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (((Int,Int),(Int,Int)),a,((Int,Int),(Int,Int))),[(((Int,Int),(Int,Int)),Token)])   

brackets :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (((Int,Int),(Int,Int)),a,((Int,Int),(Int,Int))),[(((Int,Int),(Int,Int)),Token)])   

braces :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (((Int,Int),(Int,Int)),a,((Int,Int),(Int,Int))),[(((Int,Int),(Int,Int)),Token)])   

optional :: (a -> [(((Int,Int),(Int,Int)),Token)] -> (Either String b,[(((Int,Int),(Int,Int)),Token)])) -> Maybe a -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (Maybe b),[(((Int,Int),(Int,Int)),Token)])   

maybeOneOf :: Token -> Token -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (Maybe ((Int,Int),(Int,Int))),[(((Int,Int),(Int,Int)),Token)])   

maybeTokenSpan :: Token -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (Maybe ((Int,Int),(Int,Int))),[(((Int,Int),(Int,Int)),Token)])   

maybeEnclosedBy :: [(Token,Token)] -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (Maybe ((Int,Int),(Int,Int)),a,Maybe ((Int,Int),(Int,Int))),[(((Int,Int),(Int,Int)),Token)])   

maybeParens :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String (Maybe ((Int,Int),(Int,Int)),a,Maybe ((Int,Int),(Int,Int))),[(((Int,Int),(Int,Int)),Token)])   

choose :: ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> ([(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])) -> [(((Int,Int),(Int,Int)),Token)] -> (Either String a,[(((Int,Int),(Int,Int)),Token)])