Copyright | (c) 2013-2016 Galois Inc. |
---|---|
License | BSD3 |
Maintainer | cryptol@galois.com |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- data TyDecl
- setDocString :: Maybe Text -> TyDecl -> TyDecl
- orderTyDecls :: [TyDecl] -> InferM (Either Error [TyDecl])
- orderBinds :: [Bind Name] -> [SCC (Bind Name)]
- class FromDecl d where
- mkScc :: [(a, [Name], [Name])] -> [SCC a]
- combineMaps :: [Map Name (Located a)] -> InferM (Map Name (Located a))
- combine :: [(Name, Located a)] -> InferM (Map Name (Located a))
- duplicates :: Ord a => [Located a] -> [(a, [Range])]
Documentation
orderTyDecls :: [TyDecl] -> InferM (Either Error [TyDecl]) Source #
Check for duplicate and recursive type synonyms. Returns the type-synonyms in dependency order.
orderBinds :: [Bind Name] -> [SCC (Bind Name)] Source #
Associate type signatures with bindings and order bindings by dependency.
class FromDecl d where Source #
toBind :: d -> Maybe (Bind Name) Source #
toParamFun :: d -> Maybe (ParameterFun Name) Source #
toParamConstraints :: d -> [Located (Prop Name)] Source #
mkScc :: [(a, [Name], [Name])] -> [SCC a] Source #
Given a list of declarations, annoted with (i) the names that they define, and (ii) the names that they use, we compute a list of strongly connected components of the declarations. The SCCs are in dependency order.
combineMaps :: [Map Name (Located a)] -> InferM (Map Name (Located a)) Source #
Combine a bunch of definitions into a single map. Here we check that each name is defined only onces.