Permalink
Browse files

Fixed a very embarrassing bug I never want to talk about again.

  • Loading branch information...
1 parent bbc636b commit 0e290cfeca842f74d129c5f1783b24cba8033f6f @sebastiaanvisser committed Nov 12, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 generic-binary.cabal
  2. +1 −1 src/Data/Binary/Generic.hs
@@ -1,5 +1,5 @@
Name: generic-binary
-Version: 1.0.0
+Version: 1.0.1
Description: Generic Data.Binary derivation using GHC generics.
Synopsis: Generic Data.Binary derivation using GHC generics.
Category: Generics, Data
@@ -46,7 +46,7 @@ instance (GBinary a, GBinary b) => GBinary (a :*: b) where
instance (GBinary a, GBinary b) => GBinary (a :+: b) where
gput (L1 l) = do B.put False; gput l
gput (R1 r) = do B.put True; gput r
- gget = B.get >>= \v -> if v then L1 <$> gget else R1 <$> gget
+ gget = B.get >>= \v -> if not v then L1 <$> gget else R1 <$> gget
instance GBinary a => GBinary (M1 D c a) where
gput = gput . unM1

0 comments on commit 0e290cf

Please sign in to comment.