Package fj

Class Bottom


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

      Constructors 
      Modifier Constructor Description
      private Bottom()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <A> java.lang.Error decons​(A a, Show<A> sa)
      Represents a deconstruction failure that was non-exhaustive.
      static <A> java.lang.Error decons​(java.lang.Class<A> c)
      Represents a deconstruction failure that was non-exhaustive.
      static <T extends java.lang.Throwable>
      F<T,​java.lang.String>
      eMessage()
      A function that returns the getMessage for a throwable.
      static java.lang.Error error​(java.lang.String s)
      Returns an error to represent undefinedness in a computation with early failure using the given message.
      static <A> P1<A> error_​(java.lang.String s)
      Provides a thunk that throws an error using the given message when evaluated.
      static <A,​B>
      F<A,​B>
      errorF​(java.lang.String s)
      Provides a function that throws an error using the given message, ignoring its argument.
      static <T extends java.lang.Throwable>
      F<T,​java.lang.String>
      eToString()
      A function that returns the toString for a throwable.
      static java.lang.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
    • Constructor Detail

      • Bottom

        private Bottom()
    • Method Detail

      • undefined

        public static java.lang.Error undefined()
        Returns an error to represent undefinedness in a computation.
        Returns:
        An error to represent undefinedness in a computation.
      • error

        public static java.lang.Error error​(java.lang.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_​(java.lang.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​(java.lang.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> java.lang.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> java.lang.Error decons​(java.lang.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 java.lang.Throwable> F<T,​java.lang.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 java.lang.Throwable> F<T,​java.lang.String> eMessage()
        A function that returns the getMessage for a throwable.
        Returns:
        A function that returns the getMessage for a throwable.