Safe Haskell | None |
---|---|
Language | Haskell2010 |
Permanently register and retrieve absolute type definitions
- data RepoProtocol
- recordType :: Model a => Config -> Proxy a -> IO ()
- recordADTs :: Foldable t => Config -> t AbsADT -> IO ()
- solveType :: Repo -> Config -> AbsType -> IO (Either RepoError AbsTypeModel)
- solveRefs :: Repo -> Config -> [AbsRef] -> IO (Either RepoError (Map AbsRef AbsADT))
- knownTypes :: Config -> IO (Either String [(AbsRef, AbsADT)])
Documentation
data RepoProtocol Source #
A (simplistic) protocol to permanently store and retrieve ADT definitions.
recordType :: Model a => Config -> Proxy a -> IO () Source #
Permanently record all the ADT definitions referred by a type, with all their dependencies
recordADTs :: Foldable t => Config -> t AbsADT -> IO () Source #
Permanently record a set of ADT definitions with all their dependencies
solveType :: Repo -> Config -> AbsType -> IO (Either RepoError AbsTypeModel) Source #
Retrieve the full type model for the given absolute type from Top's RepoProtocol channel, using the given Repo as a cache