changeset 1796:0de0daab5fbb

Remove misguided type class optimization
author Adam Chlipala <adam@chlipala.net>
date Thu, 26 Jul 2012 10:04:58 -0400
parents d28adceef22a
children bb942416bf1c
files src/elab_env.sml
diffstat 1 files changed, 2 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/elab_env.sml	Wed Jul 25 14:04:59 2012 -0400
+++ b/src/elab_env.sml	Thu Jul 26 10:04:58 2012 -0400
@@ -163,22 +163,6 @@
                         | ((xn, rep), U.Exp.RelC _) => (xn, liftConInExp 0 rep)
                         | (ctx, _) => ctx}
 
-val openCon =
-    U.Con.existsB {kind = fn ((nk, _), k) =>
-                             case k of
-                                 KRel n => n >= nk
-                               | _ => false,
-                   con = fn ((_, nc), c) =>
-                            case c of
-                                CRel n => n >= nc
-                              | _ => false,
-                   bind = fn (all as (nk, nc), b) =>
-                             case b of
-                                 U.Con.RelK _ => (nk+1, nc)
-                               | U.Con.RelC _ => (nk, nc+1)
-                               | _ => all}
-    (0, 0)
-
 (* Back to environments *)
 
 datatype 'a var' =
@@ -855,13 +839,8 @@
                               let
                                   val rule = (nvs, cs, c, (ERel 0, #2 t))
 
-                                  val class =
-                                      if openCon t then
-                                          {openRules = rule :: #openRules class,
-                                           closedRules = #closedRules class}
-                                      else
-                                          {closedRules = rule :: #closedRules class,
-                                           openRules = #openRules class}
+                                  val class = {openRules = rule :: #openRules class,
+                                               closedRules = #closedRules class}
                               in
                                   CM.insert (classes, f, class)
                               end