diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,12 @@
 All notable changes to this project (as seen by library users) will be documented in this file.
 The CHANGELOG is available on [Github](https://github.com/luc-tielen/souffle-haskell.git/CHANGELOG.md).
 
+## [0.2.2] - 2020-04-30
+### Changed
+
+- Fix compile time issue when generically deriving `Marshal` typeclass
+  for data types with more than 3 fields.
+
 
 ## [0.2.1] - 2020-04-25
 ### Changed
diff --git a/lib/Language/Souffle/Internal/Constraints.hs b/lib/Language/Souffle/Internal/Constraints.hs
--- a/lib/Language/Souffle/Internal/Constraints.hs
+++ b/lib/Language/Souffle/Internal/Constraints.hs
@@ -43,7 +43,7 @@
               % "Cannot derive void type.")
 
 type family OnlySimpleFields (t :: Type) (f :: Type -> Type) :: Constraint where
-  OnlySimpleFields t (a :*: b) = (OnlySimpleField t a, OnlySimpleFields t b)
+  OnlySimpleFields t (a :*: b) = (OnlySimpleFields t a, OnlySimpleFields t b)
   OnlySimpleFields t (a :+: b) = (OnlySimpleFields t a, OnlySimpleFields t b)
   OnlySimpleFields t (M1 _ _ a) = OnlySimpleFields t a
   OnlySimpleFields _ U1 = ()
diff --git a/souffle-haskell.cabal b/souffle-haskell.cabal
--- a/souffle-haskell.cabal
+++ b/souffle-haskell.cabal
@@ -4,10 +4,10 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: b4363dbe7c0e0f23b17900dd5d83779164070f75697dd2b0ffd9afb55628c1d9
+-- hash: 25ea3b610616a6824b69546c184f2e1fd2cdcb36e648715c6166441f27013011
 
 name:           souffle-haskell
-version:        0.2.1
+version:        0.2.2
 synopsis:       Souffle Datalog bindings for Haskell
 description:    Souffle Datalog bindings for Haskell.
 category:       Logic Programming, Foreign Binding, Bindings
@@ -77,6 +77,7 @@
   other-modules:
       Test.Language.Souffle.CompiledSpec
       Test.Language.Souffle.InterpretedSpec
+      Test.Language.Souffle.MarshalSpec
       Paths_souffle_haskell
   hs-source-dirs:
       tests
diff --git a/tests/Test/Language/Souffle/MarshalSpec.hs b/tests/Test/Language/Souffle/MarshalSpec.hs
new file mode 100644
--- /dev/null
+++ b/tests/Test/Language/Souffle/MarshalSpec.hs
@@ -0,0 +1,66 @@
+
+{-# LANGUAGE DeriveGeneric #-}
+
+module Test.Language.Souffle.MarshalSpec
+  ( module Test.Language.Souffle.MarshalSpec
+  ) where
+
+import Test.Hspec
+import GHC.Generics
+import Language.Souffle.Marshal
+import Data.Text
+import Data.Int
+
+
+data Edge = Edge String String
+  deriving (Eq, Show, Generic)
+
+data EdgeStrict = EdgeStrict !String !String
+  deriving (Eq, Show, Generic)
+
+data EdgeUnpacked
+  = EdgeUnpacked {-# UNPACK #-} !Int32 {-# UNPACK #-} !Int32
+  deriving (Eq, Show, Generic)
+
+type Vertex = Text
+type Vertex' = Text
+
+data EdgeSynonyms = EdgeSynonyms Vertex Vertex
+  deriving (Eq, Show, Generic)
+
+data EdgeMultipleSynonyms = EdgeMultipleSynonyms Vertex Vertex'
+  deriving (Eq, Show, Generic)
+
+data EdgeMixed = EdgeMixed Text Vertex
+  deriving (Eq, Show, Generic)
+
+data EdgeRecord
+  = EdgeRecord
+  { fromNode :: Text
+  , toNode :: Text
+  } deriving (Eq, Show, Generic)
+
+data IntsAndStrings = IntsAndStrings Text Int32 Text
+  deriving (Eq, Show, Generic)
+
+data LargeRecord
+  = LargeRecord Int32 Int32 Int32 Int32
+  deriving (Eq, Show, Generic)
+
+
+instance Marshal Edge
+instance Marshal EdgeStrict
+instance Marshal EdgeUnpacked
+instance Marshal EdgeSynonyms
+instance Marshal EdgeMultipleSynonyms
+instance Marshal EdgeMixed
+instance Marshal EdgeRecord
+instance Marshal IntsAndStrings
+instance Marshal LargeRecord
+
+
+spec :: Spec
+spec = describe "Auto-deriving marshalling code" $
+  it "can generate code for all instances in this file" $
+    -- If this file compiles, then the test has already passed
+    42 `shouldBe` 42
