Logo Hegel for F#

Repr Module

Prints values as the F# that builds them: what the draws of a failing test are shown as under Hegel.test, and what a generator that prints its values itself should produce.

Types

Type Description

FSharpDialect

The F# : draws bound with let, values printed by .

Functions and values

Function or value Description

Repr.caseName case

Full Usage: Repr.caseName case

Parameters:
Returns: string

The name a union case is written with: qualified by its type when the type requires it.

case : UnionCaseInfo
Returns: string

Repr.dialect

Full Usage: Repr.dialect

Returns: Dialect

The F# dialect, which Hegel.test and Hegel.run install for the run.

Returns: Dialect

Repr.identifier name

Full Usage: Repr.identifier name

Parameters:
    name : string

Returns: string

name as an F# identifier, in double backticks when it is not one as written.

name : string
Returns: string

Repr.quote s delimiter

Full Usage: Repr.quote s delimiter

Parameters:
    s : string
    delimiter : char

Returns: string

s as an F# string or character literal, delimited by delimiter.

s : string
delimiter : char
Returns: string

Repr.recordBraces t

Full Usage: Repr.recordBraces t

Parameters:
Returns: string * string

The brackets a record of type is written in: anonymous records take {| |}, and struct in front when they are value types.

t : Type
Returns: string * string

Repr.render p t value

Full Usage: Repr.render p t value

Parameters:

Print , drawn with the static type , as the F# that builds it. The static type tells null apart from None and ().

p : Printer
t : Type
value : obj

Repr.separator p

Full Usage: Repr.separator p

Parameters:

Print ; and a breakable space: what separates the elements of a list.

p : Printer

Repr.typeName t

Full Usage: Repr.typeName t

Parameters:
Returns: string

The F# name of a type, as written in a type annotation.

t : Type
Returns: string

Type something to start searching.