Small fixes

This commit is contained in:
Denis Merigoux 2023-03-28 09:38:47 +02:00
parent 48ef5b8f21
commit e4c4339856
No known key found for this signature in database
GPG Key ID: EE99DCFA365C3EE3
2 changed files with 9 additions and 1 deletions

View File

@ -213,7 +213,7 @@ let driver source_file (options : Cli.options) : int =
| `Typecheck ->
Cli.debug_print "Typechecking again...";
let _ =
try Shared_ast.Typing.program prgm ~leave_unresolved:true
try Shared_ast.Typing.program prgm ~leave_unresolved:false
with Errors.StructuredError (msg, details) ->
let msg =
"Typing error occured during re-typing on the 'default \

View File

@ -49,6 +49,14 @@ val map_exprs_in_lets :
varf:('expr1 Var.t -> 'expr2 Var.t) ->
'expr1 scope_body_expr ->
'expr2 scope_body_expr Bindlib.box
(** Usage
[map_exprs_in_lets ~f:(fun e -> ...) ~varf:(fun var -> ...) scope_body_expr],
where [e] is the right-hand-side of a scope let or the result of the scope
body, and [var] represents the left-hand-side variable of a scope let.
[~varf] is usually the identity function or [Var.translate] when the map
sends the expression to a new flavor of the shared AST. If [~reset_types] is
activated, then the resulting types in the scope let left-hand-sides will be
reset to [TAny]. *)
val fold_left :
f:('a -> 'expr1 code_item -> 'expr1 Var.t -> 'a) ->