minttea
minttea copied to clipboard
Type error into examples
Hello,
Just my first step with Minttea. Very good idea to be inspired by Elm and powered by OCaml.
dune --version
3.13.1
ocaml --version
The OCaml toplevel, version 5.1.1
➜ progress git:(main) ✗ dune build
Entering directory '/Users/nicolas.muller/projects/minttea/minttea'
File "minttea/renderer.ml", line 112, characters 36-54:
112 | Riot.Timer.send_interval ~every:(fps_to_float fps) (self ()) Tick
^^^^^^^^^^^^^^^^^^
Error: This expression has type int64 but an expression was expected of type
float
File "minttea/program.ml", line 47, characters 54-59:
47 | let _ = Timer.send_after (self ()) (Timer ref) ~after |> Result.get_ok in
^^^^^
Error: This expression has type int64 but an expression was expected of type
`float`
Thanks a lot, Nicolas
I have same issues with @zepouet
open details
minttea feat/key-events [$?] via 🐫 v5.1.1 (default) ❄️ impure 2h11m8s
❯ opam --version
2.1.5
minttea feat/key-events [$?] via 🐫 v5.1.1 (default) ❄️ impure
❯ dune --version
3.14.0
minttea feat/key-events [$?] via 🐫 v5.1.1 (default) ❄️ impure
❯ opam exec -- dune build
File "minttea/program.ml", line 47, characters 54-59:
47 | let _ = Timer.send_after (self ()) (Timer ref) ~after |> Result.get_ok in
^^^^^
Error: This expression has type int64 but an expression was expected of type
float
File "minttea/renderer.ml", line 112, characters 36-54:
112 | Riot.Timer.send_interval ~every:(fps_to_float fps) (self ()) Tick
^^^^^^^^^^^^^^^^^^
Error: This expression has type int64 but an expression was expected of type
float
minttea feat/key-events [$?] via 🐫 v5.1.1 (default) ❄️ impure
❯ dune build
File "minttea/program.ml", line 47, characters 54-59:
47 | let _ = Timer.send_after (self ()) (Timer ref) ~after |> Result.get_ok in
^^^^^
Error: This expression has type int64 but an expression was expected of type
float
File "minttea/renderer.ml", line 112, characters 36-54:
112 | Riot.Timer.send_interval ~every:(fps_to_float fps) (self ()) Tick
^^^^^^^^^^^^^^^^^^
Error: This expression has type int64 but an expression was expected of type
float
I think this is a dependency problem, if you are trying to build the main branch i got it working with these steps: after cloning the project:
- opam switch create .
; opam pin config.0.0.1 git+https://github.com/ocaml-sys/config.ml#65cbaacc340be3935a981bc38a33ca14371c7a14 -y ; opam pin libc.0.0.1 git+https://github.com/ocaml-sys/libc.ml#03c72cb8048469a26ad9cd55293d7b61581c36e5 -y ; opam pin rio.0.0.8 git+https://github.com/riot-ml/riot -y ; opam pin bytestring.0.0.8 git+https://github.com/riot-ml/riot -y ; opam pin gluon.0.0.8 git+https://github.com/riot-ml/riot -y ; opam pin riot.0.0.8 git+https://github.com/riot-ml/riot -y ; opam install mdx
that way you get config.ml and libc.ml on version 0.0.1, and the rest are for latest version of riot (which minttea depends on) libc and config.ml are currently being worked on so thats why im using 0.0.1
Not sure if this is 100% the correct way of doing it tho.