Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

rtop only understands old function syntax #81

Open

Description

@svoynow

Not sure if this is the right place for this, or if this is a known issue:

Reason # let foo = fun(x) => x + 2;
let foo : int => int = <fun>                                                    
Reason # let foo = (x) => x + 2;
Error: Syntax error 
 $ rtop -version
The universal toplevel for OCaml, version 1.19.3, compiled for OCaml version 4.02.3

I know that "Try ReasonML" is preferred as a sandbox/repl solution, but I find rtop useful when explaining types to people.

Activity

  1. brooklynrob commented on Jan 1, 2019

    @brooklynrob

    Disregard comment below, though leaving for context as to how I recreated the same problem @svoynow had. I am still having the same problem described above - (rtop only supports "old" Reason 2 syntax)

    In my investigations I did notice that the dune-project file requires Dune 1.4, but isn't the latest version from Jane Street 1.2.1? Don't think it's related by I noted it.

    I experienced the same problem just as described above by @svoynow today (2019.1.1) after installing Reason (via opam).

    I was able to remedy by running opam update and then opam upgrade which hds the effect of upgrading menhir from the version tagged "20171013" to the version tagged "20180905". Once that happened, the new Reason 3 syntax worked in rtop.

    @svoynow did you install via yarn/npm or via opam? As context I have/had existing OCaml switches and installed Reason via opam (on a separate 4.04.2 switch I created to segregate my Reason work) using the instructions here, https://github.com/facebook/reason/blob/master/src/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions