mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2025-01-05 03:17:21 +03:00
Lift ! out of 'let' in do blocks
This commit is contained in:
parent
cf27bbed66
commit
8d8d281fb4
@ -388,10 +388,13 @@ mutual
|
||||
(PatClause fc bpat rest'
|
||||
:: alts')))
|
||||
expandDo side ps topfc (DoLet fc n rig ty tm :: rest)
|
||||
= do tm' <- desugar side ps tm
|
||||
= do b <- newRef Bang initBangs
|
||||
tm' <- desugarB side ps tm
|
||||
ty' <- desugar side ps ty
|
||||
rest' <- expandDo side ps topfc rest
|
||||
pure $ ILet fc rig n ty' tm' rest'
|
||||
let bind = ILet fc rig n ty' tm' rest'
|
||||
bd <- get Bang
|
||||
pure $ bindBangs (bangNames bd) bind
|
||||
expandDo side ps topfc (DoLetPat fc pat ty tm alts :: rest)
|
||||
= do pat' <- desugar LHS ps pat
|
||||
ty' <- desugar side ps ty
|
||||
|
@ -159,7 +159,8 @@ mutual
|
||||
arg <- implicitArg fname indents
|
||||
pure (ImpArg (fst arg) (snd arg))
|
||||
<|> if withOK q
|
||||
then do symbol "|"
|
||||
then do continue indents
|
||||
symbol "|"
|
||||
arg <- expr (record { withOK = False} q) fname indents
|
||||
pure (WithArg arg)
|
||||
else fail "| not allowed here"
|
||||
|
Loading…
Reference in New Issue
Block a user