swish-0.10.9.0: A semantic web toolkit.
Copyright(c) 2003 Graham Klyne 2009 Vasili I Galchin 2011 2012 Douglas Burke
LicenseGPL V2
MaintainerDouglas Burke
Stabilityexperimental
PortabilityH98
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.String.ShowLines

Description

This module defines an extension of the Show class for displaying multi-line values. It serves the following purposes:

  1. provides a method with greater layout control of multiline values,
  2. provides a possibility to override the default Show behaviour for programs that use the extended ShowLines interface, and
  3. uses a ShowS intermediate value to avoid unnecessary concatenation of long strings.
Synopsis

Documentation

class Show sh => ShowLines sh where Source #

ShowLines is a type class for values that may be formatted in multi-line displays.

Minimal complete definition

Nothing

Methods

showls :: String -> sh -> ShowS Source #

Multi-line value display method

Create a multiline displayable form of a value, returned as a ShowS value. The default implementation behaves just like a normal instance of Show.

This function is intended to allow the calling function some control of multiline displays by providing:

  1. the first line of the value is not preceded by any text, so it may be appended to some preceding text on the same line,
  2. the supplied line break string is used to separate lines of the formatted text, and may include any desired indentation, and
  3. no newline is output following the final line of text.

Instances

Instances details
ShowLines RDFGraph Source # 
Instance details

Defined in Swish.RDF.GraphShowLines