diff --git a/Bio/GFF3/FeatureHier.hs b/Bio/GFF3/FeatureHier.hs
--- a/Bio/GFF3/FeatureHier.hs
+++ b/Bio/GFF3/FeatureHier.hs
@@ -1,4 +1,5 @@
 {-# OPTIONS_GHC -XFlexibleContexts #-}
+{-# LANGUAGE BangPatterns #-}
 
 module Bio.GFF3.FeatureHier ( FeatureHier, features, lookupId, lookupIdChildren
                             , fromList, insert, delete
diff --git a/Bio/GFF3/FeatureHierSequences.hs b/Bio/GFF3/FeatureHierSequences.hs
--- a/Bio/GFF3/FeatureHierSequences.hs
+++ b/Bio/GFF3/FeatureHierSequences.hs
@@ -1,4 +1,5 @@
 {-# OPTIONS_GHC -XFlexibleContexts #-}
+{-# LANGUAGE BangPatterns #-}
 
 module Bio.GFF3.FeatureHierSequences ( FeatureHierSequences, features, sequences
                                      , fromLists, parse
diff --git a/Bio/Location/LocMap.hs b/Bio/Location/LocMap.hs
--- a/Bio/Location/LocMap.hs
+++ b/Bio/Location/LocMap.hs
@@ -8,7 +8,7 @@
 'Loc.bounds'.  Query locations are then tested only against the target
 locations in the relevant zones.
 -}
-
+{-# LANGUAGE BangPatterns #-}
 module Bio.Location.LocMap (
   -- * Constructing location lookup maps
   LocMap, fromList
diff --git a/Bio/Sequence/HashWord.lhs b/Bio/Sequence/HashWord.lhs
--- a/Bio/Sequence/HashWord.lhs
+++ b/Bio/Sequence/HashWord.lhs
@@ -39,7 +39,7 @@
 \begin{code}
 
 -- | Contigous constructs an int\/eger from a contigous k-word.
-contigous :: Integral k => Int -> HashF k
+contigous :: (Integral k, Show k, Eq k) => Int -> HashF k
 contigous k' = let 
    k = fromIntegral k'
    klim = let v = 4^(k-1) in if v==0 then error ("HashWord: word size of k="++show k++" too large for this data type.") else v
@@ -71,7 +71,7 @@
 
 -- | Like 'contigous', but returns the same hash for a word and its reverse complement.
 {-# SPECIALIZE rcontig :: Int -> HashF Int #-}
-rcontig :: Integral k => Int -> HashF k
+rcontig :: (Integral k, Show k, Eq k) => Int -> HashF k
 rcontig k' = let
    k = fromIntegral k'
    klim = let v = 4^(k-1) in if v==0 then error ("HashWord: word size of k="++show k++" too large for this data type.") else v
@@ -122,7 +122,7 @@
 
 -- | Like @rcontig@, but ignoring monomers (i.e. arbitrarily long runs of a single nucelotide
 --   are treated the same a single nucleotide.
-rcpacked :: Integral k => Int -> HashF k
+rcpacked :: (Integral k, Show k, Eq k) => Int -> HashF k
 rcpacked k' = let
     k = fromIntegral k'
     klim = let v = 4^(k-1) in if v==0 then error ("HashWord: word size of k="++show k++" too large for this data type.") else v
@@ -187,14 +187,14 @@
 
 -- conversion between integers (hashes) and strings
 -- n2k ignores contents beyond k chars
-n2k :: Integral k => Int -> SeqData -> k
+n2k :: (Integral k, Show k, Eq k) => Int -> SeqData -> k
 n2k k = n2i' 0 . B.take (fromIntegral k)
 
-n2i' :: (Num a) => a -> SeqData -> a
+n2i' :: (Num a, Show a, Eq a) => a -> SeqData -> a
 n2i' acc gs = if B.null gs then acc else n2i' (4*acc + val (B.head gs)) (B.tail gs)
 
 -- inefficient, but not used much in critical code anyway
-k2n :: Integral k => Int -> k -> SeqData
+k2n :: (Integral k, Show k, Eq k) => Int -> k -> SeqData
 k2n k = fromStr . k2n' k
 
 k2n' k i = if k==1 then [unval i]
@@ -206,11 +206,11 @@
 shiftLeft = error "Keys.shiftLeft not implemented"
 -}
 
-val :: (Num t) => Char -> t
+val :: (Num t, Show t, Eq t) => Char -> t
 val g = case toUpper g of {'A' -> 0; 'C' -> 1; 'G' -> 2; 'T' -> 3; 
                            _ -> error ("val: illegal character" ++ show g)}
 
-unval :: (Num a) => a -> Char
+unval :: (Num a, Show a, Eq a) => a -> Char
 unval i = case i of {0 -> 'A'; 1 -> 'C'; 2 -> 'G'; 3 -> 'T'; 
                           _ -> error ("unval: illegal value "++show i)}
 
diff --git a/Bio/Sequence/TwoBit.hs b/Bio/Sequence/TwoBit.hs
--- a/Bio/Sequence/TwoBit.hs
+++ b/Bio/Sequence/TwoBit.hs
@@ -242,7 +242,7 @@
 
 
        -- Map 2Bit nucleotide encodings to their character equivalents
-       dec1 :: (Num t) => t -> Char
+       dec1 :: (Num t, Eq t, Show t) => t -> Char
        dec1 x = case x of 
                    0 -> 'T'; 
                    1 -> 'C'; 
@@ -251,7 +251,7 @@
                    _ -> error ("can't decode value "++show x)
 
 
-       go :: (Num a, Num t) => (a, [a], [a], [t]) -> Maybe (Char, (a, [a], [a], [t]))
+       go :: (Num a, Num t, Eq a, Eq t, Show a, Show t) => (a, [a], [a], [t]) -> Maybe (Char, (a, [a], [a], [t]))
        go (_,_,_,[])              = Nothing
        go (pos,(l:ls),(n:ns),(d:ds))
            | pos == l && pos == n = Just ('n',(pos+1,ls,ns,ds))
diff --git a/Bio/Util/TestBase.hs b/Bio/Util/TestBase.hs
--- a/Bio/Util/TestBase.hs
+++ b/Bio/Util/TestBase.hs
@@ -1,4 +1,4 @@
-{-# OPTIONS -fglasgow-exts #-}
+{-# Language ExistentialQuantification #-}
 
 module Bio.Util.TestBase where
 
diff --git a/bio.cabal b/bio.cabal
--- a/bio.cabal
+++ b/bio.cabal
@@ -1,5 +1,5 @@
 Name:                bio
-Version:             0.5.1
+Version:             0.5.2
 License:             LGPL
 License-file:        LICENSE
 Cabal-Version:       >= 1.6
