From c5c2f3a9dc9c18463719647eb48ccccd84fbdc89 Mon Sep 17 00:00:00 2001 From: Brian Campbell Date: Wed, 24 Apr 2019 11:44:01 +0100 Subject: Don't try to insert monomorphisation casts when the types are the same --- src/monomorphise.ml | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/monomorphise.ml b/src/monomorphise.ml index 9f273cb1..3f8a40e6 100644 --- a/src/monomorphise.ml +++ b/src/monomorphise.ml @@ -3182,6 +3182,7 @@ let make_bitvector_env_casts env quant_kids (kid,i) exp = if mut = Immutable then mk_cast var typ exp else exp) locals exp let make_bitvector_cast_exp cast_name cast_env quant_kids typ target_typ exp = + if alpha_equivalent cast_env typ target_typ then exp else let infer_arg_typ env f l typ = let (typq, ctor_typ) = Env.get_union_id f env in let quants = quant_items typq in -- cgit v1.2.3