Changeset 12176 for src/Pugs/Prim/Match.hs
- Timestamp:
- 08/12/06 19:55:50 (2 years ago)
- Files:
-
- 1 modified
-
src/Pugs/Prim/Match.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Prim/Match.hs
r10736 r12176 2 2 3 3 module Pugs.Prim.Match ( 4 op2Match, rxSplit, rxSplit_n, matchFromMR, pkgParents 4 op2Match, rxSplit, rxSplit_n, matchFromMR, pkgParents, pkgParentClasses 5 5 ) where 6 6 import Pugs.Internals … … 279 279 meta <- readRef =<< fromVal ref 280 280 fetch <- doHash meta hash_fetchVal 281 attrs <- fromVal =<< fetch "traits" 282 pkgs <- mapM pkgParents attrs 281 attrs <- fromVal =<< fetch "is" 282 attrs' <- fromVal =<< fetch "does" -- XXX wrong 283 pkgs <- mapM pkgParents (attrs ++ attrs') 283 284 return $ nub (pkg:concat pkgs) 284 285 286 -- XXX - copy and paste code; merge with above! 287 pkgParentClasses :: VStr -> Eval [VStr] 288 pkgParentClasses pkg = do 289 ref <- readVar (':':'*':pkg) 290 if ref == undef then return [] else do 291 meta <- readRef =<< fromVal ref 292 fetch <- doHash meta hash_fetchVal 293 attrs <- fromVal =<< fetch "is" 294 pkgs <- mapM pkgParentClasses attrs 295 return $ nub (pkg:concat pkgs)
