+generic gconses a :: Bool -> [a]
+gconses{|CONS|} f True = map CONS (f False)
+gconses{|CONS|} f b = [CONS (hd (f b))]
+gconses{|UNIT|} _ = [UNIT]
+gconses{|PAIR|} f g _ = []
+gconses{|EITHER|} f g b = map LEFT (f b) ++ map RIGHT (g b)
+gconses{|OBJECT|} f b = map OBJECT (f b)
+gconses{|RECORD|} f b = map RECORD (f b)
+gconses{|FIELD|} f b = map FIELD (f b)
+gconses{|Int|} _ = [0]
+gconses{|Bool|} _ = [True]
+gconses{|Char|} _ = ['\0']
+gconses{|Real|} _ = [0.0]
+gconses{|String|} _ = [""]
+gconses{|[]|} _ _ = [[ ]]
+gconses{|[!]|} _ _ = [[!]]
+gconses{|[ !]|} _ _ = [[ !]]
+gconses{|[!!]|} _ _ = [[!!]]
+gconses{|{}|} _ _ = [{}]
+gconses{|{!}|} _ _ = [{!}]
+gconses{|()|} _ = [()]