diff --git a/Math/NumberTheory/MoebiusInversion.hs b/Math/NumberTheory/MoebiusInversion.hs
--- a/Math/NumberTheory/MoebiusInversion.hs
+++ b/Math/NumberTheory/MoebiusInversion.hs
@@ -8,7 +8,7 @@
 --
 -- Generalised Moebius inversion
 --
-{-# LANGUAGE BangPatterns #-}
+{-# LANGUAGE BangPatterns, FlexibleContexts #-}
 module Math.NumberTheory.MoebiusInversion
     ( generalInversion
     , totientSum
diff --git a/Math/NumberTheory/MoebiusInversion/Int.hs b/Math/NumberTheory/MoebiusInversion/Int.hs
--- a/Math/NumberTheory/MoebiusInversion/Int.hs
+++ b/Math/NumberTheory/MoebiusInversion/Int.hs
@@ -8,7 +8,7 @@
 --
 -- Generalised Moebius inversion for 'Int' valued functions.
 --
-{-# LANGUAGE BangPatterns #-}
+{-# LANGUAGE BangPatterns, FlexibleContexts #-}
 {-# OPTIONS_GHC -fspec-constr-count=8 #-}
 module Math.NumberTheory.MoebiusInversion.Int
     ( generalInversion
diff --git a/Math/NumberTheory/Powers/Cubes.hs b/Math/NumberTheory/Powers/Cubes.hs
--- a/Math/NumberTheory/Powers/Cubes.hs
+++ b/Math/NumberTheory/Powers/Cubes.hs
@@ -8,7 +8,7 @@
 --
 -- Functions dealing with cubes. Moderately efficient calculation of integer
 -- cube roots and testing for cubeness.
-{-# LANGUAGE MagicHash, BangPatterns, CPP #-}
+{-# LANGUAGE MagicHash, BangPatterns, CPP, FlexibleContexts #-}
 module Math.NumberTheory.Powers.Cubes
     ( integerCubeRoot
     , integerCubeRoot'
diff --git a/Math/NumberTheory/Powers/Fourth.hs b/Math/NumberTheory/Powers/Fourth.hs
--- a/Math/NumberTheory/Powers/Fourth.hs
+++ b/Math/NumberTheory/Powers/Fourth.hs
@@ -8,7 +8,7 @@
 --
 -- Functions dealing with fourth powers. Efficient calculation of integer fourth
 -- roots and efficient testing for being a square's square.
-{-# LANGUAGE MagicHash, CPP #-}
+{-# LANGUAGE MagicHash, CPP, FlexibleContexts #-}
 module Math.NumberTheory.Powers.Fourth
     ( integerFourthRoot
     , integerFourthRoot'
diff --git a/Math/NumberTheory/Powers/Squares.hs b/Math/NumberTheory/Powers/Squares.hs
--- a/Math/NumberTheory/Powers/Squares.hs
+++ b/Math/NumberTheory/Powers/Squares.hs
@@ -8,7 +8,7 @@
 --
 -- Functions dealing with squares. Efficient calculation of integer square roots
 -- and efficient testing for squareness.
-{-# LANGUAGE MagicHash, BangPatterns, CPP #-}
+{-# LANGUAGE MagicHash, BangPatterns, CPP, FlexibleContexts #-}
 module Math.NumberTheory.Powers.Squares
     ( -- * Square root calculation
       integerSquareRoot
diff --git a/Math/NumberTheory/Primes/Counting/Impl.hs b/Math/NumberTheory/Primes/Counting/Impl.hs
--- a/Math/NumberTheory/Primes/Counting/Impl.hs
+++ b/Math/NumberTheory/Primes/Counting/Impl.hs
@@ -8,7 +8,7 @@
 --
 -- Number of primes not exceeding @n@, @&#960;(n)@, and @n@-th prime.
 --
-{-# LANGUAGE CPP, BangPatterns #-}
+{-# LANGUAGE CPP, BangPatterns, FlexibleContexts #-}
 #if __GLASGOW_HASKELL__ >= 700
 {-# OPTIONS_GHC -fspec-constr-count=24 #-}
 #endif
diff --git a/Math/NumberTheory/Primes/Sieve/Eratosthenes.hs b/Math/NumberTheory/Primes/Sieve/Eratosthenes.hs
--- a/Math/NumberTheory/Primes/Sieve/Eratosthenes.hs
+++ b/Math/NumberTheory/Primes/Sieve/Eratosthenes.hs
@@ -8,7 +8,7 @@
 --
 -- Sieve
 --
-{-# LANGUAGE CPP, BangPatterns #-}
+{-# LANGUAGE CPP, BangPatterns, FlexibleContexts #-}
 #if __GLASGOW_HASKELL__ >= 700
 {-# OPTIONS_GHC -fspec-constr-count=8 #-}
 #endif
diff --git a/arithmoi.cabal b/arithmoi.cabal
--- a/arithmoi.cabal
+++ b/arithmoi.cabal
@@ -1,5 +1,5 @@
 name                : arithmoi
-version             : 0.4.1.0
+version             : 0.4.1.1
 cabal-version       : >= 1.6
 author              : Daniel Fischer
 copyright           : (c) 2011 Daniel Fischer
@@ -27,14 +27,18 @@
 
 category            : Math, Algorithms, Number Theory
 
-tested-with         : GHC == 7.4.2, GHC==7.6.3, GHC==7.8.1
+tested-with         : GHC == 7.4.2, GHC==7.6.3, GHC==7.8.3
 
 extra-source-files  : Changes, TODO
 
+Flag llvm
+    Description         : Compile the library with the llvm backend
+    Default             : True
+
 library
     build-depends       : base >= 4 && < 5, array >= 0.3 && < 0.6, ghc-prim,
                           integer-gmp, containers >= 0.3 && < 0.6, random >= 1.0 && < 1.1,
-                          mtl >= 2.0 && < 2.2
+                          mtl >= 2.0 && < 2.3
     exposed-modules     : Math.NumberTheory.Logarithms
                           Math.NumberTheory.Moduli
                           Math.NumberTheory.MoebiusInversion
@@ -71,6 +75,8 @@
                           Math.NumberTheory.Primes.Testing.Certificates.Internal
     extensions          : BangPatterns
     ghc-options         : -O2 -Wall
+    if flag(llvm)
+        ghc-options     : -fllvm
     ghc-prof-options    : -O2 -auto
 
 source-repository head
