Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error into examples #32

Open
zepouet opened this issue Feb 9, 2024 · 2 comments
Open

Type error into examples #32

zepouet opened this issue Feb 9, 2024 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@zepouet
Copy link

zepouet commented Feb 9, 2024

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

@r17x
Copy link
Contributor

r17x commented Feb 16, 2024

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

@leostera leostera added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Feb 28, 2024
@francoganga
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: No status
Development

No branches or pull requests

4 participants