diff --git a/Data/IntMap/CharMap.hs b/Data/IntMap/CharMap.hs
--- a/Data/IntMap/CharMap.hs
+++ b/Data/IntMap/CharMap.hs
@@ -1,13 +1,29 @@
+{-# LANGUAGE CPP #-}
 module Data.IntMap.CharMap where
 
+#ifdef __GLASGOW_HASKELL__
 import GHC.Base(unsafeChr)
+#else
+import Data.Char (chr)
+#endif
 import Data.Char as C(ord)
 import Data.List as L (map)
 import qualified Data.IntMap as M
 import qualified Data.IntSet as S(IntSet)
-import Data.Monoid(Monoid)
+import Data.Monoid(Monoid(..))
 
-newtype CharMap a = CharMap {unCharMap :: M.IntMap a} deriving (Monoid,Eq,Read,Show,Ord,Functor)
+#ifndef __GLASGOW_HASKELL__
+unsafeChr = chr
+#endif
+
+newtype CharMap a = CharMap {unCharMap :: M.IntMap a} deriving (Eq,Ord,Read,Show)
+
+instance Monoid (CharMap a) where
+  mempty = CharMap mempty
+  CharMap x `mappend` CharMap y = CharMap (x `mappend` y)
+
+instance Functor CharMap where
+  fmap f (CharMap m) = CharMap (fmap f m)
 
 type Key = Char
 
diff --git a/Data/IntMap/EnumMap.hs b/Data/IntMap/EnumMap.hs
--- a/Data/IntMap/EnumMap.hs
+++ b/Data/IntMap/EnumMap.hs
@@ -1,14 +1,24 @@
 module Data.IntMap.EnumMap where
 
-import Data.Foldable(Foldable)
+import Data.Foldable(Foldable(..))
 import qualified Data.IntMap as M
 import qualified Data.IntSet.EnumSet as S (EnumSet(..))
-import Data.Monoid(Monoid)
+import Data.Monoid(Monoid(..))
 import Prelude
 import qualified Prelude as L (map)
 
 newtype EnumMap k a = EnumMap {unEnumMap :: M.IntMap a}
-  deriving (Eq,Read,Show,Ord,Monoid,Foldable,Functor)
+  deriving (Eq,Ord,Read,Show)
+
+instance Ord k => Monoid (EnumMap k a) where
+  mempty = EnumMap mempty
+  EnumMap x `mappend` EnumMap y = EnumMap (x `mappend` y)
+
+instance Ord k => Functor (EnumMap k) where
+  fmap f (EnumMap m) = EnumMap (fmap f m)
+
+instance Ord k => Foldable (EnumMap k) where
+  foldMap f (EnumMap m) = foldMap f m
 
 (!) :: (Enum key) => EnumMap key a -> key -> a
 (!) (EnumMap m) k = (M.!) m (fromEnum k)
diff --git a/Data/IntSet/EnumSet.hs b/Data/IntSet/EnumSet.hs
--- a/Data/IntSet/EnumSet.hs
+++ b/Data/IntSet/EnumSet.hs
@@ -2,10 +2,14 @@
 
 import qualified Data.IntSet as S
 import qualified Data.List as L (map)
-import Data.Monoid(Monoid)
+import Data.Monoid(Monoid(..))
 
 newtype EnumSet e = EnumSet {unEnumSet :: S.IntSet}
-  deriving (Monoid,Eq,Read,Show,Ord)
+  deriving (Eq,Ord,Read,Show)
+
+instance Monoid (EnumSet e) where
+  mempty = EnumSet mempty
+  EnumSet x `mappend` EnumSet y = EnumSet (x `mappend` y)
 
 (\\) :: (Enum e) => EnumSet e -> EnumSet e -> EnumSet e
 (\\) (EnumSet s1) (EnumSet s2) = EnumSet ((S.\\) s1 s2)
diff --git a/Text/Regex/TDFA.hs b/Text/Regex/TDFA.hs
--- a/Text/Regex/TDFA.hs
+++ b/Text/Regex/TDFA.hs
@@ -39,10 +39,6 @@
 
 module Text.Regex.TDFA(getVersion_Text_Regex_TDFA
                       ,module Text.Regex.TDFA.Wrap
-                      ,module Text.Regex.TDFA.String
-                      ,module Text.Regex.TDFA.ByteString
-                      ,module Text.Regex.TDFA.ByteString.Lazy
-                      ,module Text.Regex.TDFA.Sequence
                       ,module Text.Regex.Base) where
 
 import Data.Version(Version(..))
@@ -55,6 +51,6 @@
 
 getVersion_Text_Regex_TDFA :: Version
 getVersion_Text_Regex_TDFA =
-  Version { versionBranch = [0,92]
+  Version { versionBranch = [0,94]
           , versionTags = ["tdfa","unstable"]
           }
diff --git a/Text/Regex/TDFA/Common.hs b/Text/Regex/TDFA/Common.hs
--- a/Text/Regex/TDFA/Common.hs
+++ b/Text/Regex/TDFA/Common.hs
@@ -66,7 +66,11 @@
 
 -- | Used to track elements of the pattern that accept characters or 
 -- are anchors
-newtype DoPa = DoPa {dopaIndex :: Int} deriving (Eq,Ord,Enum)
+newtype DoPa = DoPa {dopaIndex :: Int} deriving (Eq,Ord)
+
+instance Enum DoPa where
+  toEnum = DoPa
+  fromEnum = dopaIndex
 
 instance Show DoPa where
   showsPrec p (DoPa {dopaIndex=i}) = ('#':) . showsPrec p i
diff --git a/Text/Regex/TDFA/CorePattern.hs b/Text/Regex/TDFA/CorePattern.hs
--- a/Text/Regex/TDFA/CorePattern.hs
+++ b/Text/Regex/TDFA/CorePattern.hs
@@ -71,7 +71,11 @@
 
 -- This is newtype'd to allow control over class instances
 -- This is a set of WhichTest where each test has associated pattern location information
-newtype SetTestInfo = SetTestInfo {getTests :: EnumMap WhichTest (EnumSet DoPa)} deriving (Eq,Monoid)
+newtype SetTestInfo = SetTestInfo {getTests :: EnumMap WhichTest (EnumSet DoPa)} deriving (Eq)
+
+instance Monoid SetTestInfo where
+  mempty = SetTestInfo mempty
+  SetTestInfo x `mappend` SetTestInfo y = SetTestInfo (x `mappend` y)
 
 instance Show SetTestInfo where
   show (SetTestInfo sti) = "SetTestInfo "++show (mapSnd (Set.toList) $ Map.assocs sti)
diff --git a/Text/Regex/TDFA/MutRun.hs b/Text/Regex/TDFA/MutRun.hs
--- a/Text/Regex/TDFA/MutRun.hs
+++ b/Text/Regex/TDFA/MutRun.hs
@@ -15,7 +15,7 @@
 import Text.Regex.Base(MatchArray,RegexOptions(..))
 import Text.Regex.TDFA.Common
 import Text.Regex.TDFA.TDFA(isDFAFrontAnchored)
-import Text.Regex.TDFA.RunMutState(newTagEngine,tagsToGroupsST,newScratch,resetScratch,SScratch(..))
+import Text.Regex.TDFA.RunMutState(TagEngine(..),newTagEngine,tagsToGroupsST,newScratch,resetScratch,SScratch(..))
 import Text.Regex.TDFA.Wrap()
 -- import Debug.Trace
 
@@ -69,12 +69,13 @@
   
   runHerePure :: [MatchArray]
   runHerePure = Lazy.runST (do
-    (!findTrans,!updateWinner,!performTrans) <- lazy (newTagEngine regexIn)
+    TagEngine findTrans updateWinner performTrans <- lazy (newTagEngine regexIn)
     let -- runHere :: Maybe (WScratch s,(Position,Char,String)) -> DT
         --         -> MScratch s -> MScratch s
         --         -> Position -> Char -> String
         --         -> ST s (Maybe (WScratch s,(Position,Char,String)))
-        runHere winning !dt !s1 !s2 !off !prev !input = {-# SCC "runHere" #-}
+        runHere winning dt s1 s2 off prev input = {-# SCC "runHere" #-}
+          s1 `seq` s2 `seq` off `seq` prev `seq` input `seq`
           case dt of
             Testing' {dt_test=wt,dt_a=a,dt_b=b} ->
               if test wt off prev input
@@ -94,7 +95,8 @@
         -- end of runHere
     -- body of runHerePure continues
     (SScratch s1 s2 w0) <- lazy (newScratch regexIn offsetIn)
-    let go !off !prev !input = {-# SCC "runHerePure.go" #-} do
+    let go off prev input = {-# SCC "runHerePure.go" #-}
+         off `seq` prev `seq` input `seq` do
           answer <- lazy (runHere Nothing (d_dt (regex_dfa regexIn)) s1 s2 off prev input)
           case answer of
             Nothing -> case input of
@@ -123,7 +125,7 @@
 
   noCap = {-# SCC "noCap" #-}
     let dtIn = (d_dt (regex_dfa regexIn))
-        go !off !prev !input = 
+        go off prev input = off `seq` prev `seq` input `seq`
           case runHereNoCap Nothing dtIn off prev input of
             Nothing -> case input of
                          [] -> []
@@ -145,7 +147,8 @@
                          in (ma:[])
          else go offsetIn prevIn inputIn
 
-  runHereNoCap winning !dt !off !prev !input =  {-# SCC "runHereNoCap" #-}
+  runHereNoCap winning dt off prev input =  {-# SCC "runHereNoCap" #-}
+    off `seq` prev `seq` input `seq`
     case dt of
       Simple' {dt_win=w, dt_trans=t, dt_other=o} ->
         let winning' = if IMap.null w then winning else Just (off,prev,input)
diff --git a/Text/Regex/TDFA/MutRunBS.hs b/Text/Regex/TDFA/MutRunBS.hs
--- a/Text/Regex/TDFA/MutRunBS.hs
+++ b/Text/Regex/TDFA/MutRunBS.hs
@@ -9,14 +9,14 @@
 import Data.Array.IArray((!),array,bounds)
 import Data.Array.MArray(rangeSize)
 import qualified Data.ByteString.Char8 as B
-import qualified Data.ByteString.Base as B(unsafeIndex)
+import qualified Data.ByteString.Unsafe as B(unsafeIndex)
 import Data.IntMap.CharMap(CharMap(..))
 import qualified Data.IntMap as IMap(null,lookup)
 
 import Text.Regex.Base(MatchArray,RegexOptions(..))
 import Text.Regex.TDFA.Common
 import Text.Regex.TDFA.TDFA(isDFAFrontAnchored)
-import Text.Regex.TDFA.RunMutState(newTagEngine2,tagsToGroupsST,newScratch,resetScratch,SScratch(..))
+import Text.Regex.TDFA.RunMutState(TagEngine(..),newTagEngine2,tagsToGroupsST,newScratch,resetScratch,SScratch(..))
 import Text.Regex.TDFA.Wrap()
 -- import Debug.Trace
 
@@ -74,12 +74,13 @@
 
   runHerePure :: [MatchArray]
   runHerePure = Lazy.runST (do
-    (!findTrans,!updateWinner,!performTrans) <- lazy (newTagEngine2 regexIn)
+    TagEngine findTrans updateWinner performTrans <- lazy (newTagEngine2 regexIn)
     let -- runHere :: Maybe (WScratch s,(Position,Char,String)) -> DT
         --         -> MScratch s -> MScratch s
         --         -> Position
         --         -> ST s (Maybe (WScratch s,(Position,Char,String)))
-        runHere winning !dt !s1 !s2 !off = {-# SCC "runHere" #-}
+        runHere winning dt s1 s2 off = {-# SCC "runHere" #-}
+          s1 `seq` s2 `seq` off `seq`
           case dt of
             Testing' {dt_test=wt,dt_a=a,dt_b=b} ->
               if test wt off
@@ -97,7 +98,7 @@
         -- end of runHere
     -- body of runHerePure continues
     (SScratch s1 s2 w0) <- lazy (newScratch regexIn offsetIn)
-    let go !off = {-# SCC "runHerePure.go" #-} do
+    let go off = {-# SCC "runHerePure.go" #-} off `seq` do
           answer <- lazy (runHere Nothing (d_dt (regex_dfa regexIn)) s1 s2 off)
           case answer of
             Nothing -> if off==final
@@ -126,7 +127,7 @@
 
   noCap = {-# SCC "noCap" #-}
     let dtIn = (d_dt (regex_dfa regexIn))
-        go !off = 
+        go off =
           case runHereNoCap Nothing dtIn off of
             Nothing -> if off==final then [] else go (succ off)
             Just off' ->
@@ -145,7 +146,8 @@
                          in (ma:[])
          else go offsetIn
 
-  runHereNoCap winning !dt !off =  {-# SCC "runHereNoCap" #-}
+  runHereNoCap winning dt off =  {-# SCC "runHereNoCap" #-}
+    off `seq`
     case dt of
       Simple' {dt_win=w, dt_trans=(CharMap t), dt_other=o} ->
         let winning' = if IMap.null w then winning else Just off
diff --git a/Text/Regex/TDFA/MutRunLBS.hs b/Text/Regex/TDFA/MutRunLBS.hs
--- a/Text/Regex/TDFA/MutRunLBS.hs
+++ b/Text/Regex/TDFA/MutRunLBS.hs
@@ -15,7 +15,7 @@
 import Text.Regex.Base(MatchArray,RegexOptions(..))
 import Text.Regex.TDFA.Common
 import Text.Regex.TDFA.TDFA(isDFAFrontAnchored)
-import Text.Regex.TDFA.RunMutState(newTagEngine2,tagsToGroupsST,newScratch,resetScratch,SScratch(..))
+import Text.Regex.TDFA.RunMutState(TagEngine(..),newTagEngine2,tagsToGroupsST,newScratch,resetScratch,SScratch(..))
 import Text.Regex.TDFA.Wrap()
 -- import Debug.Trace
 
@@ -73,12 +73,13 @@
 
   runHerePure :: [MatchArray]
   runHerePure = Lazy.runST (do
-    (!findTrans,!updateWinner,!performTrans) <- lazy (newTagEngine2 regexIn)
+    TagEngine findTrans updateWinner performTrans <- lazy (newTagEngine2 regexIn)
     let -- runHere :: Maybe (WScratch s,(Position,Char,String)) -> DT
         --         -> MScratch s -> MScratch s
         --         -> Position
         --         -> ST s (Maybe (WScratch s,(Position,Char,String)))
-        runHere winning !dt !s1 !s2 !off = {-# SCC "runHere" #-}
+        runHere winning dt s1 s2 off = {-# SCC "runHere" #-}
+          s1 `seq` s2 `seq` off `seq`
           case dt of
             Testing' {dt_test=wt,dt_a=a,dt_b=b} ->
               if test wt off
@@ -96,7 +97,7 @@
         -- end of runHere
     -- body of runHerePure continues
     (SScratch s1 s2 w0) <- lazy (newScratch regexIn offsetIn)
-    let go !off = {-# SCC "runHerePure.go" #-} do
+    let go off = {-# SCC "runHerePure.go" #-} off `seq` do
           answer <- lazy (runHere Nothing (d_dt (regex_dfa regexIn)) s1 s2 off)
           case answer of
             Nothing -> if off==final
@@ -125,7 +126,7 @@
 
   noCap = {-# SCC "noCap" #-}
     let dtIn = (d_dt (regex_dfa regexIn))
-        go !off = 
+        go off =
           case runHereNoCap Nothing dtIn off of
             Nothing -> if off==final then [] else go (succ off)
             Just off' ->
@@ -144,7 +145,8 @@
                          in (ma:[])
          else go offsetIn
 
-  runHereNoCap winning !dt !off =  {-# SCC "runHereNoCap" #-}
+  runHereNoCap winning dt off =  {-# SCC "runHereNoCap" #-}
+    off `seq`
     case dt of
       Simple' {dt_win=w, dt_trans=(CharMap t), dt_other=o} ->
         let winning' = if IMap.null w then winning else Just off
diff --git a/Text/Regex/TDFA/MutRunSeq.hs b/Text/Regex/TDFA/MutRunSeq.hs
--- a/Text/Regex/TDFA/MutRunSeq.hs
+++ b/Text/Regex/TDFA/MutRunSeq.hs
@@ -17,7 +17,7 @@
 import Text.Regex.Base(MatchArray,RegexOptions(..))
 import Text.Regex.TDFA.Common
 import Text.Regex.TDFA.TDFA(isDFAFrontAnchored)
-import Text.Regex.TDFA.RunMutState(newTagEngine,tagsToGroupsST,newScratch,resetScratch,SScratch(..))
+import Text.Regex.TDFA.RunMutState(TagEngine(..),newTagEngine,tagsToGroupsST,newScratch,resetScratch,SScratch(..))
 import Text.Regex.TDFA.Wrap()
 -- import Debug.Trace
 
@@ -71,12 +71,13 @@
   
   runHerePure :: [MatchArray]
   runHerePure = Lazy.runST (do
-    (!findTrans,!updateWinner,!performTrans) <- lazy (newTagEngine regexIn)
+    TagEngine findTrans updateWinner performTrans <- lazy (newTagEngine regexIn)
     let -- runHere :: Maybe (WScratch s,(Position,Char,Seq Char)) -> DT
         --         -> MScratch s -> MScratch s
         --         -> Position -> Char -> Seq Char
         --         -> ST s (Maybe (WScratch s,(Position,Char,Seq Char)))
-        runHere winning !dt !s1 !s2 !off !prev !input = {-# SCC "runHere" #-}
+        runHere winning dt s1 s2 off prev input = {-# SCC "runHere" #-}
+          s1 `seq` s2 `seq` off `seq` prev `seq` input `seq`
           case dt of
             Testing' {dt_test=wt,dt_a=a,dt_b=b} ->
               if test wt off prev input
@@ -96,7 +97,8 @@
         -- end of runHere
     -- body of runHerePure continues
     (SScratch s1 s2 w0) <- lazy (newScratch regexIn offsetIn)
-    let go !off !prev !input = {-# SCC "runHerePure.go" #-} do
+    let go off prev input = {-# SCC "runHerePure.go" #-}
+         off `seq` prev `seq` input `seq` do
           answer <- lazy (runHere Nothing (d_dt (regex_dfa regexIn)) s1 s2 off prev input)
           case answer of
             Nothing -> case S.viewl input of
@@ -126,7 +128,7 @@
 
   noCap = {-# SCC "noCap" #-}
     let dtIn = (d_dt (regex_dfa regexIn))
-        go !off !prev !input = 
+        go off prev input = 
           case runHereNoCap Nothing dtIn off prev input of
             Nothing -> case S.viewl input of
                          EmptyL -> []
@@ -148,7 +150,8 @@
                          in (ma:[])
          else go offsetIn prevIn inputIn
 
-  runHereNoCap winning !dt !off !prev !input =  {-# SCC "runHereNoCap" #-}
+  runHereNoCap winning dt off prev input =  {-# SCC "runHereNoCap" #-}
+    off `seq` prev `seq` input `seq`
     case dt of
       Simple' {dt_win=w, dt_trans=t, dt_other=o} ->
         let winning' = if IMap.null w then winning else Just (off,prev,input)
diff --git a/Text/Regex/TDFA/ReadRegex.hs b/Text/Regex/TDFA/ReadRegex.hs
--- a/Text/Regex/TDFA/ReadRegex.hs
+++ b/Text/Regex/TDFA/ReadRegex.hs
@@ -40,6 +40,7 @@
 
 p_atom =  p_group <|> p_bracket <|> p_char <?> "an atom"
 
+group_index :: CharParser (GroupIndex,Int) (Maybe GroupIndex)
 group_index = do
   (gi,ci) <- getState
   let index = succ gi
diff --git a/Text/Regex/TDFA/RunMutState.hs b/Text/Regex/TDFA/RunMutState.hs
--- a/Text/Regex/TDFA/RunMutState.hs
+++ b/Text/Regex/TDFA/RunMutState.hs
@@ -1,4 +1,6 @@
-module Text.Regex.TDFA.RunMutState(newTagEngine,newTagEngine2,newScratch,tagsToGroupsST
+{-# LANGUAGE CPP #-}
+module Text.Regex.TDFA.RunMutState(TagEngine(..),newTagEngine,newTagEngine2
+                                  ,newScratch,tagsToGroupsST
                                   ,toInstructions,compareWith,resetScratch
                                   ,SScratch(..),MScratch,WScratch) where
 
@@ -8,9 +10,15 @@
 import Control.Monad.State(MonadState(..),execState)
 
 import Data.Array.Base(unsafeRead,unsafeWrite,STUArray(..))
+#ifdef __GLASGOW_HASKELL__
 import GHC.Arr(STArray(..))
 import GHC.ST(ST(..))
 import GHC.Prim(MutableByteArray#,RealWorld,Int#,sizeofMutableByteArray#,unsafeCoerce#)
+#else
+import Control.Monad(when)
+import Control.Monad.ST(ST)
+import Data.Array.ST(STArray)
+#endif
 
 import Data.Array.MArray(MArray(..),newListArray,unsafeFreeze)
 import Data.Array.IArray(Array,(!),bounds,assocs)
@@ -32,11 +40,13 @@
 err :: String -> a
 err s = common_error "Text.Regex.TDFA.RunMutState"  s
 
+data TagEngine s t p = TagEngine
+  !(MScratch s -> Position -> IntMap (IntMap (t,Instructions)) -> ST s ())
+  !(MScratch s -> p -> Maybe (WScratch s,p) -> IntMap Instructions -> ST s (Maybe (WScratch s,p)))
+  !(MScratch s -> MScratch s -> Position -> IntMap (IntMap (DoPa,Instructions)) -> ST s ())
+
 {-# INLINE newTagEngine #-}
-newTagEngine :: Regex -> ST s (MScratch s -> Position -> IntMap (IntMap (t,Instructions)) -> ST s ()
-                              ,MScratch s -> (Position,Char,xxx) -> Maybe (WScratch s,(Position,Char,xxx)) -> IntMap Instructions -> ST s (Maybe (WScratch s,(Position,Char,xxx)))
-                              ,MScratch s -> MScratch s -> Position -> IntMap (IntMap (DoPa,Instructions)) -> ST s ()
-                              )
+newTagEngine :: Regex -> ST s (TagEngine s t (Position,Char,xxx))
 newTagEngine regexIn = do
   (which,count) <- newBoard regexIn
   let comp = makeTagComparer (regex_tags regexIn)
@@ -108,13 +118,10 @@
 -- findTrans :: forall s. ({-Dest-}Index,IntMap {-Source-} (DoPa,Instructions)) -> ST s ()
 -- updateWinner :: IntMap {- Source -} Instructions -> ST s (Maybe (WScratch s,(Position,Char,String)))
 -- performTrans :: IntMap {-Dest-} (IntMap {-Source-} (DoPa,Instructions)) -> ST s ()
-  return (findTrans,updateWinner,performTrans)
+  return (TagEngine findTrans updateWinner performTrans)
 
 {-# INLINE newTagEngine2 #-}
-newTagEngine2 :: Regex -> ST s (MScratch s -> Position -> IntMap (IntMap (t,Instructions)) -> ST s ()
-                               ,MScratch s -> Position -> Maybe (WScratch s,Position) -> IntMap Instructions -> ST s (Maybe (WScratch s,Position))
-                               ,MScratch s -> MScratch s -> Position -> IntMap (IntMap (DoPa,Instructions)) -> ST s ()
-                               )
+newTagEngine2 :: Regex -> ST s (TagEngine s t Position)
 newTagEngine2 regexIn = do
   (which,count) <- newBoard regexIn
   let comp = makeTagComparer (regex_tags regexIn)
@@ -186,7 +193,7 @@
 -- findTrans :: forall s. ({-Dest-}Index,IntMap {-Source-} (DoPa,Instructions)) -> ST s ()
 -- updateWinner :: IntMap {- Source -} Instructions -> ST s (Maybe (WScratch s,(Position,Char,String)))
 -- performTrans :: IntMap {-Dest-} (IntMap {-Source-} (DoPa,Instructions)) -> ST s ()
-  return (findTrans,updateWinner,performTrans)
+  return (TagEngine findTrans updateWinner performTrans)
 
 -- XXX change first element type to store winning orbit' and such?
 newBoard :: Regex -> ST s (STArray s Index ((Index,Instructions),a,OrbitLog)
@@ -592,12 +599,14 @@
   forM_ (range (1,b_max)) $ (\i -> act i (aGroups!i))
   unsafeFreeze ma
 
+#ifdef __GLASGOW_HASKELL__
 foreign import ccall unsafe "memcpy"
     memcpy :: MutableByteArray# RealWorld -> MutableByteArray# RealWorld -> Int# -> IO ()
 
+-- This has been updated for ghc 6.8.3
 {-# INLINE copySTU #-}
 copySTU :: (Show i,Ix i,MArray (STUArray s) e (ST s)) => STUArray s i e -> STUArray s i e -> ST s ()
-copySTU (STUArray _ _ msource) (STUArray _ _ mdest) =
+copySTU (STUArray _ _ _ msource) (STUArray _ _ _ mdest) =
 -- do b1 <- getBounds s1
 --  b2 <- getBounds s2
 --  when (b1/=b2) (error ("\n\nWTF copySTU: "++show (b1,b2)))
@@ -606,14 +615,14 @@
     case unsafeCoerce# memcpy mdest msource n# s1# of { (# s2#, () #) ->
     (# s2#, () #) }}
 
-{-  Commented out -- more useful to non-GHC compilers
+#else /* !__GLASGOW_HASKELL__ */
 
-copySTArray :: (MArray (STUArray s) e (ST s))=> STUArray s Tag e -> STUArray s Tag e -> ST s ()
-copySTArray source destination = do
+copySTU :: (MArray (STUArray s) e (ST s))=> STUArray s Tag e -> STUArray s Tag e -> ST s ()
+copySTU source destination = do
   b@(start,stop) <- getBounds source
   b' <- getBounds destination
-  traceCopy ("> copySTArray "++show b) $ do
+  -- traceCopy ("> copySTArray "++show b) $ do
   when (b/=b') (fail $ "Text.Regex.TDFA.RunMutState copySTUArray bounds mismatch"++show (b,b'))
   forM_ (range b) $ \index ->
     unsafeRead source index >>= unsafeWrite destination index
--}
+#endif /* !__GLASGOW_HASKELL__ */
diff --git a/Text/Regex/TDFA/TDFA.hs b/Text/Regex/TDFA/TDFA.hs
--- a/Text/Regex/TDFA/TDFA.hs
+++ b/Text/Regex/TDFA/TDFA.hs
@@ -228,9 +228,11 @@
 
 isDTLosing :: DT -> Bool
 isDTLosing (Testing' {dt_a=a,dt_b=b}) = isDTLosing a && isDTLosing b
-isDTLosing (Simple' {dt_win=w,dt_trans=(CharMap t),dt_other=o}) | not (IMap.null w) = False
-    | Just (dfa,_) <- o, not (ISet.null (d_id dfa)) = False
-    | otherwise =
+isDTLosing (Simple' {dt_win=w})
+    | not (IMap.null w) = False
+isDTLosing (Simple' {dt_other=Just (dfa,_)})
+    | not (ISet.null (d_id dfa)) = False
+isDTLosing (Simple' {dt_trans=CharMap t}) =
   let destinations = map (d_id . fst) . IMap.elems $ t
   in all ISet.null destinations -- True for empty list of destinations
 
diff --git a/Text/Regex/TDFA/Wrap.hs b/Text/Regex/TDFA/Wrap.hs
--- a/Text/Regex/TDFA/Wrap.hs
+++ b/Text/Regex/TDFA/Wrap.hs
@@ -29,13 +29,15 @@
 -- there is an error in processing, then 'error' will be called.
 (=~) :: (RegexMaker Regex CompOption ExecOption source,RegexContext Regex source1 target)
      => source1 -> source -> target
-(=~) x r = let q :: Regex
-               q = makeRegex r
-           in match q x
+(=~) x r = let make :: RegexMaker Regex CompOption ExecOption a => a -> Regex
+               make = makeRegex
+           in match (make r) x
 
 -- | This is the monadic matching operator.  If a single match fails,
 -- then 'fail' will be called.
 (=~~) :: (RegexMaker Regex CompOption ExecOption source,RegexContext Regex source1 target,Monad m)
       => source1 -> source -> m target
-(=~~) x r = do (q :: Regex) <- makeRegexM r
+(=~~) x r = do let make :: (RegexMaker Regex CompOption ExecOption a, Monad m) => a -> m Regex
+                   make = makeRegexM
+               q <- make r
                matchM q x
diff --git a/regex-tdfa.cabal b/regex-tdfa.cabal
--- a/regex-tdfa.cabal
+++ b/regex-tdfa.cabal
@@ -1,5 +1,5 @@
 Name:                   regex-tdfa
-Version:                0.92
+Version:                0.94
 -- Cabal-Version:       >=1.1.6
 License:                BSD3
 License-File:           LICENSE
@@ -13,7 +13,8 @@
 Description:            A new all Haskell "tagged" DFA regex engine, inspired by libtre
 Category:               Text
 Tested-With:            GHC
-Build-Depends:          regex-base >= 0.80, base >= 2.0, parsec, mtl
+Build-Depends:          regex-base >= 0.80, base >= 2.0, parsec, mtl, containers, array, bytestring
+Build-Type:             Simple
 -- Data-Files:
 -- Extra-Source-Files:
 -- Extra-Tmp-Files:
@@ -41,9 +42,9 @@
 Buildable:              True
 -- Other-Modules:
 -- HS-Source-Dirs:         "."
-Extensions:             MultiParamTypeClasses, FunctionalDependencies, BangPatterns
-GHC-Options:            -Wall -Werror -O2 -funbox-strict-fields
--- GHC-Options:            -Wall -Werror -O2
+Extensions:             MultiParamTypeClasses, FunctionalDependencies, BangPatterns, MagicHash, RecursiveDo, NoMonoPatBinds, ForeignFunctionInterface, UnboxedTuples, TypeOperators, FlexibleContexts, ExistentialQuantification, UnliftedFFITypes, TypeSynonymInstances
+GHC-Options:            -Wall -O2 -funbox-strict-fields
+-- GHC-Options:            -Wall -O2
 -- GHC-Options:            -Wall -ddump-minimal-imports
 -- GHC-Prof-Options:       -auto-all
 -- Hugs-Options:
