hdiff-0.0.1: Pattern-Expression-based differencing of arbitrary types.

Safe HaskellNone
LanguageHaskell2010

Generics.MRSOP.HDiff.Renderer

Description

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

Documentation

class RendererHO f where Source #

Methods

renderHO :: f x -> Doc ann Source #

Instances
RendererHO W Source # 
Instance details

Defined in Languages.RTree

Methods

renderHO :: W x -> Doc ann 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

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 Source #

Renders elements of the family

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 Source #

Renders a fixpoint