Created
October 4, 2019 00:15
-
-
Save shapr/5882fba3dfec2bf6bb2047b6899a5b98 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- | given a directory for a paper, read that json file into a Paper value | |
| readPaper :: FilePath -> IO (Maybe Paper) | |
| readPaper fp = do | |
| f <- findPaper fp "paper.json" | |
| let f' = listToMaybe f | |
| bs <- mapM BS.readFile f' -- XXX this gonna be a problem at some point XXX | |
| mapM decodeStrict bs -- is this right? do I need this pure? can I concat it with the previous line? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment