Package fj

Class Bottom

java.lang.Object
fj.Bottom

public final class Bottom extends Object
Represents the bottom _|_ value.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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>
    A function that returns the getMessage for a throwable.
    static Error
    Returns an error to represent undefinedness in a computation with early failure using the given message.
    static <A> P1<A>
    Provides a thunk that throws an error using the given message when evaluated.
    static <A, B> F<A,B>
    Provides a function that throws an error using the given message, ignoring its argument.
    static <T extends Throwable>
    F<T,String>
    A function that returns the toString for a throwable.
    static Error
    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
  • Constructor Details

    • Bottom

      private Bottom()
  • Method Details

    • 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 <A> P1<A> 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.