{-| These are variants of the functions in "Data.Dependent.EnumMap.Strict" that do not type-check keys: they do not check that you don't create two keys with the same 'Int' and different types. As a result, these functions do not have a 'Data.Type.Equality.TestEquality' constraint, and are faster. Be careful though, because one can easily create @unsafeCoerce@ with this API: @ {-# LANGUAGE ScopedTypeVariables TypeFamilies #-} import qualified Data.Dependent.EnumMap.Strict as DE import qualified Data.Dependent.EnumMap.Strict.Unsafe as DEU import Data.Functor.Identity import Data.Maybe import Data.Some data Foo a = Foo Int deriving (Show) instance DE.Enum1 Foo where type Enum1Info Foo = () fromEnum1 (Foo i) = (i, ()) toEnum1 i () = Some (Foo i) unsafe :: forall a b. a -> b unsafe x = runIdentity $ fromJust $ DEU.lookupUnsafe (Foo 1 :: Foo b) $ DE.singleton (Foo 1 :: Foo a) (Identity x) @ -} module Data.Dependent.EnumMap.Strict.Unsafe ( adjustUnsafe, alterUnsafe, lookupUnsafe, findWithDefaultUnsafe, unionUnsafe, unionWithUnsafe, ) where import Prelude () import Data.Dependent.EnumMap.Strict.Internal