Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Tagged a = Tagged {
- unTagged :: a
- newtype TypeHash = TypeHash {
- unTypeHash :: StaticSize 20 ByteString
- reifyManyTyDecls :: ((Name, Info) -> Q (Bool, [Name])) -> [Name] -> Q [(Name, Info)]
- typeHashForNames :: [Name] -> Q Exp
- hashOfType :: Type -> Q Exp
- getTypeInfosRecursively :: [Name] -> Q [(Name, Info)]
- getConNames :: Data a => a -> [Name]
- getVarNames :: Data a => a -> [Name]
- class HasTypeHash a where
- mkHasTypeHash :: Type -> Q [Dec]
- mkManyHasTypeHash :: [Q Type] -> Q [Dec]
- combineTypeHashes :: [TypeHash] -> TypeHash
Documentation
Instances
Data a => Data (Tagged a) Source # | |
Defined in Data.Store.TypeHash.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Tagged a -> c (Tagged a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Tagged a) # toConstr :: Tagged a -> Constr # dataTypeOf :: Tagged a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Tagged a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tagged a)) # gmapT :: (forall b. Data b => b -> b) -> Tagged a -> Tagged a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tagged a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tagged a -> r # gmapQ :: (forall d. Data d => d -> u) -> Tagged a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Tagged a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tagged a -> m (Tagged a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tagged a -> m (Tagged a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tagged a -> m (Tagged a) # | |
Generic (Tagged a) Source # | |
Show a => Show (Tagged a) Source # | |
NFData a => NFData (Tagged a) Source # | |
Defined in Data.Store.TypeHash.Internal | |
Eq a => Eq (Tagged a) Source # | |
Ord a => Ord (Tagged a) Source # | |
Defined in Data.Store.TypeHash.Internal | |
(Store a, HasTypeHash a) => Store (Tagged a) Source # | |
type Rep (Tagged a) Source # | |
Defined in Data.Store.TypeHash.Internal |
Instances
Data TypeHash Source # | |
Defined in Data.Store.TypeHash.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TypeHash -> c TypeHash # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TypeHash # toConstr :: TypeHash -> Constr # dataTypeOf :: TypeHash -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TypeHash) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeHash) # gmapT :: (forall b. Data b => b -> b) -> TypeHash -> TypeHash # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TypeHash -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TypeHash -> r # gmapQ :: (forall d. Data d => d -> u) -> TypeHash -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TypeHash -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TypeHash -> m TypeHash # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TypeHash -> m TypeHash # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TypeHash -> m TypeHash # | |
Generic TypeHash Source # | |
Show TypeHash Source # | |
NFData TypeHash Source # | |
Defined in Data.Store.TypeHash.Internal | |
Eq TypeHash Source # | |
Ord TypeHash Source # | |
Defined in Data.Store.TypeHash.Internal | |
Store TypeHash Source # | |
Lift TypeHash Source # | |
type Rep TypeHash Source # | |
Defined in Data.Store.TypeHash.Internal type Rep TypeHash = D1 ('MetaData "TypeHash" "Data.Store.TypeHash.Internal" "store-0.7.18-JKaeHVOO5ISLnJjhQgwn0u" 'True) (C1 ('MetaCons "TypeHash" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTypeHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StaticSize 20 ByteString)))) |
typeHashForNames :: [Name] -> Q Exp Source #
At compiletime, this yields a hash of the specified datatypes. Not only does this cover the datatypes themselves, but also all transitive dependencies.
The resulting expression is a literal of type TypeHash
.
getConNames :: Data a => a -> [Name] Source #
getVarNames :: Data a => a -> [Name] Source #
mkHasTypeHash :: Type -> Q [Dec] Source #
Deprecated: Use of Data.Store.TypeHash isn't recommended, as the hashes are too unstable for most uses. Please instead consider using Data.Store.Version. See https://github.com/fpco/store/issues/53
mkManyHasTypeHash :: [Q Type] -> Q [Dec] Source #
Deprecated: Use of Data.Store.TypeHash isn't recommended, as the hashes are too unstable for most uses. Please instead consider using Data.Store.Version. See https://github.com/fpco/store/issues/53
combineTypeHashes :: [TypeHash] -> TypeHash Source #