diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,9 @@
 <!-- -*- Markdown -*- -->
 
+## 0.5.0.1
+
+- Use Haskell implementation test instead of flag test in .cabal
+
 ## 0.5.0.0
 
 - Add generic instances of FromSql, ToSql and PersistableWidth.
diff --git a/persistable-record.cabal b/persistable-record.cabal
--- a/persistable-record.cabal
+++ b/persistable-record.cabal
@@ -1,5 +1,5 @@
 name:                persistable-record
-version:             0.5.0.0
+version:             0.5.0.1
 synopsis:            Binding between SQL database values and haskell records.
 description:         This package contiains types to represent table constraints and
                      interfaces to bind between SQL database values and Haskell records.
@@ -19,10 +19,6 @@
                      , GHC == 7.4.1, GHC == 7.4.2
 extra-source-files:  ChangeLog.md
 
-flag ghc74-generic
-  description: Enable for generic programming using old ghc. If true use ghc-prim.
-  default:     False
-
 library
   exposed-modules:
                         Database.Record.FromSql
@@ -45,7 +41,7 @@
                         , transformers
                         , dlist
                         , names-th
-  if flag(ghc74-generic)
+  if impl(ghc == 7.4.*)
     build-depends:        ghc-prim == 0.2.*
 
   hs-source-dirs:       src
@@ -56,7 +52,7 @@
   build-depends:          base <5
                         , quickcheck-simple
                         , persistable-record
-  if flag(ghc74-generic)
+  if impl(ghc == 7.4.*)
     build-depends:        ghc-prim == 0.2.*
 
   type:                 exitcode-stdio-1.0
