fmt
This commit is contained in:
parent
97fc6d3d86
commit
72c323b2c8
1 changed files with 8 additions and 11 deletions
|
@ -48,8 +48,6 @@ let check_type_scheme
|
||||||
HopixTypes.Scheme (ts, HopixTypes.internalize_ty env ty), env
|
HopixTypes.Scheme (ts, HopixTypes.internalize_ty env ty), env
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let rec check_pattern
|
let rec check_pattern
|
||||||
: HopixTypes.typing_environment -> HopixAST.pattern Position.located -> HopixTypes.aty
|
: HopixTypes.typing_environment -> HopixAST.pattern Position.located -> HopixTypes.aty
|
||||||
-> HopixTypes.typing_environment
|
-> HopixTypes.typing_environment
|
||||||
|
@ -113,17 +111,17 @@ and synth_apply
|
||||||
: HopixTypes.typing_environment -> expression Position.located
|
: HopixTypes.typing_environment -> expression Position.located
|
||||||
-> expression Position.located -> HopixTypes.aty
|
-> expression Position.located -> HopixTypes.aty
|
||||||
=
|
=
|
||||||
fun tenv f x -> (*failwith "Students! This is your job! (synth_apply)"*)
|
fun tenv f x ->
|
||||||
|
(*failwith "Students! This is your job! (synth_apply)"*)
|
||||||
let f_type = synth_expression tenv f in
|
let f_type = synth_expression tenv f in
|
||||||
match f_type with
|
match f_type with
|
||||||
| HopixTypes.ATyArrow (gauche,droit) -> (* a' -> b' *)
|
| HopixTypes.ATyArrow (gauche, droit) ->
|
||||||
(
|
(* a' -> b' *)
|
||||||
let x_type = synth_expression tenv x in
|
let x_type = synth_expression tenv x in
|
||||||
check_equal_types x.position gauche x_type; droit
|
check_equal_types x.position gauche x_type;
|
||||||
)
|
droit
|
||||||
| _ -> failwith ""
|
| _ -> failwith ""
|
||||||
|
|
||||||
|
|
||||||
and synth_record
|
and synth_record
|
||||||
: HopixTypes.typing_environment
|
: HopixTypes.typing_environment
|
||||||
-> (label Position.located * expression Position.located) list
|
-> (label Position.located * expression Position.located) list
|
||||||
|
@ -208,7 +206,6 @@ and synth_for
|
||||||
=
|
=
|
||||||
fun tenv id estart eend expr -> failwith "Students! This is your job! (synth_for)"
|
fun tenv id estart eend expr -> failwith "Students! This is your job! (synth_for)"
|
||||||
|
|
||||||
|
|
||||||
and check_expression
|
and check_expression
|
||||||
: HopixTypes.typing_environment -> HopixAST.expression Position.located
|
: HopixTypes.typing_environment -> HopixAST.expression Position.located
|
||||||
-> HopixTypes.aty -> unit
|
-> HopixTypes.aty -> unit
|
||||||
|
|
Reference in a new issue