|
@@ -197,12 +197,12 @@ let rec typecheck node = match node with
|
|
|
|
|
|
|
|
(* Remove any Type nodes from the tree to allow more convenient matching in
|
|
(* Remove any Type nodes from the tree to allow more convenient matching in
|
|
|
* later phases *)
|
|
* later phases *)
|
|
|
-let rec prune_types = function
|
|
|
|
|
|
|
+(*let rec prune_types = function
|
|
|
| Type (node, _) -> prune_types node
|
|
| Type (node, _) -> prune_types node
|
|
|
- | node -> transform_children prune_types node
|
|
|
|
|
|
|
+ | node -> transform_children prune_types node*)
|
|
|
|
|
|
|
|
let rec phase input =
|
|
let rec phase input =
|
|
|
prerr_endline "- Type checking";
|
|
prerr_endline "- Type checking";
|
|
|
match input with
|
|
match input with
|
|
|
- | Ast node -> Ast (prune_types (typecheck node))
|
|
|
|
|
|
|
+ | Ast node -> Ast (typecheck node)
|
|
|
| _ -> raise (InvalidInput "typecheck")
|
|
| _ -> raise (InvalidInput "typecheck")
|