1{-# LANGUAGE CPP, NoImplicitPrelude #-}
2{-# LANGUAGE RankNTypes #-}
3#if __GLASGOW_HASKELL__ >= 702
4{-# LANGUAGE Trustworthy #-}
5#endif
6module Data.Type.Coercion.Compat (
7#if MIN_VERSION_base(4,7,0)
8  module Base
9, gcoerceWith
10#endif
11) where
12
13#if MIN_VERSION_base(4,7,0)
14import Data.Type.Coercion as Base
15
16# if !(MIN_VERSION_base(4,10,0))
17import Data.Coerce (Coercible)
18
19-- | Generalized form of type-safe cast using representational equality
20--
21-- /Since: 4.10.0.0/
22gcoerceWith :: Coercion a b -> (Coercible a b => r) -> r
23gcoerceWith Coercion x = x
24# endif
25#endif
26