Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Haskell.Reorganizer
Description
An AST traversal for adjusting the sequences of prefix and infix operator applications in the parsed and resolved AST, based on their declared precedence and fixity.
Synopsis
- data Reorganization l pos s = Reorganization
- reorganizeModules :: forall l pos s f. (f ~ Wrap l pos s, Haskell l, Module l l ~ Module l l, ModuleName l ~ ModuleName l, Export l l ~ Export l l, Import l l ~ Import l l, ImportSpecification l l ~ ImportSpecification l l, ImportItem l l ~ ImportItem l l, Members l ~ Members l, Declaration l ~ Declaration l, QualifiedName l ~ QualifiedName l, Name l ~ Name l, Traversable (Reorganization l pos s) (Declaration l l), Traversable (Reorganization l pos s) (Module l l), Traversable (Reorganization l pos s) (Declaration l l)) => Map (ModuleName l) (f (Module l l f f)) -> Validation (NonEmpty (ModuleName l, NonEmpty (Error l f))) (Map (ModuleName l) (f (Module l l f f)))
Documentation
data Reorganization l pos s Source #
Transformation to reorganize the AST
Constructors
Reorganization |
Instances
Transformation (Reorganization l pos s) Source # | |||||||||
Defined in Language.Haskell.Reorganizer Associated Types
| |||||||||
(Traversable (g (Wrap l pos s)), Traversable (Reorganization l pos s) g, At (Reorganization l pos s) (g (Wrap l pos s) (Wrap l pos s))) => Traversable (Reorganization l pos s) g Source # | |||||||||
Defined in Language.Haskell.Reorganizer Methods traverse :: Codomain (Reorganization l pos s) ~ Compose m f => Reorganization l pos s -> Domain (Reorganization l pos s) (g (Domain (Reorganization l pos s)) (Domain (Reorganization l pos s))) -> m (f (g f f)) # | |||||||||
type Codomain (Reorganization l pos s) Source # | |||||||||
Defined in Language.Haskell.Reorganizer | |||||||||
type Domain (Reorganization l pos s) Source # | |||||||||
Defined in Language.Haskell.Reorganizer |
reorganizeModules :: forall l pos s f. (f ~ Wrap l pos s, Haskell l, Module l l ~ Module l l, ModuleName l ~ ModuleName l, Export l l ~ Export l l, Import l l ~ Import l l, ImportSpecification l l ~ ImportSpecification l l, ImportItem l l ~ ImportItem l l, Members l ~ Members l, Declaration l ~ Declaration l, QualifiedName l ~ QualifiedName l, Name l ~ Name l, Traversable (Reorganization l pos s) (Declaration l l), Traversable (Reorganization l pos s) (Module l l), Traversable (Reorganization l pos s) (Declaration l l)) => Map (ModuleName l) (f (Module l l f f)) -> Validation (NonEmpty (ModuleName l, NonEmpty (Error l f))) (Map (ModuleName l) (f (Module l l f f))) Source #
Reorganize sequences of operators in the given collection of modules, a Map
keyed by module name. Note
that all class constraints in the function's type signature are satisfied by the Haskell Language
.