on master help sign in
Eff note for the future...
commitb27ad3eaf40f7d93cda15bc9d0c5f97f56f90e74 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateThu 28 Mar 2013, 12:17 (14 years ago) parentfd9e0fb
1 file changed+5−1
effects/Effects.idr+5−1
effects/Effects.idr+5−1
@@ -175,8 +175,12 @@ eff env (new r prog) k
175175eff env (catch prog handler) k
176176 = catch (eff env prog k)
177177 (\e => eff env (handler e) k)
178+-- FIXME:
179+-- xs is needed explicitly because otherwise the pattern binding for
180+-- 'l' appears too late. Solution seems to be to reorder patterns at the
181+-- end so that everything is in scope when it needs to be.
178182eff {xs = [l ::: x]} env (l :- prog) k
179− = let env' = unlabel {l} env in
183+ = let env' = unlabel env in
180184 eff env' prog (\envk, p' => k (relabel l envk) p')
181185
182186run : Applicative m => Env m xs -> EffM m xs xs' a -> m a