Changeset 7593 for src/Pugs/Bind.hs

Show
Ignore:
Timestamp:
10/13/05 13:51:55 (3 years ago)
Author:
scook0
Message:

* Can't let gaal & autrijus have all the golfing fun :)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Bind.hs

    r6934 r7593  
    4747 
    4848 
    49 matchNamedAttribute :: String -> String -> Bool 
     49{-| 
     50Return @True@ if the given argument-pair-key matches the given parameter name. 
     51Sigils and the twigils '@.@' and '@:@' are discarded from the parameter name 
     52for the purposes of the match. 
     53-} 
     54matchNamedAttribute :: String -- ^ Named argument's key 
     55                    -> String -- ^ Parameter name to match against 
     56                    -> Bool 
    5057matchNamedAttribute arg (_:'.':param) = param == arg 
    5158matchNamedAttribute arg (_:':':param) = param == arg 
     
    199206    let params    = subParams sub 
    200207        bindings  = subBindings sub 
    201         boundInvs = filter (\x -> isInvocant (fst x)) bindings -- bound invocants 
    202         invocants = takeWhile isInvocant params                -- expected invocants 
     208        boundInvs = filter (isInvocant . fst) bindings    -- bound invocants 
     209        invocants = takeWhile isInvocant params           -- expected invocants 
    203210 
    204211    -- Check that we have enough invocants bound 
    205     when (not $ null invocants) $ do 
     212    unless (null invocants) $ do 
    206213        let cnt = length invocants 
    207214            act = length boundInvs