redprl / algaeff Goto Github PK
View Code? Open in Web Editor NEW🦠 Reusable components based on algebraic effects
License: Apache License 2.0
🦠 Reusable components based on algebraic effects
License: Apache License 2.0
I noticed that the functors in this library are applicative, but I don't think that's the right semantics... Is it?
@jonsterling proposed a plan to coordinate releases in #24 in the face of the next major release with breaking changes. Let's continue the conversation here.
Perhaps I am wrong in using S.get
in a function like this?
S.run ~init:forest @@ fun () ->
let param s f req = Dream_html.respond @@ f @@ Dream.param req s in
let page addr =
let forest = S.get () in
Renderer.page addr forest
in
14.02.24 14:54:17.850 Running at http://localhost:1234
14.02.24 14:54:17.850 Type Ctrl+C to stop
14.02.24 14:54:19.384 dream.log INFO REQ 1 GET /forest/foo-0001 127.0.0.1:54020 Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/200
14.02.24 14:54:19.385 dream.log WARN REQ 1 Aborted by: Unhandled algaeff effect; use Algaeff.State.run
14.02.24 14:54:19.385 dream.log WARN Raised by primitive operation at Algaeff__State.Make.get in file "src/State.ml" (inlined), line 17, cha3
14.02.24 14:54:19.385 dream.log WARN Called from Dune__exe__Main.(fun).page in file "bin/main.ml", line 21, characters 17-25
14.02.24 14:54:19.385 dream.log WARN Called from Dune__exe__Main.(fun).param in file "bin/main.ml", line 19, characters 44-66
14.02.24 14:54:19.385 dream.log WARN Called from Lwt.Sequence_associated_storage.with_value in file "src/core/lwt.ml", line 804, characters 3
14.02.24 14:54:19.385 dream.log WARN Re-raised at Lwt.Sequence_associated_storage.with_value in file "src/core/lwt.ml", line 809, characters5
14.02.24 14:54:19.385 dream.log WARN Called from Lwt.Sequential_composition.try_bind in file "src/core/lwt.ml", line 2139, characters 10-14
14.02.24 14:54:19.385 dream.http ERROR REQ 1 Unhandled algaeff effect; use Algaeff.State.run
14.02.24 14:54:19.385 dream.http ERROR REQ 1 Raised at Stdlib__Map.Make.find in file "map.ml", line 141, characters 10-25
14.02.24 14:54:19.385 dream.http ERROR REQ 1 Called from Logs.Tag.find in file "src/logs.ml", line 154, characters 14-32
14.02.24 14:54:19.404 dream.log INFO REQ 2 GET /favicon.ico 127.0.0.1:54020 Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/2010010
14.02.24 14:54:19.404 dream.log WARN REQ 2 404 in 114 μs
If you need it I can create a more minimal reproducing example.
It would be great to (1) figure out how to effectively test effectful code, and (2) write some basic tests and demonstrations!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.