Skip to content

Commit

Permalink
add /pure and /bind to do-block calls
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorTaelin committed Oct 18, 2024
1 parent 6198eaa commit af10c14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Kind/Parse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,8 @@ desugarDo :: DoBlck -> Parser Term
desugarDo (DoBlck name stmts wrap ret) = do
(_, uses) <- P.getState
let exName = expandUses uses name
let mkBind = \ x exp acc -> App (App (App (App (Ref (exName ++ "bind")) (Met 0 [])) (Met 0 [])) exp) (Lam x (\_ -> acc))
let mkWrap = \ ret -> App (App (Ref (exName ++ "pure")) (Met 0 [])) ret
let mkBind = \ x exp acc -> App (App (App (App (Ref (exName ++ "/bind")) (Met 0 [])) (Met 0 [])) exp) (Lam x (\_ -> acc))
let mkWrap = \ ret -> App (App (Ref (exName ++ "/pure")) (Met 0 [])) ret
return $ foldr (\stmt acc ->
case stmt of
DoBind x exp -> mkBind x exp acc
Expand Down

0 comments on commit af10c14

Please sign in to comment.