| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ide.Plugin.Tactic.Naming
Synopsis
- mkTyName :: Type -> String
- mkTyConName :: TyCon -> String
- filterReplace :: (a -> Bool) -> a -> [a] -> [a]
- mkGoodName :: [OccName] -> Type -> OccName
- mkManyGoodNames :: (Traversable t, Monad m) => Map OccName a -> 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
Arguments
| :: [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) => Map OccName a -> t Type -> m (t OccName) Source #
Like mkGoodName but creates several apart names.