Changeset 10597 for src/Pugs/Eval

Show
Ignore:
Timestamp:
06/11/06 09:36:46 (2 years ago)
Author:
audreyt
Message:

* Next, we adjust Eval.Var.inferExpCxt to use this static

inferencing engine, instead of the dynamic one as before.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Eval/Var.hs

    r10356 r10597  
    417417subscript. See 'reduce' for @\{\}@ and @\[\]@. 
    418418-} 
     419inferExpCxt :: Exp -> Eval Cxt 
     420inferExpCxt exp = return $ if isScalarLValue exp 
     421    then cxtItemAny 
     422    else cxtSlurpyAny 
     423{- 
    419424inferExpCxt :: Exp -- ^ Expression to find the context of 
    420425         -> Eval Cxt 
    421 inferExpCxt (Ann (Pos _) exp)            = inferExpCxt exp 
     426inferExpCxt (Ann (Pos {}) exp)           = inferExpCxt exp 
    422427inferExpCxt (Ann (Cxt cxt) _)            = return cxt 
    423428inferExpCxt (Syn "," _)            = return cxtSlurpyAny 
     
    425430inferExpCxt (Syn "{}" [_, exp])    = inferExpCxt exp 
    426431inferExpCxt (Syn (sigil:"{}") _) = return $ cxtOfSigil sigil 
    427 inferExpCxt (Val (VList _))        = return cxtSlurpyAny 
     432inferExpCxt (Val (VList {}))       = return cxtSlurpyAny 
    428433inferExpCxt (Val (VRef ref))       = do 
    429434    cls <- asks envClasses 
     
    432437        then cxtSlurpyAny 
    433438        else CxtItem typ 
    434 inferExpCxt (Val _)                 = return cxtItemAny 
     439inferExpCxt (Val {})                = return cxtItemAny 
    435440inferExpCxt (Var (sigil:_))         = return $ cxtOfSigil sigil 
    436441inferExpCxt (App (Var "&list") _ _) = return cxtSlurpyAny 
     
    446451        _ -> cxtSlurpyAny 
    447452inferExpCxt _                      = return cxtSlurpyAny 
     453-} 
    448454 
    449455{-|