Giter Site home page Giter Site logo

algaeff's People

Contributors

dependabot[bot] avatar favonia avatar fogti avatar mikeshulman avatar mmcqd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mikeshulman

algaeff's Issues

`Unhandled algaeff effect; use Algaeff.State.run` but I am using it

Perhaps I am wrong in using S.get in a function like this?

https://github.com/kentookura/forester-html/blob/e99e13e75c8cde73a8c7277df740a9d172f03692/bin/main.ml#L18-L23

  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.

✅ Tests

It would be great to (1) figure out how to effectively test effectful code, and (2) write some basic tests and demonstrations!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.