Safe Haskell | None |
---|---|
Language | Haskell2010 |
Translation from Agda.Syntax.Concrete to Agda.Syntax.Abstract. Involves scope analysis, figuring out infix operator precedences and tidying up definitions.
Synopsis
- class ToAbstract concrete abstract | concrete -> abstract where
- toAbstract :: concrete -> ScopeM abstract
- localToAbstract :: ToAbstract c a => c -> (a -> ScopeM b) -> ScopeM b
- concreteToAbstract_ :: ToAbstract c a => c -> ScopeM a
- concreteToAbstract :: ToAbstract c a => ScopeInfo -> c -> ScopeM a
- newtype NewModuleQName = NewModuleQName QName
- newtype OldName a = OldName a
- data TopLevel a = TopLevel {}
- data TopLevelInfo = TopLevelInfo {}
- topLevelModuleName :: TopLevelInfo -> ModuleName
- data AbstractRHS
- data NewModuleName
- data OldModuleName
- data NewName a
- data OldQName
- data PatName
- data APatName
Documentation
class ToAbstract concrete abstract | concrete -> abstract where Source #
Things that can be translated to abstract syntax are instances of this class.
toAbstract :: concrete -> ScopeM abstract Source #
Instances
localToAbstract :: ToAbstract c a => c -> (a -> ScopeM b) -> ScopeM b Source #
This operation does not affect the scope, i.e. the original scope is restored upon completion.
concreteToAbstract_ :: ToAbstract c a => c -> ScopeM a Source #
concreteToAbstract :: ToAbstract c a => ScopeInfo -> c -> ScopeM a Source #
newtype NewModuleQName Source #
Instances
OldName a |
Instances
(Show a, ToQName a) => ToAbstract (OldName a) QName Source # | |
Defined in Agda.Syntax.Translation.ConcreteToAbstract |
Temporary data type to scope check a file.
TopLevel | |
|
Instances
ToAbstract (TopLevel [Declaration]) TopLevelInfo Source # | Top-level declarations are always
|
Defined in Agda.Syntax.Translation.ConcreteToAbstract toAbstract :: TopLevel [Declaration] -> ScopeM TopLevelInfo Source # |
data TopLevelInfo Source #
TopLevelInfo | |
|
Instances
ToAbstract (TopLevel [Declaration]) TopLevelInfo Source # | Top-level declarations are always
|
Defined in Agda.Syntax.Translation.ConcreteToAbstract toAbstract :: TopLevel [Declaration] -> ScopeM TopLevelInfo Source # |
topLevelModuleName :: TopLevelInfo -> ModuleName Source #
The top-level module name.
data AbstractRHS Source #
Instances
ToAbstract RHS AbstractRHS Source # | |
Defined in Agda.Syntax.Translation.ConcreteToAbstract toAbstract :: RHS -> ScopeM AbstractRHS Source # | |
ToAbstract AbstractRHS RHS Source # | |
Defined in Agda.Syntax.Translation.ConcreteToAbstract toAbstract :: AbstractRHS -> ScopeM RHS Source # |
data NewModuleName Source #
Instances
data OldModuleName Source #