Safe Haskell | None |
---|---|
Language | Haskell2010 |
- 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
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 #