Changed the Either order in TreeUtil of getMatchedItems to match Haskell convention
This commit is contained in:
parent
7b81208794
commit
fe5141d310
|
@ -176,11 +176,11 @@ assertPatternMatch msg exp act =
|
|||
|
||||
-- | A function for getting the matched items from the patterns on the LHS
|
||||
-- Either returns the matched items, or a list of errors from the matching
|
||||
getMatchedItems :: (Data y, Data z) => y -> z -> Either Items MatchErrors
|
||||
getMatchedItems :: (Data y, Data z) => y -> z -> Either MatchErrors Items
|
||||
getMatchedItems a b
|
||||
= case errors of
|
||||
[] -> Left items
|
||||
_ -> Right errors
|
||||
[] -> Right items
|
||||
_ -> Left errors
|
||||
where (errors,items) = runState (checkMatch (mkPattern a) b) (Map.empty)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user