Changeset 2817 for src/Pugs/Bind.hs

Show
Ignore:
Timestamp:
05/07/05 15:48:57 (4 years ago)
Author:
scook0
svk:copy_cache_prev:
4340
Message:

More Haddocks for Bind

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Bind.hs

    r2812 r2817  
    9090 
    9191-- |Return @True@ if the given expression represents a pair (i.e. it uses the 
    92 -- \"=>\" pair composer). 
     92-- \"=>\" pair constructor). 
    9393isPair :: Exp -> Bool 
    9494isPair (Pos _ exp) = isPair exp 
     
    109109unPair x                                = error ("Not a pair: " ++ show x) 
    110110 
    111 -- performs a binding and then verifies that it's complete in one go 
    112111{-| 
    113112Bind parameters to a callable, then verify that the binding is complete 
     
    115114bindings). Uses 'bindSomeParams' to perform the initial binding, then uses 
    116115'finalizeBindings' to check all required params and give default values to 
    117 any unbound optional ones. 
     116any unbound optional ones. Once this is complete, /everything/ should be 
     117bound. 
    118118-} 
    119119bindParams :: VCode -- ^ A code object to perform bindings on 
     
    127127        Right boundSub -> finalizeBindings boundSub 
    128128 
    129 -- verifies that all invocants and required params were given 
    130 -- and binds default values to unbound optionals 
     129{-| 
     130Verify that all invocants and required parameters are bound, and give default 
     131values to any unbound optional parameters. 
     132-} 
    131133finalizeBindings :: VCode -> MaybeError VCode 
    132134finalizeBindings sub = do 
     
    161163    } 
    162164 
    163 -- takes invocants and arguments, and creates a binding from the remaining params in the sub 
    164165{-| 
    165166Take a code object and lists of invocants and arguments, and produce (if 
     
    167168parameters bound as possible (using the given invocants and args). 
    168169-} 
    169 bindSomeParams :: VCode -> [Exp] -> [Exp] -> MaybeError VCode 
     170bindSomeParams :: VCode -- ^ Code object to perform bindings on 
     171               -> [Exp] -- ^ List of invocant expressions 
     172               -> [Exp] -- ^ List of argument expressions 
     173               -> MaybeError VCode -- ^ A new 'VCode' structure, augmented 
     174                                   --     with the new bindings 
    170175bindSomeParams sub invsExp argsExp = do 
    171176    let params     = subParams sub