Skip to content

Commit

Permalink
Use 'with' to disambiguate defaults Envs
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinb committed Feb 6, 2014
1 parent 3dbd8bb commit 3921855
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions libs/neweffects/Effects.idr
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,14 @@ eff {xs = [l ::: x]} env (l :- prog) k

-- yuck :) Haven't got type class instances working nicely in tactic
-- proofs yet, so just brute force it.
syntax MkDefaultEnv = (| [], [default], [default, default],
[default, default, default],
[default, default, default, default],
[default, default, default, default, default],
[default, default, default, default, default, default],
[default, default, default, default, default, default, default],
[default, default, default, default, default, default, default, default] |)
syntax MkDefaultEnv = with Env
(| [], [default], [default, default],
[default, default, default],
[default, default, default, default],
[default, default, default, default, default],
[default, default, default, default, default, default],
[default, default, default, default, default, default, default],
[default, default, default, default, default, default, default, default] |)

run : Applicative m => {default MkDefaultEnv env : Env m xs} -> Eff m a xs xs' -> m a
run {env} prog = eff env prog (\r, env => pure r)
Expand Down

0 comments on commit 3921855

Please sign in to comment.