Language.Haskell.TH.SCCs
- binding_group :: Name -> Q (Set Name)
- binding_groups :: [Name] -> Q [Set Name]
- scc :: Name -> Q (Either Name (Set Name))
- sccs :: [Name] -> Q [Either Name (Set Name)]
- class Dependencies t where
- type_dependencies' :: [Name] -> t -> Set Name
- type_dependencies :: Dependencies t => t -> Set Name
- td_recur :: Dependencies t => [Name] -> t -> Set Name
- td_descend :: (Named a, Dependencies t) => [Name] -> a -> t -> Set Name
- class Named t where
- printQ :: Show a => Maybe String -> Q a -> Q [Dec]
Documentation
binding_group :: Name -> Q (Set Name)Source
Wrapper for scc
that forgets the distinction between a single acyclic
SCC and a singly recursive SCC
binding_groups :: [Name] -> Q [Set Name]Source
Wrapper for sccs
that forgets the distinction between a single acyclic
SCC and a singly recursive SCC
scc :: Name -> Q (Either Name (Set Name))Source
Computes the SCC that includes the declaration of the given name; Left
is a singly acyclic declaration, Right
is a mutually recursive group
(possibly of size one: singly recursion).
sccs :: [Name] -> Q [Either Name (Set Name)]Source
Computes all SCCs for the given names (including those it dominates)
class Dependencies t whereSource
Calculate the type declarations upon which this construct syntactically
depends. The first argument tracks the bindings traversed; use td_descend
to maintain it.
Methods
type_dependencies' :: [Name] -> t -> Set NameSource
Instances
Dependencies Type | |
Dependencies Dec | |
Dependencies Info | |
Dependencies Con | |
Dependencies RecordField |
type_dependencies :: Dependencies t => t -> Set NameSource
td_recur :: Dependencies t => [Name] -> t -> Set NameSource
Just a bit shorter than type_dependencies'
td_descend :: (Named a, Dependencies t) => [Name] -> a -> t -> Set NameSource
Shorter than type_dependencies'
and also adds the name of the seconda
argument to the tracked bindings
This is semantically murky: it's just the name of anything that "naturally" defines a name; error if it doesn't.