Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg

This software is released under an open source BSD licence.

fj
Class Bottom

java.lang.Object
  extended by fj.Bottom

public final class Bottom
extends Object

Represents the bottom _|_ value.


Method Summary
static
<A> Error
decons(A a, Show<A> sa)
          Represents a deconstruction failure that was non-exhaustive.
static
<A> Error
decons(Class<A> c)
          Represents a deconstruction failure that was non-exhaustive.
static
<T extends Throwable>
F<T,String>
eMessage()
          A function that returns the getMessage for a throwable.
static P1<Error> error_(String s)
          Provides a thunk that throws an error using the given message when evaluated.
static Error error(String s)
          Returns an error to represent undefinedness in a computation with early failure using the given message.
static
<A,B> F<A,B>
errorF(String s)
          Provides a function that throws an error using the given message, ignoring its argument.
static
<T extends Throwable>
F<T,String>
eToString()
          A function that returns the toString for a throwable.
static Error undefined()
          Returns an error to represent undefinedness in a computation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

undefined

public static Error undefined()
Returns an error to represent undefinedness in a computation.

Returns:
An error to represent undefinedness in a computation.

error

public static Error error(String s)
Returns an error to represent undefinedness in a computation with early failure using the given message.

Parameters:
s - The message to fail with.
Returns:
An error to represent undefinedness in a computation with early failure using the given message.

error_

public static P1<Error> error_(String s)
Provides a thunk that throws an error using the given message when evaluated.

Parameters:
s - The message to fail with.
Returns:
A thunk that throws an error using the given message when evaluated.

errorF

public static <A,B> F<A,B> errorF(String s)
Provides a function that throws an error using the given message, ignoring its argument.

Parameters:
s - The message to fail with.
Returns:
A function that throws an error using the given message, ignoring its argument.

decons

public static <A> Error decons(A a,
                               Show<A> sa)
Represents a deconstruction failure that was non-exhaustive.

Parameters:
a - The value being deconstructed.
sa - The rendering for the value being deconstructed.
Returns:
A deconstruction failure that was non-exhaustive.

decons

public static <A> Error decons(Class<A> c)
Represents a deconstruction failure that was non-exhaustive.

Parameters:
c - The type being deconstructed.
Returns:
A deconstruction failure that was non-exhaustive.

eToString

public static <T extends Throwable> F<T,String> eToString()
A function that returns the toString for a throwable.

Returns:
A function that returns the toString for a throwable.

eMessage

public static <T extends Throwable> F<T,String> eMessage()
A function that returns the getMessage for a throwable.

Returns:
A function that returns the getMessage for a throwable.

Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg

This software is released under an open source BSD licence.