[Do not allow sections in TInfixE, --> Maybes removed
martin.hofmann@uni-bamberg.de**20090428130320] hunk ./src/Context/ContextBuilder.hs 314
-    toTExp t (InfixE mba1 (ConE n) mba2) = do     
+    toTExp t (InfixE (Just l) (ConE n) (Just r)) = do     
hunk ./src/Context/ContextBuilder.hs 317
-                a1' <- case mba1 of 
-                        (Just a1) -> liftM Just $ toTExp tya1 a1
-                        _owise    -> return Nothing
-                a2' <- case mba2 of 
-                        (Just a2) -> liftM Just $ toTExp tya2 a2
-                        _owise    -> return Nothing
+                a1' <- toTExp tya1 l
+                a2' <- toTExp tya2 r
hunk ./src/Context/ContextBuilder.hs 362
-        return ((map tPat2TExp ls'), rs')    
+        return ((map tPat2TExp ls'), rs')    -- TODO quick and dirty, dont convert to Pat in the first place
hunk ./src/Data/Rules.hs 219
-    TInfixE (Just . tPat2TExp $ l)
+    TInfixE (tPat2TExp $ l)
hunk ./src/Data/Rules.hs 221
-            (Just . tPat2TExp $ r)            
+            (tPat2TExp $ r)            
hunk ./src/Syntax/Expressions.hs 29
-    | TInfixE (Maybe TExp) TExp (Maybe TExp) Type
+    | TInfixE TExp TExp TExp Type -- no sections
hunk ./src/Syntax/Expressions.hs 99
-        braces $ hsep (catMaybes [ liftM pretty p1
-                                 , Just (pretty n)
-                                 , liftM pretty p2]) <+> 
+        braces $ hsep [ pretty p1
+                      , pretty n
+                      , pretty p2] <+> 
hunk ./src/Syntax/Expressions.hs 172
-    subterms (TInfixE (Just l) _c (Just r) _)   = [l, r]        -- _c is not a subterm, but the root
-    subterms (TInfixE Nothing _c (Just r) _)    = [hole, r]
-    subterms (TInfixE (Just l) _c Nothing _)    = [l, hole]
-    subterms (TInfixE Nothing _c Nothing _)     = [hole, hole]
+    subterms (TInfixE l _c r _)   = [l, r]        -- _c is not a subterm, but the root
+--    subterms (TInfixE Nothing _c (Just r) _)    = [hole, r]
+--    subterms (TInfixE (Just l) _c Nothing _)    = [l, hole]
+--    subterms (TInfixE Nothing _c Nothing _)     = [hole, hole]
hunk ./src/Syntax/Expressions.hs 248
-        if ( equal s2 t2) then liftMatch s1 t1 >> liftMatch s3 t3
+        if ( equal s2 t2) then match s1 t1 >> match s3 t3
hunk ./src/Syntax/Expressions.hs 314
-        if ( equal s2 t2) then liftUnify s1 t1 >> liftUnify s3 t3
+        if ( equal s2 t2) then unify s1 t1 >> unify s3 t3
hunk ./src/Syntax/Expressions.hs 339
-        do subs1 <- T.sequence $ liftM (apply []) e1 -- Monad juggling because of Maybe
-           subs2 <- T.sequence $ liftM (apply []) e2 -- Maybe (m a) ~~> m (Maybe a)
+        do subs1 <- (apply u) e1 -- Monad juggling because of Maybe
+           subs2 <- (apply u) e2 -- Maybe (m a) ~~> m (Maybe a)
hunk ./src/Syntax/Expressions.hs 395
-                                let sections = map ((mkTInfixE tcone) . Just) straightai
+                                let sections = map (mkTInfixE tcone) straightai
hunk ./src/Syntax/Expressions.hs 419
-                let fstai' = if fstai == dummy then Nothing else Just fstai
-                let thrai' = if thrai == dummy then Nothing else Just thrai
-                return $ TInfixE fstai' sndai thrai' ty
+--                let fstai' = if fstai == dummy then Nothing else Just fstai
+--                let thrai' = if thrai == dummy then Nothing else Just thrai
+                return $ TInfixE fstai sndai thrai ty
hunk ./src/Syntax/Expressions.hs 498
-    collectSubterms s@(TInfixE _ _ _ _) t@(TInfixE (Just e1) e2 (Just e3) _) = 
-        checkSame s t >> return [e1, e2, e3]
-    collectSubterms s@(TInfixE _ _ _ _) t@(TInfixE Nothing e2 (Just e3) _)   = 
-        checkSame s t >> return [dummy, e2, e3]
-    collectSubterms s@(TInfixE _ _ _ _) t@(TInfixE (Just e1) e2 Nothing _)   = 
-        checkSame s t >> return [e1, e2, dummy]
-    collectSubterms s@(TInfixE _ _ _ _) t@(TInfixE Nothing e2 Nothing _)     = 
-        checkSame s t >> return [dummy, e2, dummy]
+    collectSubterms s@(TInfixE _ _ _ _) t@(TInfixE l c r _) = 
+        checkSame s t >> return [l,c,r]
+--    collectSubterms s@(TInfixE _ _ _ _) t@(TInfixE Nothing e2 (Just e3) _)   = 
+--        checkSame s t >> return [dummy, e2, e3]
+--    collectSubterms s@(TInfixE _ _ _ _) t@(TInfixE (Just e1) e2 Nothing _)   = 
+--        checkSame s t >> return [e1, e2, dummy]
+--    collectSubterms s@(TInfixE _ _ _ _) t@(TInfixE Nothing e2 Nothing _)     = 
+--        checkSame s t >> return [dummy, e2, dummy]
hunk ./src/Syntax/Expressions.hs 530
-moveToSubtermTE (TInfixE (Just e1) op e2 ty) 0 f = 
-    do { e <- f e1; return $ (TInfixE (Just e) op e2 ty)}
-moveToSubtermTE (TInfixE e1 op (Just e2) ty) 1 f = 
-    do { e <- f e2; return $ (TInfixE e1 op (Just e) ty)}
+moveToSubtermTE (TInfixE l op r ty) 0 f = 
+    do { e <- f l; return $ (TInfixE e op r ty)}
+moveToSubtermTE (TInfixE l op r ty) 1 f = 
+    do { e <- f r; return $ (TInfixE l op e ty)}
hunk ./src/Syntax/Expressions.hs 545
-    InfixE (liftM fromTExp e1)(fromTExp e2)(liftM fromTExp e3)
+    InfixE (Just . fromTExp $ e1)(fromTExp e2)(Just . fromTExp $ e3)
hunk ./src/Syntax/Expressions.hs 555
-toPat (TInfixE (Just l) (TConE n _) (Just r) _) = 
+toPat (TInfixE l (TConE n _) r _) = 
hunk ./src/Syntax/Expressions.hs 1000
-    ty = case (l,r) of
-            (Just _,Just _)   -> last . unArrowT . typeOf $ c
-            (Nothing,Just _)  -> mkArrowT . (drop 0) . unArrowT . typeOf $ c
-            (Just _,Nothing)  -> mkArrowT . (drop 1) . unArrowT . typeOf $ c
-            (Nothing,Nothing) -> typeOf c 
+    ty = last . unArrowT . typeOf $ c 
hunk ./src/Syntax/Expressions.hs 1005
-    foldr1 (\l r -> l . Just . r) sections $ Just lastarg
+    foldr1 (.) sections $ lastarg
hunk ./src/Syntax/Patterns.hs 103
-    substitute s Root _ = s
-    substitute s pos  t =
-        case pos of
-        -- (P i)     -> maybe t id $  moveToSubtermTP t i (Just.(substitute s Root))
-         (Dot i p) -> maybe t id $  moveToSubtermTP t i (Just.(substitute s p))
+    root _ = error "Syntax.Term.root for TPat not implemented"
+--    substitute s Root _ = s
+--    substitute s pos  t =
+--        case pos of
+--        -- (P i)     -> maybe t id $  moveToSubtermTP t i (Just.(substitute s Root))
+--         (Dot i p) -> maybe t id $  moveToSubtermTP t i (Just.(substitute s p))
hunk ./src/Syntax/Patterns.hs 300
-    aunify l@((TListP _ ty@(AppT _ ety)):xs) = 
+    aunify l@((TListP _ ty@(AppT _ ety)):xs) =  
hunk ./src/Syntax/Patterns.hs 305
-                    ragged   = dropWhile (\l -> length l == len) subterms 
+                    ragged   = dropWhile (\l -> length l == len) subterms
hunk ./src/Syntax/Terms.hs 191
-noHole          :: (Term t) => String
-                -> t
-                -> Maybe t
-noHole s t = if t == hole then fail s else return t
-
+--noHole          :: (Term t) => String
+--                -> t
+--                -> Maybe t
+--noHole s t = if t == hole then fail s else return t