diff --git a/constraints-deriving.cabal b/constraints-deriving.cabal
--- a/constraints-deriving.cabal
+++ b/constraints-deriving.cabal
@@ -4,10 +4,10 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: 8479ce57401f6861d28b9788c4d6722bb49be9d6bdbcede970e729f8d9887a37
+-- hash: c2db64ad19f7bc5dcefbf65b4cc6f18f31e222344bce693f390c652fe11cc053
 
 name:           constraints-deriving
-version:        1.1.0.0
+version:        1.1.1.0
 synopsis:       Manipulating constraints and deriving class instances programmatically.
 description:    The library provides a plugin to derive class instances programmatically. Please see the README on GitHub at <https://github.com/achirkin/constraints-deriving#readme>
 category:       Constraints
diff --git a/example/Lib/BackendFamily.hs b/example/Lib/BackendFamily.hs
--- a/example/Lib/BackendFamily.hs
+++ b/example/Lib/BackendFamily.hs
@@ -24,7 +24,7 @@
   The idea is that this module does not expose any implementation details;
   one can even implement multiple copies of this file depending on the compiler or package flags,
   (such as the presence of SIMD extensions).
-  
+
   In this example, I provide four implementations, depending on the dimensionality of the vector.
   Note, that no evidence of the implementation details is exported.
  -}
@@ -40,7 +40,7 @@
 import Data.Constraint
 import Debug.Trace
 import GHC.Base
-import GHC.TypeLits    (type (+), type (-), CmpNat, KnownNat, Nat, natVal)
+import GHC.TypeLits
 #if __GLASGOW_HASKELL__ < 804
 import Data.Semigroup
 #endif
diff --git a/src-constraints/Data/Constraint.hs b/src-constraints/Data/Constraint.hs
--- a/src-constraints/Data/Constraint.hs
+++ b/src-constraints/Data/Constraint.hs
@@ -59,8 +59,8 @@
 -- This module is taken from
 -- <https://github.com/ekmett/constraints/blob/963c0e904ad48a5cec29a0cb649622d8c1872af4/src/Data/Constraint.hs  constraints:Data.Constraint>
 -- A few things have been cut from the module to remove dependencies.
--- 
 --
+--
 ----------------------------------------------------------------------------
 module Data.Constraint
   (
@@ -104,11 +104,17 @@
 import Data.Bits (Bits)
 import Data.Functor.Identity (Identity)
 import Numeric.Natural (Natural)
+#if !MIN_VERSION_base(4,13,0)
 import Data.Word (Word)
+#endif
 import Data.Coerce (Coercible)
 import Data.Type.Coercion(Coercion(..))
 #if MIN_VERSION_base(4,10,0)
+#if MIN_VERSION_base(4,13,0)
+import Data.Type.Equality (type (~~))
+#else
 import Data.Type.Equality ((:~~:)(..), type (~~))
+#endif
 import Type.Reflection (TypeRep, typeRepKind, withTypeable)
 #endif
 
diff --git a/src/Data/Constraint/Bare.hs b/src/Data/Constraint/Bare.hs
--- a/src/Data/Constraint/Bare.hs
+++ b/src/Data/Constraint/Bare.hs
@@ -1,12 +1,13 @@
-{-# LANGUAGE CPP             #-}
-{-# LANGUAGE ConstraintKinds #-}
-{-# LANGUAGE DataKinds       #-}
-{-# LANGUAGE GADTs           #-}
-{-# LANGUAGE KindSignatures  #-}
-{-# LANGUAGE MagicHash       #-}
-{-# LANGUAGE PatternSynonyms #-}
-{-# LANGUAGE RankNTypes      #-}
-{-# LANGUAGE ViewPatterns    #-}
+{-# LANGUAGE CPP                 #-}
+{-# LANGUAGE ConstraintKinds     #-}
+{-# LANGUAGE DataKinds           #-}
+{-# LANGUAGE GADTs               #-}
+{-# LANGUAGE KindSignatures      #-}
+{-# LANGUAGE MagicHash           #-}
+{-# LANGUAGE PatternSynonyms     #-}
+{-# LANGUAGE RankNTypes          #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE ViewPatterns        #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Data.Constraint.Bare
@@ -22,6 +23,7 @@
 module Data.Constraint.Bare
   ( BareConstraint, pattern DictValue
   , dictToBare, bareToDict
+  , withBareConstraint
   ) where
 
 
@@ -50,14 +52,19 @@
 #endif
 
 -- | Extract a `Constraint` from a `Dict`
-dictToBare :: Dict c -> BareConstraint c
-dictToBare Dict = case unsafeCoerce# id of MagicBC c -> c
+dictToBare :: forall c . Dict c -> BareConstraint c
+dictToBare Dict = case (unsafeCoerce# id :: Magic c (BareConstraint c)) of Magic c -> c
 {-# INLINE dictToBare #-}
 
 -- | Wrap a `Constraint` into a `Dict`
-bareToDict :: BareConstraint c -> Dict c
-bareToDict = unsafeCoerce# (MagicDi Dict)
+bareToDict :: forall c . BareConstraint c -> Dict c
+bareToDict = unsafeCoerce# (Magic Dict :: Magic c (Dict c))
 {-# INLINE bareToDict #-}
 
-newtype MagicDi c = MagicDi (c => Dict c)
-newtype MagicBC c = MagicBC (c => BareConstraint c)
+-- | Provide a constraint to a function using `BareConstraint`.
+--   This allows to provide constraints on-demand (lazily), rather than eagerly
+--   pattern-matching against `Dict` before executing the function.
+withBareConstraint :: forall c r . BareConstraint c -> (c => r) -> r
+withBareConstraint bc f = unsafeCoerce# (Magic f :: Magic c r) bc
+
+newtype Magic c r = Magic (c => r)
diff --git a/src/Data/Constraint/Deriving.hs b/src/Data/Constraint/Deriving.hs
--- a/src/Data/Constraint/Deriving.hs
+++ b/src/Data/Constraint/Deriving.hs
@@ -16,7 +16,9 @@
 import Data.List  (sortOn)
 import GhcPlugins hiding (OverlapMode (..), overlapMode)
 import InstEnv    (is_cls, is_tys)
-import Type       (tyConAppTyCon_maybe)
+#if __GLASGOW_HASKELL__ < 808
+import Type (tyConAppTyCon_maybe)
+#endif
 
 import Data.Constraint.Deriving.ClassDict
 import Data.Constraint.Deriving.DeriveAll
diff --git a/src/Data/Constraint/Deriving/CorePluginM.hs b/src/Data/Constraint/Deriving/CorePluginM.hs
--- a/src/Data/Constraint/Deriving/CorePluginM.hs
+++ b/src/Data/Constraint/Deriving/CorePluginM.hs
@@ -56,6 +56,9 @@
 import           TcRnMonad           (getEps, initTc)
 import           TcRnTypes           (TcM)
 import qualified Unify
+#if __GLASGOW_HASKELL__ >= 808
+import qualified TysWiredIn
+#endif
 #if __GLASGOW_HASKELL__ < 806
 import qualified Kind      (isConstraintKind)
 import qualified TcRnMonad (initTcForLookup)
@@ -217,6 +220,9 @@
         ec <- flip mkTyConApp [] <$> lookupTyCon (cTupleTyConName 0)
         saveAndReturn (Just ec) $ \a e -> e { tyEmptyConstraint = a }
 
+#if __GLASGOW_HASKELL__ >= 808
+    , classTypeEq = pure TysWiredIn.eqClass
+#else
     , classTypeEq = do
         m <- ask modDataTypeEquality
         mc <- try $ lookupName m cnTypeEq >>= lookupThing >>= \case
@@ -224,6 +230,7 @@
             -> return cls
           _ -> exception
         saveAndReturn mc $ \a e -> e { classTypeEq = a }
+#endif
 
     , globalInstEnv = do
         hscEnv <- liftCoreM getHscEnv
@@ -736,5 +743,7 @@
 vnDictToBare :: OccName
 vnDictToBare = mkVarOcc "dictToBare"
 
+#if __GLASGOW_HASKELL__ < 808
 cnTypeEq :: OccName
 cnTypeEq = mkTcOcc "~"
+#endif
diff --git a/src/Data/Constraint/Deriving/DeriveAll.hs b/src/Data/Constraint/Deriving/DeriveAll.hs
--- a/src/Data/Constraint/Deriving/DeriveAll.hs
+++ b/src/Data/Constraint/Deriving/DeriveAll.hs
@@ -26,7 +26,7 @@
 import qualified Data.Kind           (Constraint, Type)
 import           Data.List           (groupBy, isPrefixOf, nubBy, sortOn)
 import           Data.Maybe          (catMaybes, fromMaybe)
-import           Data.Monoid         (First (..), Monoid (..))
+import           Data.Monoid
 import qualified FamInstEnv
 import           GhcPlugins          hiding (OverlapMode (..), overlapMode,
                                       (<>))
diff --git a/test/out/DeriveAll04.stderr b/test/out/DeriveAll04.stderr
--- a/test/out/DeriveAll04.stderr
+++ b/test/out/DeriveAll04.stderr
@@ -3,5 +3,5 @@
   instance Eq B -- Defined at test/Spec/DeriveAll04.hs:*
   instance [overlapping] Eq (BazTy A)
     -- Defined in `Spec.DeriveAll04'
-  instance [incoherent] Eq (BazTy fresh_*)
+  instance [incoherent] Eq (BazTy *)
     -- Defined in `Spec.DeriveAll04'
