Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- checkBlock (BlockStmt (VRet:bs)) = do
- env <- ask
- let mt = M.lookup "" env
- Control.Monad.when (isNothing mt) $ throwError defaultErr
- let rt = fromMaybe (error "wrong return type") mt
- Control.Monad.when (rt /= TV) $ throwError defaultErr
- checkBlock (BlockStmt bs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement