[small bug in building ArrowT fixed
martin.hofmann@uni-bamberg.de**20090417104049] hunk ./src/Syntax/Expressions.hs 378
-                    -- then add the anti-instance of thge rest lists
+                    -- then add the anti-instance of the rest lists
hunk ./src/Syntax/Expressions.hs 384
-                  then return $ TListE straightai ty -- we can keep the f*** ListE
+                  then return $ TListE straightai ty -- we can keep the f***ing ListE
hunk ./src/Syntax/Expressions.hs 390
-                          let tcone = TConE '(:) (addArrowT [ety, ty, ty]) 
-                          let apps = map (\a -> TAppE tcone a ty) straightai
+                          let tcone = TConE '(:) (mkArrowT [ety, ty, ty]) 
+                          let apps = map (mkTAppE tcone) straightai
hunk ./src/Syntax/Expressions.hs 962
-            
+--            
hunk ./src/Syntax/Expressions.hs 967
-foldTAppE et (e:es) = foldTAppE (TAppE et e (reduceArrowT . typeOf $ et)) es
+foldTAppE et (e:es) = foldTAppE (mkTAppE et e) es
hunk ./src/Syntax/Expressions.hs 970
+-- constructs a partial application of 'a' to 'f', where 'f' must be a function 
+-- expression with at least one argument
+mkTAppE f a = TAppE f a (sectionType . typeOf $ f)
hunk ./src/Syntax/Patterns.hs 308
-                          let tconp = flip (TConP '(:)) (addArrowT [ety, ty, ty])
+                          let tconp = flip (TConP '(:)) (mkArrowT [ety, ty, ty])
hunk ./src/Syntax/Types.hs 9
-    splitArrowT, reduceArrowT, unArrowT, addArrowT, addPredicates, 
+    --splitArrowT, 
+    sectionType, argumentType, unArrowT, mkArrowT, addPredicates, 
hunk ./src/Syntax/Types.hs 84
+splitArrowT t = error $ "Cannot split " ++ (show t)
hunk ./src/Syntax/Types.hs 86
-reduceArrowT = fst . splitArrowT
+sectionType  = fst . splitArrowT
+argumentType = snd . splitArrowT
hunk ./src/Syntax/Types.hs 94
-addArrowT :: [Type] -> Type
-addArrowT ts = foldl1 AppT $ map (AppT ArrowT) ts 
+mkArrowT :: [Type] -> Type
+mkArrowT [t] = t
+mkArrowT ts  = foldl1 apArrowT ts
+
+apArrowT :: Type -> Type -> Type
+apArrowT t1 t2 = AppT (AppT ArrowT t1) t2