Commit bfbdc993 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[parser] fix typing for medline

parent 9d9c15ec
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module PUBMED.Parser where module PUBMED.Parser where
import Control.Lens ((^?), (^.), (^..), only, to, ix, prism', Prism') import Control.Lens ((^?), (^.), (^..), only, to, ix, prism', Prism', Traversal')
import Data.Maybe (catMaybes, fromMaybe) import Data.Maybe (catMaybes, fromMaybe)
import Data.Time (UTCTime(..)) import Data.Time (UTCTime(..))
import Data.Time.Segment (jour) import Data.Time.Segment (jour)
...@@ -76,6 +76,7 @@ parsePubMed txt = catMaybes $ txt ^.. pubmedArticle . to pubMed ...@@ -76,6 +76,7 @@ parsePubMed txt = catMaybes $ txt ^.. pubmedArticle . to pubMed
<*> el ^? article . to pubMedArticle <*> el ^? article . to pubMedArticle
<*> el ^? pubDate . to pubMedDate <*> el ^? pubDate . to pubMedDate
where where
medline :: Traversal' TTL.Element TTL.Element
medline = namedEl "MedlineCitation" medline = namedEl "MedlineCitation"
article = medline . namedEl "Article" article = medline . namedEl "Article"
articleId = medline . namedEl "PMID" articleId = medline . namedEl "PMID"
......
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