purescript-0.15.12: PureScript Programming Language Compiler

Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.PureScript.TypeChecker.Synonyms

Description

Functions for replacing fully applied type synonyms

Synopsis

- type SynonymMap = Map (Qualified (ProperName 'TypeName)) ([(Text, Maybe SourceType)], SourceType)
- type KindMap = Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind)
- replaceAllTypeSynonyms :: (e ~ MultipleErrors, MonadState CheckState m, MonadError e m) => SourceType -> m SourceType
- replaceAllTypeSynonymsM :: MonadError MultipleErrors m => SynonymMap -> KindMap -> SourceType -> m SourceType

# Documentation

type SynonymMap = Map (Qualified (ProperName 'TypeName)) ([(Text, Maybe SourceType)], SourceType) #

Type synonym information (arguments with kinds, aliased type), indexed by name

type KindMap = Map (Qualified (ProperName 'TypeName)) (SourceType, TypeKind) #

replaceAllTypeSynonyms :: (e ~ MultipleErrors, MonadState CheckState m, MonadError e m) => SourceType -> m SourceType #

Replace fully applied type synonyms

replaceAllTypeSynonymsM :: MonadError MultipleErrors m => SynonymMap -> KindMap -> SourceType -> m SourceType #

Replace fully applied type synonyms by explicitly providing a `SynonymMap`.