Commit 6cc5cf44 authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Small code review amendment

parent 7ffa286c
Pipeline #7826 canceled with stages
......@@ -434,7 +434,7 @@ matchingNode :: Maybe ListType
-> (NgramsTerm -> Bool)
-> Tree NgramsElement
-> Bool
matchingNode listType minSize maxSize searchQuery (Node inputNode children) =
matchingNode listType minSize maxSize searchFn (Node inputNode children) =
let nodeSize = inputNode ^. ne_size
matchesListType = maybe (const True) (==) listType
respectsMinSize = maybe (const True) ((<=) . getMinSize) minSize
......@@ -443,7 +443,7 @@ matchingNode listType minSize maxSize searchQuery (Node inputNode children) =
in respectsMinSize nodeSize
&& respectsMaxSize nodeSize
-- Search for the query either in the root or in the children.
&& (searchQuery (inputNode ^. ne_ngrams) || any (matchingNode listType minSize maxSize searchQuery) children)
&& (searchFn (inputNode ^. ne_ngrams) || any (matchingNode listType minSize maxSize searchFn) children)
&& matchesListType (inputNode ^. ne_list)
-- | Version of 'buildForest' specialised over the 'NgramsElement' as the values of the tree.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment