Show
Ignore:
Timestamp:
08/28/06 09:29:28 (2 years ago)
Author:
audreyt
Message:

* <<$x $y>> would return a list even if explictly annotated as under scalar context...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim/Match.hs

    r12503 r12785  
    180180    rv      <- matchOnce str 
    181181    cxt     <- asks envContext 
    182     if (not $ isSlurpyCxt cxt) 
    183         then return (VInt $ genericLength rv) 
    184         else if rxStringify rx 
    185             then do 
    186                 strs <- mapM fromVal rv 
    187                 return (VList $ map VStr strs) 
    188             else return (VList rv) 
     182    case rxStringify rx of 
     183        True -> do 
     184            strs <- mapM fromVal rv 
     185            return (VList $ map VStr strs) 
     186        _ | isSlurpyCxt cxt -> do 
     187            return (VList rv) 
     188        _ -> do 
     189            return (VInt $ genericLength rv) 
    189190    where 
    190191    hasSubpatterns = case rx of