GroteTrap-0.3: GroteTrap

Language.GroteTrap.Unparse

Contents

Description

The Unparse type class and its ParseTree instance, as well as some text manipulation.

Synopsis

Class Unparse

class Unparse p whereSource

Types that are unparsable. Unparsing is like prettyprinting, except that instead of pretty source the original source code is retrieved. This means unparsing is only possible for values that were the result of an earlier parse.

Methods

unparse :: p -> StringSource

Instances

Text utility functions

merge :: [String] -> StringSource

Merge folds many strings over each other.

over :: String -> String -> StringSource

over over' under places over' over under. The resulting string has the same characters as over' does, except where over' contains spaces; at those positions, the character from under shows. If under is longer than over', over' is padded with enough spaces to show all rest of under.