| -- https://stackoverflow.com/questions/21367423/streaming-xml-conduit-parse-results
|
| parseNode :: MonadThrow m => forall o. ConduitT Event o m (Maybe Node)
|
| parseNode = tag' "li" (requireAttr "id" <* ignoreAttrs) $ \i -> do
|
| return $ Window i
|
|
|
| parseNodes :: MonadThrow m => ConduitT Event Node m ()
|
| parseNodes = void $ tagIgnoreAttrs "html" $ (ignoreTree "head" ignoreAttrs) >> tagIgnoreAttrs "body" $ manyYield parseNode
|
|
|
| ---
|
|
|
| app/Main.hs:59:46: error:
|
| • Couldn't match expected type: ConduitT Event Node m () -> a0
|
| with actual type: ConduitT Event o0 m0 (Maybe ())
|
| • Possible cause: ‘ignoreTree’ is applied to too many arguments
|
| In the first argument of ‘(>>)’, namely
|
| ‘(ignoreTree "head" ignoreAttrs)’
|
| In the first argument of ‘($)’, namely
|
| ‘(ignoreTree "head" ignoreAttrs) >> tagIgnoreAttrs "body"’
|
| In the second argument of ‘($)’, namely
|
| ‘(ignoreTree "head" ignoreAttrs) >> tagIgnoreAttrs "body"
|
| $ manyYield parseNode’
|
| • Relevant bindings include
|
| parseNodes :: ConduitT Event Node m () (bound at app/Main.hs:59:1)
|
| |
|
| 59 | parseNodes = void $ tagIgnoreAttrs "html" $ (ignoreTree "head" ignoreAttrs) >> tagIgnoreAttrs "body" $ manyYield parseNode
|
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|