free-compiler-0.3.0.0: A Haskell to Coq compiler.

Safe HaskellNone
LanguageHaskell2010

FreeC.Backend.Agda.Pretty

Contents

Description

This module contains Pretty instances for the Agda AST.

The Agda library has its own Pretty class in Agda.Utils.Pretty. Therefore we cannot instance every a with an Agda.Pretty instance with our Pretty instance without generating overlapping instances for basic types (e.g. String). We introduce the wrapper datatype PrettyAgda to avoid the overlapping instances and explicitly declare Pretty instances for common AST nodes.

Synopsis

Documentation

prettyAgda :: Pretty a => a -> Doc Source #

Helper function for printing Pretty printable types a to a Doc from the pretty printing library, which is used by the compiler.

Orphan instances

Pretty Declaration Source #

Declarations are a common AST node.

Instance details

Methods

pretty :: Declaration -> Doc #

prettyList :: [Declaration] -> Doc #

Pretty Expr Source #

Exprs are a common AST node.

Instance details

Methods

pretty :: Expr -> Doc #

prettyList :: [Expr] -> Doc #