Skip to content

Commit

Permalink
[ fix idris-lang#758 ] desugar to (>>)
Browse files Browse the repository at this point in the history
  • Loading branch information
gallais committed Feb 20, 2021
1 parent 339b82a commit 2353ca0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Idris/Desugar.idr
Original file line number Diff line number Diff line change
Expand Up @@ -432,14 +432,8 @@ mutual
expandDo side ps topfc ns (DoExp fc tm :: rest)
= do tm' <- desugar side ps tm
rest' <- expandDo side ps topfc ns rest
-- A free standing 'case' block must return ()
let ty = case tm' of
ICase _ _ _ _ => IVar fc (UN "Unit")
_ => Implicit fc False
gam <- get Ctxt
pure $ IApp fc (IApp fc (IVar fc (addNS ns (UN ">>="))) tm')
(ILam fc top Explicit Nothing
ty rest')
pure $ IApp fc (IApp fc (IVar fc (addNS ns (UN ">>"))) tm') rest'
expandDo side ps topfc ns (DoBind fc nameFC n tm :: rest)
= do tm' <- desugar side ps tm
rest' <- expandDo side ps topfc ns rest
Expand Down

0 comments on commit 2353ca0

Please sign in to comment.