cinaps icon indicating copy to clipboard operation
cinaps copied to clipboard

#use directive generates unparseable code

Open craigfe opened this issue 5 years ago • 2 comments

The README contains a section on importing generator code from other files. This appears to be broken in the current version of cinaps (or, at least, I cannot get it to work). Adding the following to the test file:

(*$ #use "imported.cinaps";;
    let () = List.iter to_print ~f:printf
*)
(*$*)

produces the output:

❭ dune runtest
File "test_staged.ml", line 16, characters 4-5:
Error: Syntax error: 'end' expected
File "test/test_staged_gen.ml", line 34, characters 28-34:
34 |   (fun () -> let module M = struct
                                 ^^^^^^
  This 'struct' might be unmatched

This failure is contained in this branch.

craigfe avatar Aug 27 '20 21:08 craigfe

I think this feature went away when non staged mode was removed. @xclerc or @jeremiedimino can confirm.

rgrinberg avatar Apr 09 '21 19:04 rgrinberg

Indeed, the readme needs to be updated

ghost avatar Apr 19 '21 10:04 ghost