Changeset 7593 for src/Pugs/Bind.hs
- Timestamp:
- 10/13/05 13:51:55 (3 years ago)
- Files:
-
- 1 modified
-
src/Pugs/Bind.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Bind.hs
r6934 r7593 47 47 48 48 49 matchNamedAttribute :: String -> String -> Bool 49 {-| 50 Return @True@ if the given argument-pair-key matches the given parameter name. 51 Sigils and the twigils '@.@' and '@:@' are discarded from the parameter name 52 for the purposes of the match. 53 -} 54 matchNamedAttribute :: String -- ^ Named argument's key 55 -> String -- ^ Parameter name to match against 56 -> Bool 50 57 matchNamedAttribute arg (_:'.':param) = param == arg 51 58 matchNamedAttribute arg (_:':':param) = param == arg … … 199 206 let params = subParams sub 200 207 bindings = subBindings sub 201 boundInvs = filter ( \x -> isInvocant (fst x)) bindings-- bound invocants202 invocants = takeWhile isInvocant params -- expected invocants208 boundInvs = filter (isInvocant . fst) bindings -- bound invocants 209 invocants = takeWhile isInvocant params -- expected invocants 203 210 204 211 -- Check that we have enough invocants bound 205 when (not $null invocants) $ do212 unless (null invocants) $ do 206 213 let cnt = length invocants 207 214 act = length boundInvs
