bmp 1.2.3.4 → 1.2.4.1
raw patch · 2 files changed
+19/−19 lines, 2 filesdep ~binaryPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: binary
API changes (from Hackage documentation)
Files
- Codec/BMP/BitmapInfo.hs +16/−16
- bmp.cabal +3/−3
Codec/BMP/BitmapInfo.hs view
@@ -3,9 +3,11 @@ ( BitmapInfo (..) , getBitmapInfoV3) where+ import Codec.BMP.BitmapInfoV3 import Codec.BMP.BitmapInfoV4 import Codec.BMP.BitmapInfoV5+import Control.Applicative import Data.Binary import Data.Binary.Get @@ -20,22 +22,20 @@ instance Binary BitmapInfo where- get- = do size <- lookAhead getWord32le - case size of- 40 -> do- info <- get- return $ InfoV3 info- - 108 -> do- info <- get- return $ InfoV4 info- - 124 -> do- info <- get- return $ InfoV5 info- - _ -> error "Codec.BMP.BitmapInfo.get: unhandled header size"+ get = + (do 40 <- getWord32le+ info <- get+ return $ InfoV3 info)+ <|>+ (do 108 <- getWord32le+ info <- get+ return $ InfoV4 info)+ <|>+ (do 120 <- getWord32le+ info <- get+ return $ InfoV5 info)+ <|> + (error "Codec.BMP.BitmapInfo.get: unhandled header size") put xx = case xx of
bmp.cabal view
@@ -1,5 +1,5 @@ Name: bmp-Version: 1.2.3.4+Version: 1.2.4.1 License: MIT License-file: LICENSE Author: Ben Lippmeier@@ -23,10 +23,10 @@ build-Depends: base == 4.*, bytestring == 0.10.*,- binary == 0.5.*+ binary == 0.6.* ghc-options:- -Wall -fno-warn-missing-signatures+ -O2 -Wall -fno-warn-missing-signatures extensions: BangPatterns