Show
Ignore:
Timestamp:
07/14/07 04:45:22 (17 months ago)
Author:
audreyt
Message:

* Final batch of HPC-inspired toplevel removals:

Pugs.AST.Pads.diffPads
Pugs.AST.Utils.getMapIndex
Pugs.Internals.ID.hashList

(moved to a local definition in Pugs.Parser.Charnames)

Pugs.Lexer.balanced
Pugs.Lexer.ruleWhiteSpaceLine (and ruleEndOfLine)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/AST/Utils.hs

    r15639 r17047  
    3333            Nothing    -> errIndex def idx 
    3434        (a:_) -> return a 
    35  
    36 getMapIndex :: Int -> Maybe a -> Eval (IntMap a) -> Maybe (Eval b) -> Eval a 
    37 getMapIndex idx def doList _ | idx < 0 = do 
    38     -- first, check if the list is at least abs(idx) long. 
    39     list <- doList 
    40     if IntMap.member (abs (idx+1)) list 
    41         then return . fromJust 
    42             $ IntMap.lookup (idx `mod` (IntMap.size list)) list 
    43         else errIndex def idx 
    44 -- now we are all positive; either extend or return 
    45 getMapIndex idx def doList ext = do 
    46     list <- doList 
    47     case IntMap.lookup idx list of 
    48         Just a  -> return a 
    49         Nothing -> case ext of 
    50             Just doExt -> do { doExt ; getMapIndex idx def doList Nothing } 
    51             Nothing    -> errIndex def idx 
    5235 
    5336{-|