*/
import StdEnv, StdGeneric, GenBimap, _SystemStrictLists
+import Data.List
generic consName a :: a -> String
consName{|CONS of {gcd_name}|} f x = gcd_name
consName{|Char|} c = toString c
consName{|String|} s = s
consName{|[]|} _ _ = "[]"
+consName{|()|} _ = "()"
+consName{|(,)|} _ _ _ = "(,)"
+consName{|(,,)|} _ _ _ _ = "(,,)"
+consName{|(,,,)|} _ _ _ _ _ = "(,,,)"
+consName{|(,,,,)|} _ _ _ _ _ _ = "(,,,,)"
consName{|(->)|} f g x = g (x undef)
generic consIndex a :: a -> Int
consIndex{|Char|} c = toInt c
consIndex{|String|} _ = 0
consIndex{|[]|} _ _ = 0
+consIndex{|()|} _ = 0
+consIndex{|(,)|} _ _ _ = 0
+consIndex{|(,,)|} _ _ _ _ = 0
+consIndex{|(,,,)|} _ _ _ _ _ = 0
+consIndex{|(,,,,)|} _ _ _ _ _ _ = 0
generic conses a :: [a]
conses{|CONS|} f = [CONS (hd f)]
conses{|[!]|} _ = [[!]]
conses{|[ !]|} _ = [[ !]]
conses{|[!!]|} _ = [[!!]]
+conses{|()|} = [()]
+conses{|(,)|} f g = zip2 f g
+conses{|(,,)|} f g h = zip3 f g h
+conses{|(,,,)|} f g h i = zip4 f g h i
+conses{|(,,,,)|} f g h i j = zip5 f g h i j
conses{|{}|} _ = [{}]
conses{|{!}|} _ = [{!}]
-conses{|()|} = [()]
conses{|(->)|} _ _ = [const undef]