Changeset 4158 for src/Pugs/Bind.hs

Show
Ignore:
Timestamp:
05/30/05 10:41:25 (4 years ago)
Author:
scook0
svk:copy_cache_prev:
5706
Message:

* Changed var names & comments in Bind to reflect (Maybe invocant)
* Removed errant functions from class MonadEval?
* Corrected the "evil hack" comment for &not

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Bind.hs

    r3906 r4158  
    180180on in the call process. 
    181181-} 
    182 bindParams :: VCode -- ^ A code object to perform bindings on 
    183            -> (Maybe Exp) -- ^ List of invocants to bind 
    184            -> [Exp] -- ^ List of arguments (actual params) to bind 
     182bindParams :: VCode       -- ^ A code object to perform bindings on 
     183           -> (Maybe Exp) -- ^ (Optional) explicit invocant 
     184           -> [Exp]       -- ^ List of arguments (actual params) to bind 
    185185           -> MaybeError VCode -- ^ Returns either a new 'VCode' with all the 
    186186                               --     bindings in place, or an error message 
    187 bindParams sub invsExp argsExp = do 
    188     case bindSomeParams sub invsExp argsExp of 
     187bindParams sub invExp argsExp = do 
     188    case bindSomeParams sub invExp argsExp of 
    189189        Left errMsg -> Left errMsg 
    190190        Right boundSub -> finalizeBindings boundSub 
     
    231231parameters bound as possible (using the given invocants and args). 
    232232-} 
    233 bindSomeParams :: VCode -- ^ Code object to perform bindings on 
    234                -> (Maybe Exp) -- ^ List of invocant expressions 
    235                -> [Exp] -- ^ List of argument expressions 
     233bindSomeParams :: VCode       -- ^ Code object to perform bindings on 
     234               -> (Maybe Exp) -- ^ Explicit invocant expression 
     235               -> [Exp]       -- ^ List of argument expressions 
    236236               -> MaybeError VCode -- ^ A new 'VCode' structure, augmented 
    237237                                   --     with the new bindings 
    238 bindSomeParams sub invsExp argsExp = do 
     238bindSomeParams sub invExp argsExp = do 
    239239    let params     = subParams sub 
    240240        bindings   = subBindings sub 
     
    242242        (invPrms, argPrms) = span isInvocant params 
    243243        (givenInvs, givenArgs) = if null invPrms 
    244             then ([], (maybeToList invsExp++argsExp)) 
    245             else (maybeToList invsExp, argsExp) 
     244            then ([], (maybeToList invExp++argsExp)) 
     245            else (maybeToList invExp, argsExp) 
    246246 
    247247    let boundInv                = invPrms `zip` givenInvs -- invocants are just bound, params to given