diff --git a/raw-feldspar.cabal b/raw-feldspar.cabal
--- a/raw-feldspar.cabal
+++ b/raw-feldspar.cabal
@@ -1,5 +1,5 @@
 name:                raw-feldspar
-version:             0.4
+version:             0.4.1
 synopsis:            Resource-Aware Feldspar
 description:         An implementation of the Feldspar EDSL with focus on
                      resource-awareness.
@@ -105,7 +105,7 @@
     prelude-edsl >= 0.4,
     syntactic >= 3.8,
       -- That version fixes overlap bugs
-    template-haskell < 2.18
+    template-haskell < 2.19
 
   if impl(ghc == 8.0.*)
     build-depends:
diff --git a/src/Data/Selection.hs b/src/Data/Selection.hs
--- a/src/Data/Selection.hs
+++ b/src/Data/Selection.hs
@@ -23,7 +23,7 @@
 #if MIN_VERSION_base(4,11,0)
 instance Semigroup (Selection a)
   where
-    (<>) = mappend
+    (<>) = union
 #endif
 
 -- |
@@ -34,7 +34,7 @@
 instance Monoid (Selection a)
   where
     mempty  = empty
-    mappend = union
+    mappend = (<>)
 
 -- | Check whether a value is included in a selection
 includes :: Selection a -> a -> Bool
diff --git a/src/Feldspar/Data/Validated.hs b/src/Feldspar/Data/Validated.hs
--- a/src/Feldspar/Data/Validated.hs
+++ b/src/Feldspar/Data/Validated.hs
@@ -37,12 +37,12 @@
 
 instance Applicative Validated
   where
-    pure  = return
+    pure  = Validated true
     (<*>) = ap
 
 instance Monad Validated
   where
-    return = Validated true
+    return = pure
     Validated valid a >>= k = Validated (valid && valid') b
       where
         Validated valid' b = k a
diff --git a/src/Feldspar/Primitive/Representation.hs b/src/Feldspar/Primitive/Representation.hs
--- a/src/Feldspar/Primitive/Representation.hs
+++ b/src/Feldspar/Primitive/Representation.hs
@@ -9,7 +9,7 @@
 
 
 import Data.Array
-import Data.Bits
+import Data.Bits (Bits (..))
 import Data.Complex
 import Data.Int
 import Data.Typeable
diff --git a/src/Feldspar/Run/Marshal.hs b/src/Feldspar/Run/Marshal.hs
--- a/src/Feldspar/Run/Marshal.hs
+++ b/src/Feldspar/Run/Marshal.hs
@@ -23,12 +23,12 @@
 
 instance Applicative Parser
   where
-    pure  = return
+    pure a = Parser $ \s -> (a,s)
     (<*>) = ap
 
 instance Monad Parser
   where
-    return a = Parser $ \s -> (a,s)
+    return = pure
     p >>= k  = Parser $ \s -> let (a,s') = runParser p s in runParser (k a) s'
 
 readParser :: forall a . (Read a, Typeable a) => Parser a
