delude-0.1.0.3: Generalized the Prelude more functionally.

Safe HaskellSafe
LanguageHaskell2010

Delude

Contents

Synopsis

Documentation

class Boolish b where Source #

Boolish things are things which you can do boolean operations on.

Minimal complete definition

(||), (&&), (^), iff, implies, not, true, false

Methods

(||), (&&), (^), iff, implies :: b -> b -> b Source #

not :: b -> b Source #

true, false :: b Source #

Instances

Boolish Bool Source #

Bool itself is a Boolish thing.

Boolish b => Boolish (x -> b) Source #

Functions which return Boolish things are also rather Boolish, | as you can just lift the functions of the Boolish below up a level | of lambda abstraction.

Methods

(||) :: (x -> b) -> (x -> b) -> x -> b Source #

(&&) :: (x -> b) -> (x -> b) -> x -> b Source #

(^) :: (x -> b) -> (x -> b) -> x -> b Source #

iff :: (x -> b) -> (x -> b) -> x -> b Source #

implies :: (x -> b) -> (x -> b) -> x -> b Source #

not :: (x -> b) -> x -> b Source #

true :: x -> b Source #

false :: x -> b Source #

module Prelude

liftf1 :: (b -> b) -> (a -> b) -> a -> b Source #

I really don't quite now how to describe this in words yet.

liftf2 :: (b -> b -> b) -> (a -> b) -> (a -> b) -> a -> b Source #

Same as liftf1... Seems like a pretty general thing for inductive definitions.

class Enumerable e where Source #

A class which supplies you with a (possibly infinite) enumeration of all of the types which instantiate it.

Minimal complete definition

enumeration

Methods

enumeration :: [e] Source #

Orphan instances

Floating f => Floating (a -> f) Source #

Finally, I've lifted the Floating interface.

Methods

pi :: a -> f #

exp :: (a -> f) -> a -> f #

log :: (a -> f) -> a -> f #

sqrt :: (a -> f) -> a -> f #

(**) :: (a -> f) -> (a -> f) -> a -> f #

logBase :: (a -> f) -> (a -> f) -> a -> f #

sin :: (a -> f) -> a -> f #

cos :: (a -> f) -> a -> f #

tan :: (a -> f) -> a -> f #

asin :: (a -> f) -> a -> f #

acos :: (a -> f) -> a -> f #

atan :: (a -> f) -> a -> f #

sinh :: (a -> f) -> a -> f #

cosh :: (a -> f) -> a -> f #

tanh :: (a -> f) -> a -> f #

asinh :: (a -> f) -> a -> f #

acosh :: (a -> f) -> a -> f #

atanh :: (a -> f) -> a -> f #

log1p :: (a -> f) -> a -> f #

expm1 :: (a -> f) -> a -> f #

log1pexp :: (a -> f) -> a -> f #

log1mexp :: (a -> f) -> a -> f #

Fractional f => Fractional (a -> f) Source #

The same applies for Fractional things as Boolish and Num.

Methods

(/) :: (a -> f) -> (a -> f) -> a -> f #

recip :: (a -> f) -> a -> f #

fromRational :: Rational -> a -> f #

Num n => Num (a -> n) Source #

The same thing that is done to Boolish things, this lifting | of abstractions, can be done for Num instances.

Methods

(+) :: (a -> n) -> (a -> n) -> a -> n #

(-) :: (a -> n) -> (a -> n) -> a -> n #

(*) :: (a -> n) -> (a -> n) -> a -> n #

negate :: (a -> n) -> a -> n #

abs :: (a -> n) -> a -> n #

signum :: (a -> n) -> a -> n #

fromInteger :: Integer -> a -> n #