mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 00:41:05 +03:00
Fix tests
This commit is contained in:
parent
1d7a908646
commit
e85b2bceaf
@ -459,11 +459,13 @@ let interpret_program (ctx : Ast.decl_ctx) (e : Ast.expr Pos.marked) :
|
||||
let application_term = List.map (fun _ -> empty_thunked_term) taus in
|
||||
let to_interpret = (Ast.EApp (e, application_term), Pos.no_pos) in
|
||||
match Pos.unmark (evaluate_expr ctx to_interpret) with
|
||||
| Ast.ETuple (args, None) ->
|
||||
| Ast.ETuple (args, Some _) ->
|
||||
let vars, _ = Bindlib.unmbind binder in
|
||||
List.map2 (fun arg var -> (var, arg)) args (Array.to_list vars)
|
||||
| _ ->
|
||||
Errors.raise_spanned_error "The interpretation of a program should always yield a tuple"
|
||||
Errors.raise_spanned_error
|
||||
"The interpretation of a program should always yield a struct corresponding to the \
|
||||
scope variables"
|
||||
(Pos.get_position e) )
|
||||
| _ ->
|
||||
Errors.raise_spanned_error
|
||||
|
Loading…
Reference in New Issue
Block a user