mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-11-11 14:57:30 +03:00
Merge pull request #1364 from puffnfresh/neweffects-bad-constraints
Remove bad Applicative constraints from neweffects
This commit is contained in:
commit
99ebe20f15
@ -272,20 +272,19 @@ runEnv env prog = eff env prog (\r, env => pure (r ** env))
|
||||
|
||||
-- ----------------------------------------------- [ some higher order things ]
|
||||
|
||||
mapE : Applicative m => (a -> {xs} Eff b) -> List a -> {xs} Eff (List b)
|
||||
mapE : (a -> {xs} Eff b) -> List a -> {xs} Eff (List b)
|
||||
mapE f [] = pure []
|
||||
mapE f (x :: xs) = [| f x :: mapE f xs |]
|
||||
|
||||
|
||||
mapVE : Applicative m =>
|
||||
(a -> {xs} Eff b) ->
|
||||
Vect n a ->
|
||||
{xs} Eff (Vect n b)
|
||||
mapVE : (a -> {xs} Eff b) ->
|
||||
Vect n a ->
|
||||
{xs} Eff (Vect n b)
|
||||
mapVE f [] = pure []
|
||||
mapVE f (x :: xs) = [| f x :: mapVE f xs |]
|
||||
|
||||
|
||||
when : Applicative m => Bool -> Lazy ({xs} Eff ()) -> {xs} Eff ()
|
||||
when : Bool -> Lazy ({xs} Eff ()) -> {xs} Eff ()
|
||||
when True e = Force e
|
||||
when False e = pure ()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user