debug
This commit is contained in:
parent
195139e058
commit
da6e4547a8
1 changed files with 12 additions and 8 deletions
|
@ -30,7 +30,8 @@ let check_equal_types pos ~expected ~given =
|
||||||
let rec check_pattern_linearity
|
let rec check_pattern_linearity
|
||||||
: identifier list -> pattern Position.located -> identifier list
|
: identifier list -> pattern Position.located -> identifier list
|
||||||
=
|
=
|
||||||
fun vars Position.{ value; position } -> failwith "Students! This is your job!"
|
fun vars Position.{ value; position } ->
|
||||||
|
failwith "Students! This is your job! (check_pattern_linearity)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(** Type-checking code *)
|
(** Type-checking code *)
|
||||||
|
@ -39,11 +40,12 @@ let check_type_scheme
|
||||||
: HopixTypes.typing_environment -> Position.t -> HopixAST.type_scheme
|
: HopixTypes.typing_environment -> Position.t -> HopixAST.type_scheme
|
||||||
-> HopixTypes.aty_scheme * HopixTypes.typing_environment
|
-> HopixTypes.aty_scheme * HopixTypes.typing_environment
|
||||||
=
|
=
|
||||||
fun env pos (ForallTy (ts, ty)) -> failwith "Students! This is your job!"
|
fun env pos (ForallTy (ts, ty)) ->
|
||||||
|
failwith "Students! This is your job! (check_type_scheme)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
let synth_literal : HopixAST.literal -> HopixTypes.aty =
|
let synth_literal : HopixAST.literal -> HopixTypes.aty =
|
||||||
fun l -> failwith "Students! This is your job!"
|
fun l -> failwith "Students! This is your job! (synth_literal)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
let rec check_pattern
|
let rec check_pattern
|
||||||
|
@ -51,33 +53,35 @@ let rec check_pattern
|
||||||
-> HopixTypes.typing_environment
|
-> HopixTypes.typing_environment
|
||||||
=
|
=
|
||||||
fun env Position.({ value = p; position = pos } as pat) expected ->
|
fun env Position.({ value = p; position = pos } as pat) expected ->
|
||||||
failwith "Students! This is your job!"
|
failwith "Students! This is your job! (check_pattern)"
|
||||||
|
|
||||||
and synth_pattern
|
and synth_pattern
|
||||||
: HopixTypes.typing_environment -> HopixAST.pattern Position.located
|
: HopixTypes.typing_environment -> HopixAST.pattern Position.located
|
||||||
-> HopixTypes.aty * HopixTypes.typing_environment
|
-> HopixTypes.aty * HopixTypes.typing_environment
|
||||||
=
|
=
|
||||||
fun env Position.{ value = p; position = pos } -> failwith "Students! This is your job!"
|
fun env Position.{ value = p; position = pos } ->
|
||||||
|
failwith "Students! This is your job! (synth_pattern)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
let rec synth_expression
|
let rec synth_expression
|
||||||
: HopixTypes.typing_environment -> HopixAST.expression Position.located
|
: HopixTypes.typing_environment -> HopixAST.expression Position.located
|
||||||
-> HopixTypes.aty
|
-> HopixTypes.aty
|
||||||
=
|
=
|
||||||
fun env Position.{ value = e; position = pos } -> failwith "Students! This is your job!"
|
fun env Position.{ value = e; position = pos } ->
|
||||||
|
failwith "Students! This is your job! (synth_expression)"
|
||||||
|
|
||||||
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
|
||||||
=
|
=
|
||||||
fun env (Position.{ value = e; position = pos } as exp) expected ->
|
fun env (Position.{ value = e; position = pos } as exp) expected ->
|
||||||
failwith "Students! This is your job!"
|
failwith "Students! This is your job! (check_expression)"
|
||||||
|
|
||||||
and check_value_definition
|
and check_value_definition
|
||||||
: HopixTypes.typing_environment -> HopixAST.value_definition
|
: HopixTypes.typing_environment -> HopixAST.value_definition
|
||||||
-> HopixTypes.typing_environment
|
-> HopixTypes.typing_environment
|
||||||
=
|
=
|
||||||
fun env def -> failwith "Students! This is your job!"
|
fun env def -> failwith "Students! This is your job! (check_value_definition)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
let check_definition env = function
|
let check_definition env = function
|
||||||
|
|
Reference in a new issue