Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- mkTyName :: Type -> String
- mkTyConName :: TyCon -> String
- filterReplace :: (a -> Bool) -> a -> [a] -> [a]
- mkGoodName :: Set OccName -> Type -> OccName
- mkManyGoodNames :: (Traversable t, Monad m) => Set OccName -> t Type -> m (t OccName)
- getInScope :: Map OccName a -> [OccName]
Documentation
mkTyConName :: TyCon -> String Source #
Get a good name for a type constructor.
filterReplace :: (a -> Bool) -> a -> [a] -> [a] Source #
Maybe replace an element in the list if the predicate matches
:: Set OccName | Bindings in scope; used to ensure we don't shadow anything |
-> Type | The type to produce a name for |
-> OccName |
Produce a unique, good name for a type.
mkManyGoodNames :: (Traversable t, Monad m) => Set OccName -> t Type -> m (t OccName) Source #
Like mkGoodName
but creates several apart names.