diff --git a/Setup.hs b/Setup.hs
deleted file mode 100644
--- a/Setup.hs
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env runhaskell
-
--- I usually compile this with "ghc --make -o setup Setup.hs"
-
-import Distribution.Simple(defaultMain)
-main = defaultMain
diff --git a/Setup.lhs b/Setup.lhs
new file mode 100644
--- /dev/null
+++ b/Setup.lhs
@@ -0,0 +1,11 @@
+#!/usr/bin/env runhaskell
+
+> -- I usually compile this with "ghc --make -o setup Setup.hs"
+
+> module Main (main) where
+>
+> import Distribution.Simple
+>
+> main :: IO ()
+> main = defaultMain
+
diff --git a/Text/Regex/Base/Context.hs b/Text/Regex/Base/Context.hs
--- a/Text/Regex/Base/Context.hs
+++ b/Text/Regex/Base/Context.hs
@@ -185,9 +185,12 @@
   match r s = maybe (-1,0) (!0) (matchOnce r s)
   matchM r s = maybe regexFailed (return.(!0)) (matchOnce r s)
 
+#if __GLASGOW_HASKELL__
+-- overlaps with instance (RegexLike a b) => RegexContext a b (Array Int b)
 instance (RegexLike a b) => RegexContext a b MatchArray where 
   match r s = maybe nullArray id (matchOnce r s)
   matchM r s = maybe regexFailed return (matchOnce r s)
+#endif
 
 instance (RegexLike a b) => RegexContext a b (b,MatchText b,b) where 
   match r s = maybe (s,nullArray,empty) id (matchOnceText r s)
@@ -216,21 +219,27 @@
            , mrMatch = whole
            , mrAfter = post
            , mrSubs = fmap fst ma
-           , mrSubList = tail (map fst subs) })
+           , mrSubList = map fst subs })
 
 -- ** Instances based on matchAll,matchAllText
 
+#if __GLASGOW_HASKELL__
+-- overlaps with instance (RegexLike a b) => RegexContext a b [Array Int b]
 instance (RegexLike a b) => RegexContext a b [MatchArray] where
   match = matchAll
   matchM = nullFail
+#endif
 
 instance (RegexLike a b) => RegexContext a b [MatchText b] where
   match = matchAllText
   matchM = nullFail
            
+#if __GLASGOW_HASKELL__
+-- overlaps with instance (RegexLike a b) => RegexContext a b [b]
 instance (RegexLike a b) => RegexContext a b [(MatchOffset,MatchLength)] where
   match r s = [ ma!0 | ma <- matchAll r s ]
   matchM = nullFail
+#endif
 
 instance (RegexLike a b) => RegexContext a b [b] where
   match r s = [ fst (ma!0) | ma <- matchAllText r s ]
diff --git a/regex-base.cabal b/regex-base.cabal
--- a/regex-base.cabal
+++ b/regex-base.cabal
@@ -2,7 +2,7 @@
 -- To fix for cabal < 1.1.4 comment out the Extra-Source-Files line
 -- ****************************************************************
 Name:                   regex-base
-Version:                0.71
+Version:                0.72.0.1
 -- Cabal-Version:       >=1.1.4
 License:                BSD3
 License-File:           LICENSE
@@ -16,21 +16,36 @@
 Description:            Interface API for regex-posix,pcre,parsec,dfa
 Category:               Text
 Tested-With:            GHC
-Build-Depends:          base >= 2.0
+Build-Type:             Simple
+Cabal-Version:          >=1.2
+
+Flag split-base
+Flag bytestring-in-base
+
+Library
+  if flag(split-base)
+    Build-Depends:      base >= 3, array
+  else
+    Build-Depends:      base < 3
+  if flag(bytestring-in-base)
+    Build-Depends:      base >= 2 && < 3
+  else
+    Build-Depends:      base < 2 || >= 3, bytestring
 -- Data-Files:
 -- Extra-Source-Files:     Text/Regex/Lazy/TestCompat.hs, Text/Regex/Lazy/TestFull.hs, Text/Regex/Impl/TestContext.hs, TestTextRegexLazy.hs, Example.hs, Example2.hs, lazy.html, README, Makefile
 -- Extra-Tmp-Files:
-Exposed-Modules:        Text.Regex.Base
+  Exposed-Modules:      Text.Regex.Base
                         Text.Regex.Base.RegexLike
                         Text.Regex.Base.Context
                         Text.Regex.Base.Impl
-Buildable:              True
+  Buildable:              True
 -- Other-Modules:
 -- ********* Be backward compatible until 6.4.2 is futher deployed
 -- HS-Source-Dirs:         "."
-Extensions:             MultiParamTypeClasses, FunctionalDependencies
+  Extensions:             MultiParamTypeClasses, FunctionalDependencies, CPP
 -- GHC-Options:            -Wall -Werror
-GHC-Options:            -Wall -Werror -O2
+-- GHC-Options:            -Wall -Werror -O2
+  GHC-Options:            -Wall -O2
 -- GHC-Options:            -Wall -ddump-minimal-imports
 -- GHC-Prog-Options: 
 -- Hugs-Options:
