diff --git a/protobuf-simple.cabal b/protobuf-simple.cabal
--- a/protobuf-simple.cabal
+++ b/protobuf-simple.cabal
@@ -3,7 +3,7 @@
 
 name:                protobuf-simple
 synopsis:            Simple Protocol Buffers library (proto2)
-version:             0.1.0.3
+version:             0.1.0.4
 homepage:            https://github.com/sru-systems/protobuf-simple
 license:             MIT
 license-file:        LICENSE
diff --git a/src/Data/ProtoBufInt.hs b/src/Data/ProtoBufInt.hs
--- a/src/Data/ProtoBufInt.hs
+++ b/src/Data/ProtoBufInt.hs
@@ -41,7 +41,7 @@
 import Data.Set              as Export (fromList)
 import Data.Text.Lazy        as Export (Text, pack)
 import Data.Word             as Export (Word32, Word64)
-import Prelude               as Export (Double, Eq, Float, Ord, Show)
+import Prelude               as Export (Double, Eq, Float, Ord, Show, return)
 
 
 -- | Append a value to a Seq.
diff --git a/src/Parser/MessageGenerator.hs b/src/Parser/MessageGenerator.hs
--- a/src/Parser/MessageGenerator.hs
+++ b/src/Parser/MessageGenerator.hs
@@ -69,7 +69,9 @@
 
 getImports :: FileDesc -> MessageDesc -> State GenState Builder
 getImports f md = return $
-    getUnqualifiedImport "Control.Applicative" "(<$>)" <>
+    (if MessageDesc.getFields md == []
+       then fromString ""
+       else getUnqualifiedImport "Control.Applicative" "(<$>)") <>
     getUnqualifiedImport "Prelude" "" <>
     getQualifiedAsImport "Data.ProtoBufInt" "PB" <>
     getExtraImports f md
@@ -276,7 +278,9 @@
     mergeableLines <- getMergeableLines fields
     return $
       fromString "instance PB.Mergeable " <> fromString name <> fromString " where" <> nl <>
-      tab <> fromString "merge a b = " <> fromString name <> nl <>
+      tab <> (if mergeableLines == fromString ""
+                then fromString "merge _ _ = "
+                else fromString "merge a b = ") <> fromString name <> nl <>
       tab <> tab <> fromString "{ " <>
       mergeableLines <> nl <>
       tab <> tab <> fromString "}" <> nl
@@ -368,8 +372,10 @@
     return $
       fromString "instance PB.WireMessage " <> fromString name <> fromString " where" <> nl <>
       flines <> nl <>
-      tab <> fromString "messageToFields self = do" <> nl <>
-      mlines <> nl
+      tab <> if mlines == fromString ""
+               then fromString "messageToFields _ = PB.return ()" <> nl
+               else fromString "messageToFields self = do" <> nl <>
+                    mlines <> nl
   where
     name = MessageDesc.getName md
     fields = MessageDesc.getFields md
