-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Expands type synonyms in Template Haskell ASTs
--   
--   Expands type synonyms in Template Haskell ASTs.
--   
--   As of version <tt>0.4.9.0</tt>, this library is a small shim on top of
--   the <tt>applySubstitution</tt>/<tt>resolveTypeSynonyms</tt> functions
--   from <tt>th-abstraction</tt>, so you may want to consider using
--   <tt>th-abstraction</tt> instead.
@package th-expand-syns
@version 0.4.11.0

module Language.Haskell.TH.ExpandSyns

-- | Calls <a>expandSynsWith</a> with the default settings.
expandSyns :: Type -> Q Type

-- | Expands all type synonyms in the given type. Type families currently
--   won't be expanded (but will be passed through).
expandSynsWith :: SynonymExpansionSettings -> Type -> Q Type
data SynonymExpansionSettings

-- | Suppresses the warning that type families are unsupported.
noWarnTypeFamilies :: SynonymExpansionSettings

-- | Capture-free substitution
substInType :: (Name, Type) -> Type -> Type

-- | Capture-free substitution
substInCon :: (Name, Type) -> Con -> Con

-- | Make a list of names (based on the first arg) such that every name in
--   the result is distinct from every name in the second arg, and from the
--   other results
evades :: Data t => [Name] -> t -> [Name]

-- | Make a name (based on the first arg) that's distinct from every name
--   in the second arg
--   
--   Example why this is necessary:
--   
--   <pre>
--   type E x = forall y. Either x y
--   
--   ... expandSyns [t| forall y. y -&gt; E y |]
--   </pre>
--   
--   The example as given may actually work correctly without any special
--   capture-avoidance depending on how GHC handles the <tt>y</tt>s, but in
--   any case, the input type to expandSyns may be an explicit AST using
--   <a>mkName</a> to ensure a collision.
evade :: Data d => Name -> d -> Name
instance GHC.Base.Semigroup Language.Haskell.TH.ExpandSyns.SynonymExpansionSettings
instance GHC.Base.Monoid Language.Haskell.TH.ExpandSyns.SynonymExpansionSettings
