diff --git a/CHANGES b/CHANGES
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+Version 3.8
+  * Added `WithBase`
+
 Version 3.3.0
 
 * Remove 'RunStateM'
diff --git a/monadLib.cabal b/monadLib.cabal
--- a/monadLib.cabal
+++ b/monadLib.cabal
@@ -1,5 +1,5 @@
 Name:           monadLib
-Version:        3.7.3
+Version:        3.8
 License:        BSD3
 License-file:   LICENSE
 Author:         Iavor S. Diatchki
@@ -25,13 +25,6 @@
     MonadLib,
     MonadLib.Monads,
     MonadLib.Derive
-  Extensions:
-    CPP,
-    MultiParamTypeClasses,
-    FunctionalDependencies,
-    Rank2Types,
-    FlexibleInstances,
-    UndecidableInstances
 
   if flag(base3)
     Build-depends: base < 4
diff --git a/src/MonadLib.hs b/src/MonadLib.hs
--- a/src/MonadLib.hs
+++ b/src/MonadLib.hs
@@ -1,8 +1,9 @@
 {-# LANGUAGE CPP, MultiParamTypeClasses, FunctionalDependencies,
              UndecidableInstances, FlexibleInstances #-}
+{-# LANGUAGE DataKinds, TypeFamilies, TypeOperators #-}
 {-# LANGUAGE Rank2Types #-}
 {-# LANGUAGE ScopedTypeVariables #-}
-{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE Safe #-}
 {-| This library provides a collection of monad transformers that
     can be combined to produce various monads.
 -}
@@ -43,6 +44,7 @@
   asks, puts, sets, sets_, raises,
   mapReader, mapWriter, mapException,
   handle,
+  WithBase,
 
   -- * Miscellaneous
   version,
@@ -62,6 +64,7 @@
 #endif
 import System.Exit(ExitCode,exitWith)
 import Data.Monoid
+import Data.Kind(Type)
 import Prelude hiding (Ordering(..))
 
 -- | The current version of the library.
@@ -822,5 +825,32 @@
                        case r of
                          Right a -> return a
                          Left x  -> f x
+
+
+{- | A convenience type family for defining stacks of monads.
+The first entry in the list is the top-most layer of the monad stack
+(i.e., the one that is furtherest from the base).  For example:
+
+> newtype M a = M { unM ::
+>   WithBase IO
+>     '[ ReaderT    Int
+>      , StateT     Char
+>      , ExceptionT String
+>      ] a
+>   }
+
+is equivalent to:
+
+> newtype M a = M { unM ::
+>   ReaderT    Int      (
+>   StateT     Char     (
+>   ExceptionT String
+>   IO                  )) a
+>   }
+
+-}
+type family WithBase base layers :: Type -> Type where
+  WithBase b '[]        = b
+  WithBase b (f ': fs)  = f (WithBase b fs)
 
 
