+
+specEnvToList :: SpecEnv value -> [([TemplateTyVar], [TemplateType], value)]
+specEnvToList EmptySE = []
+specEnvToList (SpecEnv alist)
+ = map do_item alist
+ where
+ do_item (tys, val) = (tyvars, tys, val)
+ where
+ tyvars = filter tyVarFlexi (tyVarSetToList (tyVarsOfTypes tys))