Skip to content

Commit

Permalink
Describe avoided pitfall in new code
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaisorblade committed Aug 14, 2016
1 parent 19cf0a1 commit 3e69d2a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Data/Yaml/Extra.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import Data.Yaml hiding (decodeFileEither, encodeFile)
import qualified Data.ByteString as B
import System.IO

-- Note: we refrain from using 'B.readFile' and 'B.writeFile', as they open
-- the file in binary mode rather than text mode.
decodeFileEither :: FromJSON a => FilePath -> IO (Either ParseException a)
decodeFileEither path = withFile path ReadMode $
\hnd -> do
Expand Down

0 comments on commit 3e69d2a

Please sign in to comment.