.
[clean-tests.git] / gengen / test.icl
index 2a59baa..1348136 100644 (file)
@@ -14,22 +14,25 @@ import Data.Either
 import Data.GenType
 import Data.GenType.CType
 
-derive gType Either, Maybe, T, R, Frac, Tr, Fix, Odd, Even, SR, List, Enum, NT, Blurp
+derive gType Either, Maybe, T, R, Frac, Tr, Fix, Odd, Even, SR, List, Enum, NT, Blurp, EnumList
 
 :: T a =: T2 a
 :: NT =: NT Int
 :: SR = {f1 :: Int, f2 :: Bool}
 :: R a = {f1 :: Maybe (R a), f2 :: Bool, f3 :: T a, f4 :: Char -> Dynamic,
        f5 :: [([#Int], [#Int!], [!Int!], [!Int], [Int!])],
-       f6 :: ({!Int}, {R Bool}, {#Char}, {32#Int})/*({!Int}, {#Char}, {R Bool})*/}
+       f6 :: ({!Int}, {R Bool}, {#Char}, {32#Int}),/*({!Int}, {#Char}, {R Bool})*/
+       f7 :: {!Int}}
 :: Tr m b= Tr (m Int b)
-:: Frac a = (/.) infixl 7 a a 
+:: Frac a = (/.) infixl 7 a a  | Flurp
 :: Fix f = Fix (f (Fix f))
 
 :: List a = Cons a (List a) | Nil
 
 :: Blurp a = Blurp (List a) | Blorp
 
+:: EnumList = ECons Enum EnumList | ENil
+
 ////Start :: [String]
 ////Start = foldr (\i c->print i ["\n":c]) [] $ catMaybes $ map gTypeToType $ flattenGType $ unBox t
 //:: Pair a b = Pair a b
@@ -42,15 +45,17 @@ Start = typedefs //$ (\x->[[gTypeToType x]])
 //     $ map (/*filter (not o isBuiltin) o*/ catMaybes o map gTypeToType)
 //     $ (\x->[[x]])
        $ map (map gTypeToType)
+       $ map (filter (not o isBasic))
        $ flattenGType
        $ unBox t
-//
-//
+
+
 //t :: Box GType (?# Int)
 //t :: Box GType (Maybe [Maybe (Either Bool String)])
-t :: Box GType ([SR], Enum, T Int, NT, Blurp Int)
+//t :: Box GType ([SR], Enum, T Int, NT, Blurp Int)
+//t :: Box GType [EnumList]
 //t :: Box GType (Tr Either Enum)
-//t :: Box GType (Odd Int, (), [Either (R (T *World)) (Frac Real)], Tr Either Bool, Fix Maybe)
+t :: Box GType (Odd Int, (), [Either (R (T *World)) (Frac Real)], Tr Either Bool, Fix Maybe)
 t = gType{|*|}
 
 //Start = toString t