diff --git a/Language/Paraiso/Failure.hs b/Language/Paraiso/Failure.hs
--- a/Language/Paraiso/Failure.hs
+++ b/Language/Paraiso/Failure.hs
@@ -3,10 +3,10 @@
 -- | a module for handling failure
 module Language.Paraiso.Failure
     (
-     module Control.Monad.Failure, unsafePerformFailure
+     module Control.Failure, unsafePerformFailure
     ) where
 
-import Control.Monad.Failure
+import Control.Failure
 import System.IO.Unsafe
 
 unsafePerformFailure :: IO a -> a
diff --git a/Language/Paraiso/OM/Builder/Internal.hs b/Language/Paraiso/OM/Builder/Internal.hs
--- a/Language/Paraiso/OM/Builder/Internal.hs
+++ b/Language/Paraiso/OM/Builder/Internal.hs
@@ -240,7 +240,7 @@
   n1 <- addNodeE [n0] $ NValue type0 
   return (FromNode TArray c0 n1)
 
--- | Load the 'Axis' component of the mesh size, to either a  'TScalar' 'Value' or  'TArray' 'Value'..
+-- | Load the 'Axis' component of the mesh size, to a  'TScalar' 'Value'..
 loadSize :: (Typeable g) 
          => Axis v                          -- ^ The axis for which the size is required
          -> Builder v g a (Value TScalar g) -- ^ The 'TScalar' 'Value' that contains the size of the mesh in that direction.
diff --git a/Language/Paraiso/Prelude.hs b/Language/Paraiso/Prelude.hs
--- a/Language/Paraiso/Prelude.hs
+++ b/Language/Paraiso/Prelude.hs
@@ -5,11 +5,11 @@
 module Language.Paraiso.Prelude
   (
    Boolean(..),
-   Text, showT, 
+   Text, showT,
    (++)) where
 {-
 import           Control.Applicative (Applicative(..), (<$>))
-import           Control.Monad hiding 
+import           Control.Monad hiding
     (mapM_, sequence_, forM_, msum, mapM, sequence, forM)
 -}
 
@@ -31,10 +31,10 @@
 
 class Appendable a where
   (++) :: a -> a -> a
-  
+
 instance Appendable [a] where
   (++) = (Prelude.++)
-  
+
 instance Appendable Text.Text where
   (++) = Text.append
 
diff --git a/Language/Paraiso/Tuning/Genetic.hs b/Language/Paraiso/Tuning/Genetic.hs
--- a/Language/Paraiso/Tuning/Genetic.hs
+++ b/Language/Paraiso/Tuning/Genetic.hs
@@ -173,8 +173,10 @@
 
 
 
-newtype Get a = Get { getGet :: State.State [Bool] a } deriving (Monad)
-newtype Put a = Put { getPut :: State.State [Bool] a } deriving (Monad)
+newtype Get a = Get { getGet :: State.State [Bool] a }
+    deriving (Prelude.Functor, Prelude.Applicative, Monad)
+newtype Put a = Put { getPut :: State.State [Bool] a }
+    deriving (Prelude.Functor, Prelude.Applicative, Monad)
 
 get :: Get Bool
 get = Get $ do
diff --git a/Paraiso.cabal b/Paraiso.cabal
--- a/Paraiso.cabal
+++ b/Paraiso.cabal
@@ -4,7 +4,7 @@
 
 -- cabal cheatsheet
 --   cabal init    : initialize .cabal
---   cabal check   : detect format error 
+--   cabal check   : detect format error
 --   cabal haddock : create haddock documentation
 --   cabal sdist   : create tarball
 --   cabal upload dist/Paraiso-....tar.gz : hackage debut!
@@ -15,7 +15,7 @@
 -- The package version. See the Haskell package versioning policy
 -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
 -- standards guiding when and how versions should be incremented.
-Version:             0.3.1.3
+Version:             0.3.1.5
 Tested-With:         GHC==7.4.1
 
 -- A short (one-line) description of the package.
@@ -42,7 +42,7 @@
              functions that can be used to build Paraiso
              programs. Reserved words are @load@, @store@, @imm@,
              @loadIndex@, @loadSize@, @shift@, @reduce@ and
-             @broadcast@. 
+             @broadcast@.
              .
              Paraiso frontend uses "Data.Tensor.Typelevel"
              <http://hackage.haskell.org/package/typelevel-tensor>,
@@ -56,6 +56,8 @@
              <http://arxiv.org/abs/1204.4779> for more detail. Examples
              are in <https://github.com/nushio3/Paraiso/tree/master/examples>.
              .
+             * 0.3.1.5 : Catch up to stack lts-3.16/ghc 7.10.2, thanks to Justus Sagemüller's patch!
+             .
              * 0.3.0.0 /Doughnut/ : refined interface and support for cyclic boundary conditions.
              .
              * 0.2.0.0 /Companion/ : genetic algorithm support for automated tuning.
@@ -81,7 +83,7 @@
 Maintainer:          muranushi@gmail.com
 
 -- A copyright notice.
--- Copyright:           
+-- Copyright:
 
 Category:            Language
 
@@ -90,7 +92,7 @@
 
 -- Extra files to be distributed with the package, such as examples or
 -- a README.
--- Extra-source-files:  
+-- Extra-source-files:
 
 -- Constraint on the version of Cabal needed to build this package.
 Cabal-version:       >=1.10
@@ -121,7 +123,7 @@
                        Language.Paraiso.Generator.Plan
                        Language.Paraiso.Generator.PlanTrans
                        Language.Paraiso.Interval
-                       Language.Paraiso.Name        
+                       Language.Paraiso.Name
                        Language.Paraiso.OM
                        Language.Paraiso.OM.Arithmetic
                        Language.Paraiso.OM.Builder
@@ -146,10 +148,10 @@
                        Language.Paraiso.Tuning.Genetic
 
   -- Packages needed in order to build this package.
-  Build-depends:       array                 >= 0.2    ,    
+  Build-depends:       array                 >= 0.2    ,
                        base                  == 4.*    ,
                        containers            >= 0.4.0  ,
-                       control-monad-failure >= 0.7.0  ,
+                       failure               >= 0.1.0  ,
                        directory             >= 1.0    ,
                        filepath              >= 1.2.0  ,
                        fgl                   >= 5.4.2  ,
@@ -160,12 +162,12 @@
                        random                >= 1.0.0  ,
                        text                  >= 0.11.1 ,
                        typelevel-tensor      >= 0.1 && <1,
-                       vector                >= 0.7.1  
+                       vector                >= 0.7.1
   -- Modules not exported by this package.
-  -- Other-modules:       
-  
+  -- Other-modules:
+
   -- Extra tools (e.g. alex, hsc2hs, ...) needed to build the source.
-  -- Build-tools:         
+  -- Build-tools:
   ghc-options:     -Wall -O2  -fspec-constr-count=25
 
 
@@ -174,21 +176,22 @@
 source-repository head
   type:     git
   location: https://github.com/nushio3/Paraiso
-  
 
+
 test-suite runtests
   type: exitcode-stdio-1.0
   Build-depends:     array                 >= 0.2    ,
                      base                  == 4.*    ,
                      containers            >= 0.4.0  ,
-                     control-monad-failure >= 0.7.0  ,
                      directory             >= 1.0    ,
                      filepath              >= 1.2.0  ,
                      fgl                   >= 5.4.2  ,
-                     ListLike              >= 3.1.1  ,
-                     listlike-instances    >= 0.1    ,
+--                      ListLike              >= 3.1.1  ,
+--                      listlike-instances    >= 0.1    ,
                      mtl                   >= 2.0.1  ,
                      numeric-prelude       >= 0.2    ,
+                     process,
+                     repa                            ,
                      random                >= 1.0.0  ,
                      text                  >= 0.11.1 ,
                      typelevel-tensor      >= 0.1.1 && <1 ,
@@ -198,8 +201,7 @@
                      test-framework-quickcheck2,
                      test-framework-hunit,
                      HUnit,
-                     QuickCheck >= 2 
+                     QuickCheck >= 2
   main-is: runtests.hs
   ghc-options:     -Wall -O3  -fspec-constr-count=25
   Default-Language: Haskell2010
-
