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

Safe HaskellSafe
LanguageHaskell2010

FreeC.IR.Strip

Contents

Description

This module contains functions for removing information from the AST of the intermediate language.

These functions are useful to simplify tests or make the output of pretty instances actually pretty by removing irrelevant information.

Synopsis

Removing Expression Type Annotations

class StripExprType node where Source #

Type class for AST nodes from which expression type annotations can be removed.

Methods

stripExprType :: node -> node Source #

Instances
StripExprType Expr Source #

Strips the type annotation of the given expression and of its sub-expressions recursively.

Instance details

Defined in FreeC.IR.Strip

StripExprType FuncDecl Source #

Strips the expression type annotations from function declarations.

Instance details

Defined in FreeC.IR.Strip

StripExprType TopLevelDecl Source #

Strips the expression type annotations from top-level function declarations.

Instance details

Defined in FreeC.IR.Strip

StripExprType node => StripExprType [node] Source #

When expression type annotations can be removed from a node, they can also be removed from a list of those nodes.

Instance details

Defined in FreeC.IR.Strip

Methods

stripExprType :: [node] -> [node] Source #

StripExprType contents => StripExprType (ModuleOf contents) Source #

Strips the expression type annotations from all declarations in a module.

Instance details

Defined in FreeC.IR.Strip

Methods

stripExprType :: ModuleOf contents -> ModuleOf contents Source #