on master help sign in
Merge pull request #1364 from puffnfresh/neweffects-bad-constraints
99ebe20Edwin Brady
libs/neweffects/Effects.idr+5−6
@@ -272,20 +272,19 @@ runEnv env prog = eff env prog (\r, env => pure (r ** env))
272
272
273-- ----------------------------------------------- [ some higher order things ]
273-- ----------------------------------------------- [ some higher order things ]
274
274
275−mapE : Applicative m => (a -> {xs} Eff b) -> List a -> {xs} Eff (List b)
275+mapE : (a -> {xs} Eff b) -> List a -> {xs} Eff (List b)
276mapE f [] = pure []
276mapE f [] = pure []
277mapE f (x :: xs) = [| f x :: mapE f xs |]
277mapE f (x :: xs) = [| f x :: mapE f xs |]
278
278
279
279
280−mapVE : Applicative m =>
281− (a -> {xs} Eff b) ->
280+mapVE : (a -> {xs} Eff b) ->
282− Vect n a ->
281+ Vect n a ->
283− {xs} Eff (Vect n b)
282+ {xs} Eff (Vect n b)
284mapVE f [] = pure []
283mapVE f [] = pure []
285mapVE f (x :: xs) = [| f x :: mapVE f xs |]
284mapVE f (x :: xs) = [| f x :: mapVE f xs |]
286
285
287
286
288−when : Applicative m => Bool -> Lazy ({xs} Eff ()) -> {xs} Eff ()
287+when : Bool -> Lazy ({xs} Eff ()) -> {xs} Eff ()
289when True e = Force e
288when True e = Force e
290when False e = pure ()
289when False e = pure ()
291
290