From 72c323b2c839dffd788f6bc1ce3539b9e05693b6 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 4 Dec 2023 18:38:57 +0100 Subject: [PATCH] fmt --- flap/src/hopix/hopixTypechecker.ml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/flap/src/hopix/hopixTypechecker.ml b/flap/src/hopix/hopixTypechecker.ml index ee89423..b7fd253 100644 --- a/flap/src/hopix/hopixTypechecker.ml +++ b/flap/src/hopix/hopixTypechecker.ml @@ -48,8 +48,6 @@ let check_type_scheme HopixTypes.Scheme (ts, HopixTypes.internalize_ty env ty), env ;; - - let rec check_pattern : HopixTypes.typing_environment -> HopixAST.pattern Position.located -> HopixTypes.aty -> HopixTypes.typing_environment @@ -83,7 +81,7 @@ let rec synth_expression | While (ecase, expr) -> synth_while env ecase expr | For (id, ecase, expr1, expr2) -> synth_for env id ecase expr1 expr2 -and synth_literal : HopixAST.literal -> HopixTypes.aty = +and synth_literal : HopixAST.literal -> HopixTypes.aty = fun l -> match l with | LInt _ -> HopixTypes.hint @@ -113,16 +111,16 @@ and synth_apply : HopixTypes.typing_environment -> expression Position.located -> 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 - match f_type with - | HopixTypes.ATyArrow (gauche,droit) -> (* a' -> b' *) - ( + match f_type with + | HopixTypes.ATyArrow (gauche, droit) -> + (* a' -> b' *) 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 "" - and synth_record : HopixTypes.typing_environment @@ -208,7 +206,6 @@ and synth_for = fun tenv id estart eend expr -> failwith "Students! This is your job! (synth_for)" - and check_expression : HopixTypes.typing_environment -> HopixAST.expression Position.located -> HopixTypes.aty -> unit