diff options
| author | Ian Lynagh <ian@well-typed.com> | 2013-07-27 15:47:53 +0100 |
|---|---|---|
| committer | Ian Lynagh <ian@well-typed.com> | 2013-07-27 15:49:54 +0100 |
| commit | 385055c0bdb05743b572b20caec9333a202ef88c (patch) | |
| tree | b2901bb4b537bce2523b6fff9d85a42b5f8310c7 /compiler/main/Annotations.hs | |
| parent | fb520bb6fe266f5581e2ce78e4c4f02619f0392b (diff) | |
| download | haskell-385055c0bdb05743b572b20caec9333a202ef88c.tar.gz | |
Beautify a few Binary instances
Diffstat (limited to 'compiler/main/Annotations.hs')
| -rw-r--r-- | compiler/main/Annotations.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/main/Annotations.hs b/compiler/main/Annotations.hs index ec179d86e2..7de1a9914b 100644 --- a/compiler/main/Annotations.hs +++ b/compiler/main/Annotations.hs @@ -24,6 +24,7 @@ import Serialized import UniqFM import Unique +import Control.Monad import Data.Maybe import Data.Typeable import Data.Word ( Word8 ) @@ -75,8 +76,8 @@ instance Binary name => Binary (AnnTarget name) where get bh = do h <- getByte bh case h of - 0 -> get bh >>= (return . NamedTarget) - _ -> get bh >>= (return . ModuleTarget) + 0 -> liftM NamedTarget $ get bh + _ -> liftM ModuleTarget $ get bh instance Outputable Annotation where ppr ann = ppr (ann_target ann) |
