parse Handlers

This commit is contained in:
Runar Bjarnason 2018-07-23 16:26:19 -04:00
parent 925c32bb6a
commit 2c6c19ca25

View File

@ -158,9 +158,13 @@ lam p = mkLam <$> P.try (some prefixVar <* reserved "->") <*> p
mkLam vs b = Term.lam' (ann (head vs) <> ann b) (map L.payload vs) b
letBlock, handle, ifthen, and, or, infixApp :: Var v => TermP v
letBlock = undefined
letBlock = block "let"
handle = undefined
handle = do
t <- reserved "handle"
handler <- term
b <- block "in"
pure $ Term.handle (ann t <> ann b) handler b
ifthen = undefined