Skip to content

Commit

Permalink
Merge pull request #4 from Russoul/update
Browse files Browse the repository at this point in the history
Update to Idris2-bf87b623ef64244451d10c4b5460e8fc2f88c99a
  • Loading branch information
Russoul authored May 13, 2022
2 parents ea1daf5 + b4b0d00 commit b76dce1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
env:
SCHEME: scheme
IDRIS2_TESTS_CG: chez
IDRIS2_COMMIT: "0bc18bd34a53824cafa5a72d7790ca380648636a"
IDRIS2_COMMIT: "bf87b623ef64244451d10c4b5460e8fc2f88c99a"

jobs:
build:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
[![](https://github.com/Russoul/Idris2-Effect/workflows/Ubuntu/badge.svg)](https://github.com/Russoul/Idris2-Effect/actions?query=workflow%3A"Ubuntu")

Experimental effects library for Idris 2
<BR>Tested against [Idris 2, version 0.5.1-0bc18bd34](https://github.com/idris-lang/Idris2/tree/0bc18bd34a53824cafa5a72d7790ca380648636a)
<BR>Tested against [Idris 2, version 0.5.1-bf87b623e](https://github.com/idris-lang/Idris2/tree/bf87b623ef64244451d10c4b5460e8fc2f88c99a)


For an introduction, see [writing a parser via effects](/docs/example-parser.md)

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Effect/NonDet.idr
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Algebra
-- hdl : Handler ctx n (ListT m)
-- hdl' : Handler (List m) (ListT m) m
-- ? : Handler (List m . ctx) n m
EffectAlgebra.alg {f = Functor.Compose @{(ListM, %search)}}
EffectAlgebra.alg {f = Functor.Compose @{ListM}}
{ctx = ListM m . ctx}
{m} (ctxx :: pure [])
((~<~) @{%search} @{Functor.ListM} { ctx1 = ListM m
Expand Down
4 changes: 2 additions & 2 deletions src/Control/Effect/Writer.idr
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace Algebra
alg ctx hdl (Inl (Tell s)) = MkWriterT $ \_ => pure (ctx, s)
alg ctxx hdl (Inr x) = MkWriterT $ \r => do
res <- alg
{f = Functor.Compose @{(Functor.LeftPair, %search)}}
{f = Functor.Compose @{Functor.LeftPair}}
(ctxx, r) h x
pure res
where
Expand All @@ -45,7 +45,7 @@ namespace Algebra
-- h : Handler (,s) (WriterT s m) m
-- h ~<~ hdl : Handler ((, s) . ctx) n m
res <- alg
{f = Functor.Compose @{(Functor.LeftPair, %search)}}
{f = Functor.Compose @{Functor.LeftPair}}
(ctxx, r) h x
pure res
where
Expand Down
2 changes: 1 addition & 1 deletion tests/Main.idr
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ main = runner
[ testPaths "effect" allTests
] where
testPaths : String -> TestPool -> TestPool
testPaths dir = record { testCases $= map ((dir ++ "/") ++) }
testPaths dir = { testCases $= map ((dir ++ "/") ++) }

0 comments on commit b76dce1

Please sign in to comment.