Relax the generation of `t_n`
See original GitHub issuets2ocaml
generates types for all of the arrity possible of a given type.
However, in practice, the types are stricly equal and have the same arrity as the type t
.
Additionnally, bindings generated seem to always use the type with highest arrity.
So I would propose that:
- We don’t generate types if they have the same arrity as
t
- (optionnally), we only generate
t
as it seems compatible with how other generated bindings will use the module.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (9 by maintainers)
Top Results From Across the Web
Hamilton County Schools unveils first calm room for ...
Students at Chattanooga School for the Liberal Arts will now have a place to relax and reset thanks to a new calm room...
Read more >2GEN ANNUAL REPORT
Two-generation approaches can be found along a continuum. The graphic below illustrates the starting point (parent or child) and the relative emphasis. Whole- ......
Read more >How a first-gen University of Tennessee veteran helps ...
How a first-gen University of Tennessee veteran helps others get past 'hard days'. Becca Wright. Knoxville News Sentinel.
Read more >Next Generation Movers, LLC | Nashville TN
Leave the heavy lifting to us, so you can focus on having a safe and relaxing move. nextgenerationmovers@gmail.com (615) 218-4633 www.nextgenerationmovers.com
Read more >Where To Relax In Nashville
Revel in Nashville's state of the art, full-spectrum infrared sauna and float therapy destination -- furnishing both mental and physical relaxation, weight loss ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Now we have an option
--safe-arity
to customize this behavior since https://github.com/ocsigen/ts2ocaml/commit/1f0ed1e771133424fed0ad855f0f58b9831128ca .--safe-arity=full
(default) generatest_n
types in the module, and tries to uset_n
type if the type is unknown (e.g. from another package)--safe-arity=provide
only generatest_n
types in the module--safe-arity=consume
only tries to uset_n
type if the type is unknown--safe-arity=off
disables any usage oft_n
typesThe above was addressed in https://github.com/ocsigen/ts2ocaml/commit/22191ab2220cbfeb1b0d7244650195934c4eafc4 (in fact,
--safe-arity=off
didn’t generate necessaryt_n
types at all)