Permalink
Browse files

Remove unused Unit_type.

  • Loading branch information...
xlq committed Sep 16, 2012
1 parent 50157ce commit eb445b0a2fde1bab986fed0ed8dd207f2abff6f4
Showing with 1 addition and 8 deletions.
  1. +0 −2 symbols.ml
  2. +0 −1 symbols.mli
  3. +1 −5 type_checking.ml
View
@@ -12,7 +12,6 @@ and param_mode =
type ttype =
| Unknown_type of unknown
| Unit_type
| Boolean_type
| Integer_type
| Uninitialised of ttype
@@ -114,7 +113,6 @@ let string_of_op = function
let rec string_of_type = function
| Unknown_type{unk_decided=Some t} -> "<unknown: " ^ string_of_type t ^ ">"
| Unknown_type _ -> "<unknown>"
| Unit_type -> "Unit"
| Boolean_type -> "Boolean"
| Integer_type -> "Integer"
View
@@ -14,7 +14,6 @@ type ttype =
but the type will be known by the time type checking
is complete. *)
| Unknown_type of unknown
| Unit_type
| Boolean_type
| Integer_type
| Uninitialised of ttype
View
@@ -73,7 +73,6 @@ let now f =
let rec coerce loc t1 t2 changes =
match t1, t2 with
| Unit_type, Unit_type
| Boolean_type, Boolean_type
| Integer_type, Integer_type -> ()
| Unknown_type(unk), t2 ->
@@ -168,10 +167,8 @@ let same_mode a b =
(* XXX: This is very similar to coerce. *)
let conflicting_types t1 t2 =
match t1, t2 with
| Unit_type, Unit_type
| Boolean_type, Boolean_type
| Integer_type, Integer_type -> true
| Unit_type, _ | _, Unit_type
| Boolean_type, _ | _, Boolean_type
| Integer_type, _ | _, Integer_type -> false
@@ -428,7 +425,6 @@ let type_check_call call =
(* TODO: Merge merge_types with coerce? *)
let merge_types t1 t2 =
try match t1, t2 with
| Unit_type, Unit_type -> Unit_type
| Boolean_type, Boolean_type -> Boolean_type
| Integer_type, Integer_type -> Integer_type
with (Match_failure _) as e ->
@@ -447,7 +443,7 @@ let rec propagate_decision unk decided =
let rec resolve_unknowns_in_type remaining t =
match t with
| Unit_type | Boolean_type | Integer_type -> t
| Boolean_type | Integer_type -> t
| Unknown_type({unk_decided = Some t}) -> t
| Unknown_type({unk_decided = None} as unk) ->
let rec fold result = function

0 comments on commit eb445b0

Please sign in to comment.