Overview  Index  Help 
SMLFormat

BASIC_FORMATTERS

All Known Implementing Modules:

BasicFormattersSMLFormat.BasicFormatters


signature BASIC_FORMATTERS =
sig
  type expression
  type 'a formatter = 'a -> expression list
  val format_unit : General.unit formatter
  val format_int : Int.int formatter
  val format_word : Word.word formatter
  val format_real : Real.real formatter
  val format_char : Char.char formatter
  val format_string : String.string formatter
  val format_substring : Substring.substring formatter
  val format_exn : General.exn formatter
  val format_exn_Ref : General.exn formatter ref
  val format_array : 'a formatter * expression list -> 'a Array.array formatter
  val format_vector
      : 'a formatter * expression list -> 'a Vector.vector formatter
  val format_ref : 'a formatter -> 'a ref formatter
  val format_bool : bool formatter
  val format_option : 'a formatter -> 'a Option.option formatter
  val format_order : General.order formatter
  val format_list : 'a formatter * expression list -> 'a list formatter
end

This signature provides the specifications of formatters for the standard types. When you add a new formatter in this signature, it is required to update the "../generator/BasicFormattersEnv.sml" to register the name of the new formatter to the formatters environment.

Author:
YAMATODANI Kiyoshi
Version:
$Id: SigBASIC_FORMATTERS.html,v 1.5 2007/03/27 15:03:01 kiyoshiy Exp $

 
Type detail

expression

type expression

format expression


formatter

type 'a formatter = 'a -> expression list

formatter for a type T receives a value of the type T and returns a list of format expressions of the string representation of the value.

     
Value detail

format_unit

val format_unit : General.unit formatter

the formatter for unit type.


format_int

val format_int : Int.int formatter

the formatter for int type.


format_word

val format_word : Word.word formatter

the formatter for word type.


format_real

val format_real : Real.real formatter

the formatter for real type.


format_char

val format_char : Char.char formatter

the formatter for char type.


format_string

val format_string : String.string formatter

the formatter for string type.


format_substring

val format_substring : Substring.substring formatter

the formatter for substring type.


format_exn

val format_exn : General.exn formatter

the formatter for exn type.


format_exn_Ref

val format_exn_Ref : General.exn formatter ref


format_array

val format_array : 'a formatter * expression list -> 'a Array.array formatter

the formatter for array type.


format_vector

val format_vector : 'a formatter * expression list -> 'a Vector.vector formatter

the formatter for vector type.


format_ref

val format_ref : 'a formatter -> 'a ref formatter

the formatter for ref type.


format_bool

val format_bool : bool formatter

the formatter for bool type.


format_option

val format_option : 'a formatter -> 'a Option.option formatter

the formatter for option type.


format_order

val format_order : General.order formatter

the formatter for order type.


format_list

val format_list : 'a formatter * expression list -> 'a list formatter

the formatter for list type.

 


Overview  Index  Help 
SMLFormat: Pretty-Printer library for SML