diff --git a/elm-bridge.cabal b/elm-bridge.cabal
--- a/elm-bridge.cabal
+++ b/elm-bridge.cabal
@@ -1,5 +1,5 @@
 name:                elm-bridge
-version:             0.3.0.0
+version:             0.3.0.2
 synopsis:            Derive Elm types from Haskell types
 description:         Building the bridge from Haskell to Elm and back. Define types once,
                      use on both sides and enjoy easy (de)serialisation. Cheers!
diff --git a/src/Elm/Derive.hs b/src/Elm/Derive.hs
--- a/src/Elm/Derive.hs
+++ b/src/Elm/Derive.hs
@@ -57,7 +57,6 @@
 unwrapUnaryRecords _    = False
 #endif
 
-
 {-| This generates a default set of options. The parameter represents the
 number of characters that must be dropped from the Haskell field names.
 The first letter of the field is then converted to lowercase, ie:
@@ -188,12 +187,21 @@
 deriveElmDef opts name =
     do TyConI tyCon <- reify name
        case tyCon of
+#if __GLASGOW_HASKELL__ >= 800
+         DataD _ _ tyVars _ constrs _ ->
+#else
          DataD _ _ tyVars constrs _ ->
+#endif
+
              case constrs of
                [] -> fail "Can not derive empty data decls"
                [RecC _ conFields] -> deriveAlias opts name tyVars conFields
                _ -> deriveSum opts name tyVars constrs
+#if __GLASGOW_HASKELL__ >= 800
+         NewtypeD _ _ tyVars _ (RecC _ conFields) _ ->
+#else
          NewtypeD _ _ tyVars (RecC _ conFields) _ ->
+#endif
              deriveAlias opts name tyVars conFields
          TySynD _ vars otherTy ->
              deriveSynonym opts name vars otherTy
