Safe Haskell | None |
---|---|
Language | Haskell2010 |
Defines a unified interface for writing
pretty printers. We force the definition of pretty
printers in this way to be able to use this very
pretty printer to render a UTx
in the same style as the rest of the ast.
Synopsis
- class RendererHO f where
- renderView :: HasDatatypeInfo ki fam codes => Proxy fam -> (forall k. ki k -> Doc ann) -> SNat ix -> View ki (Const (Doc ann)) (Lkup ix codes) -> Doc ann
- renderNP :: HasDatatypeInfo ki fam codes => Proxy fam -> (Doc ann -> Doc ann) -> SNat ix -> Constr (Lkup ix codes) c -> NP (Const (Doc ann)) (Lkup c (Lkup ix codes)) -> Doc ann
- renderEl :: forall ki fam codes ix ann. (Family ki fam codes, HasDatatypeInfo ki fam codes, IsNat ix) => (forall k. ki k -> Doc ann) -> El fam ix -> Doc ann
- renderFix :: forall ki fam codes ix ann. (HasDatatypeInfo ki fam codes, IsNat ix) => (forall k. ki k -> Doc ann) -> Fix ki codes ix -> Doc ann
Documentation
class RendererHO f where Source #
Instances
RendererHO W Source # | |
renderView :: HasDatatypeInfo ki fam codes => Proxy fam -> (forall k. ki k -> Doc ann) -> SNat ix -> View ki (Const (Doc ann)) (Lkup ix codes) -> Doc ann Source #
Default rendering of constructors
renderNP :: HasDatatypeInfo ki fam codes => Proxy fam -> (Doc ann -> Doc ann) -> SNat ix -> Constr (Lkup ix codes) c -> NP (Const (Doc ann)) (Lkup c (Lkup ix codes)) -> Doc ann Source #
Default rendering of NP's with Docs inside