[ctx_ctors stores Typename/Ctornames, ctx_types stores all types, both of funs and ctors
martin.hofmann@uni-bamberg.de**20091210074309] hunk ./src/Syntax/Builder.hs 41
-                         getConType, getVarType, withC) 
+                         getCtors, getType, withC) 
hunk ./src/Syntax/Builder.hs 98
-    return $ (addToConstructors pNameTy) . (addToInstances tyClasses) $ spc
+    return $ (addToConstructors [(toName tname, map fst pNameTy)]) . (addToTypes pNameTy) . (addToInstances tyClasses) $ spc
hunk ./src/Syntax/Builder.hs 221
-                ty <- getVarType n' >>= maybe (fail $ "Fun " ++ (show n') ++ " not in Context") (specialise t)
+                ty <- getType n' >>= maybe (fail $ "Fun " ++ (show n') ++ " not in Context") (specialise t)
hunk ./src/Syntax/Builder.hs 227
-                ty <- getConType n' >>= maybe (fail $ "Ctor " ++ (show n') ++ " not in Context") (specialise t)
+                ty <- getType n' >>= maybe (fail $ "Ctor " ++ (show n') ++ " not in Context") (specialise t)
hunk ./src/Syntax/Builder.hs 233
-        ty <- getConType n' >>= maybe (fail $ "Ctor " ++ (show n') ++ " not in Context") (specialise t)
+        ty <- getType n' >>= maybe (fail $ "Ctor " ++ (show n') ++ " not in Context") (specialise t)
hunk ./src/Syntax/Builder.hs 250
-        ty <- getConType n' >>= maybe (fail $ "Ctor " ++ (show n') ++ " not in Context") (specialise t)
+        ty <- getType n' >>= maybe (fail $ "Ctor " ++ (show n') ++ " not in Context") (specialise t)
hunk ./src/Syntax/Builder.hs 260
-        ty <- getConType n' >>= maybe (fail $ "Ctor " ++ (show n') ++ " not in Context") (specialise t)
+        ty <- getType n' >>= maybe (fail $ "Ctor " ++ (show n') ++ " not in Context") (specialise t)
hunk ./src/Syntax/Context.hs 9
-    C, withC, runC, lookIn, getConType, getVarType, getSuperClasses, getInstances,
+    C, withC, runC, lookIn, getCtors, getType, getSuperClasses, getInstances,
hunk ./src/Syntax/Context.hs 36
-    , ctx_ctors    :: !(Map.Map Name Type)
-    -- mapping a constructor name to its type
+    , ctx_ctors    :: !(Map.Map Name [Name])
+    -- mapping a type name to its constructors
hunk ./src/Syntax/Context.hs 64
-addToConstructors :: [(Name, Type)] -> Context -> Context
+addToConstructors :: [(Name, [Name])] -> Context -> Context
hunk ./src/Syntax/Context.hs 119
-    ]
-    
-defaultctors     = Map.fromList 
-    [('(:),     arrowT [varT "a", listT (varT "a"), listT (varT "a")])
+    ,('(:),     arrowT [varT "a", listT (varT "a"), listT (varT "a")])
hunk ./src/Syntax/Context.hs 128
+    
+defaultctors     = Map.fromList 
+    [(''[]     ,['[],'(:)])
+    ,(''Bool   ,['False,'True])
+    ,(''Maybe  ,['Just, 'Nothing])
+    ,(''Either , ['Left,'Right])
+    ]
hunk ./src/Syntax/Context.hs 180
-getConType, getVarType :: (MonadReader Context m) => Name -> m (Maybe Type)
-getVarType = lookIn ctx_types
-getConType = lookIn ctx_ctors
+getType :: (MonadReader Context m) => Name -> m (Maybe Type)
+getType = lookIn ctx_types
+
+getCtors :: (MonadReader Context m) => Name -> m (Maybe [Name])
+getCtors = lookIn ctx_ctors
hunk ./src/Syntax/Expressions.hs 6
-    tConE, tAppE, tInfixE, tListE, tTupE, foldTAppE, unfoldTAppE ,
+    tVarE, tWildE, tConE, tAppE, tInfixE, tListE, tTupE, foldTAppE, unfoldTAppE ,
hunk ./src/Syntax/Expressions.hs 211
+tVarE s t =  TVarE (mkName s) t
+tWildE s t = TWildE (mkName s) t
hunk ./src/Syntax/Specification.hs 83
-addToConstructors :: [(Name, Type)] -> Specification -> Specification
+addToConstructors :: [(Name, [Name])] -> Specification -> Specification
hunk ./src/Syntax/Type.hs 16
+{-# OPTIONS_GHC -fglasgow-exts -XTemplateHaskell #-}