Safe Haskell | None |
---|---|
Language | Haskell2010 |
Template Haskell generation for Free Foil (generic scope-safe representation of syntax).
Synopsis
- data FreeFoilConfig = FreeFoilConfig {
- rawQuantifiedNames :: [Name]
- freeFoilTermConfigs :: [FreeFoilTermConfig]
- freeFoilNameModifier :: String -> String
- freeFoilScopeNameModifier :: String -> String
- signatureNameModifier :: String -> String
- freeFoilConNameModifier :: String -> String
- freeFoilConvertToName :: String -> String
- freeFoilConvertFromName :: String -> String
- data FreeFoilTermConfig = FreeFoilTermConfig {}
- mkFreeFoil :: FreeFoilConfig -> Q [Dec]
- mkFreeFoilConversions :: FreeFoilConfig -> Q [Dec]
Documentation
data FreeFoilConfig Source #
Config for the Template Haskell generation of data types, pattern synonyms, and conversion functions for the Free Foil representation, based on a raw recursive representation.
FreeFoilConfig | |
|
data FreeFoilTermConfig Source #
Config for a single term group, for the Template Haskell generation of data types, pattern synonyms, and conversion functions for the Free Foil representation, based on a raw recursive representation.
FreeFoilTermConfig | |
|
mkFreeFoil :: FreeFoilConfig -> Q [Dec] Source #
Generate scope-safe types and pattern synonyms for a given raw set of types:
- Scope-safe quantified types (e.g. type schemas, defining equations of functions, unification constraints, data/type declarations)
- Scope-safe terms, scoped terms, subterms, scoped subterms.
- Scope-safe patterns.
- Signatures for terms, subterms, and scoped subterms.
- Pattern synonyms for terms, subterms, and scoped subterms.
mkFreeFoilConversions :: FreeFoilConfig -> Q [Dec] Source #
Generate conversions to and from scope-safe representation:
- Conversions for scope-safe quantified types (e.g. type schemas, defining equations of functions, unification constraints, data/type declarations)
- Conversions for scope-safe terms, scoped terms, subterms, scoped subterms.
- CPS-style conversions for scope-safe patterns.
- Helpers for signatures of terms, subterms, and scoped subterms.