Paste: can't compile

Author: cognominal
Mode: haskell
Date: Sun, 24 May 2009 12:20:26
Plain Text |
bufferStrEditorM String                                                                                                                     
bufferStr =  do                                                                                                                                 
    buffsgetBufferStack                                                                                                                     
    dmwithBuffer0 $ getA displayModeA                                                                                                       
    let (introLn, contentLns) =                                                                                                                 
      case dm of                                                                                                                                
          BDisplayAllselectBufs "all : buffer and files" $ const True                                                             
          BDisplayBuffersselectBufs "buffers only without searches buffers" $ andPreds isMereBuf (notPred searchBuffPred)             
          BDisplayFilesselectBufs "files only" isFile                                                                               
          BDisplayModifiedFilesselectBufs "modified files only"  $ andPreds isFile (notPred (isUnchangedBuffer $fst))                       
          BDisplayFoundselectBufs "searches buffer only" $ andPreds isFile searchBuffPred                                           
      where                                                                                                                                     
                selectBufs introLine aFilter =  (filter aFilter map (λb(b, b ^. identA)) bufs, introLine)                                   
                searchBuffPred =  λa(== "find ") (take 5 $ fileName a)                                                                      
                isFile (_, (Right _)) =  True                                                                                                   
                isFile _              =  False                                                                                                  
                isMereBufr            =  not isFile                                                                                             
                fileName (_, ( Left a))    =  a                                                                                                 
                fileName _            =  ""  -- shut up the compiler                                                                            
                notPred pred          =  λanot $ pred a                                                                                     
                andPreds pred1 pred2  =  λapred1 apred2 a                                                                               
    let content = intercalate "\n" $  zipWith ( λi s[ int2indexChar i] ++ "   "++ s )  [0..] $                                             
              map identString $ contentLns                                                                                                      
    return $  introLn ++ "\n" ++ content 

New Annotation

Summary:
Author:
Mode:
Body: