Giter Site home page Giter Site logo

autosubst-ocaml's People

Contributors

addap avatar ana-borges avatar audreyseo avatar flyingrocksquirrel avatar mevenbertrand avatar yforster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

autosubst-ocaml's Issues

Example combining a functor and binders

As far as I can tell, there are no examples in the gallery that combine both a functor and binding. It would be nice to add such an example (I struggled for a while to find the correct syntax to get it accepted by the parser).

My use case is a constructor for pairs, with an optional annotation (option functor) for the codomain, which binds a position:

tPair : term -> (bind term in "option" (term)) -> term -> term ->term

Opam package erroring due to wrong file location

I have just been trying to use the opam package, but when trying to build a simple example, I get the following error:

Fatal error: exception Sys_error("/home/meven/.opam/autosubst-ocaml/share/autosubst/fintype.v: No such file or directory")
Raised by primitive operation at Stdlib.open_in_gen in file "stdlib.ml", line 398, characters 28-54
Called from Stdlib.open_in_bin in file "stdlib.ml" (inlined), line 406, characters 2-47
Called from Autosubst_lib__Program.read_file in file "lib/program.ml", line 74, characters 14-32
Called from Autosubst_lib__Program.copy_file in file "lib/program.ml" (inlined), line 102, characters 33-48
Called from Autosubst_lib__Program.gen_static_files.copy_static_file in file "lib/program.ml", line 130, characters 4-74
Called from Autosubst_lib__Program.gen_static_files in file "lib/program.ml", line 134, characters 20-48
Called from Autosubst_lib__Program.main in file "lib/program.ml", line 177, characters 9-75
Called from Stdlib__result.map in file "result.ml", line 25, characters 32-37
Called from Monadic__Result.MakeT.ResultMonad.bind in file "monadic/library/result.ml", line 31, characters 24-33
Called from Stdlib__result.map in file "result.ml", line 25, characters 32-37
Called from Monadic__Result.MakeT.ResultMonad.bind in file "monadic/library/result.ml", line 31, characters 24-33
Called from Dune__exe__Main.main in file "bin/main.ml", line 6, characters 12-35
Called from Dune__exe__Main in file "bin/main.ml", line 10, characters 9-16

It seems like the culprit is this line, which hardcodes that the files are to be found in the share/subst folder, while the opam installation puts them in share/coq-autosubst-ocaml.

Compilation error with successive binders

The .v file generated by autosubst on a signature file with multiple binders in a single item seems to go wrong when used with the option -allfv.

Example signature file (bug.sig):

term : Type

F : (bind term, term in term) -> term

Autosubst called with:

$ autosubst -s ucoq -v ge813 -allfv bug.sig -o Ast.v

The problem lie in the functions allfvRenL_term and allfvRenR_term in the generated Ast.v. The bug seems easy to fix (add additional helper functions similar to the ones already generated, see full repro attached).
repro.zip

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.