morley-prelude-0.5.1: A custom prelude used in Morley
Safe HaskellNone
LanguageHaskell2010

Morley.Prelude.Boolean

Description

This module replaces the monomorphic boolean operators from Prelude with a set of polymorphic operators.

Synopsis

Documentation

class Boolean a where Source #

Generalized boolean operators.

Methods

(&&) :: a -> a -> a infixr 3 Source #

(||) :: a -> a -> a infixr 2 Source #

Instances

Instances details
Boolean Bool Source # 
Instance details

Defined in Morley.Prelude.Boolean

Methods

(&&) :: Bool -> Bool -> Bool Source #

(||) :: Bool -> Bool -> Bool Source #

Boolean bool => Boolean (IO bool) Source # 
Instance details

Defined in Morley.Prelude.Boolean

Methods

(&&) :: IO bool -> IO bool -> IO bool Source #

(||) :: IO bool -> IO bool -> IO bool Source #

Boolean bool => Boolean (a -> bool) Source # 
Instance details

Defined in Morley.Prelude.Boolean

Methods

(&&) :: (a -> bool) -> (a -> bool) -> a -> bool Source #

(||) :: (a -> bool) -> (a -> bool) -> a -> bool Source #

(Applicative f, Boolean bool) => Boolean (ApplicativeBoolean f bool) Source # 
Instance details

Defined in Morley.Prelude.Boolean

newtype ApplicativeBoolean f bool Source #

A newtype for deriving a Boolean instance for any Applicative type constructor using DerivingVia.

Constructors

ApplicativeBoolean (f bool) 

Instances

Instances details
Functor f => Functor (ApplicativeBoolean f) Source # 
Instance details

Defined in Morley.Prelude.Boolean

Methods

fmap :: (a -> b) -> ApplicativeBoolean f a -> ApplicativeBoolean f b #

(<$) :: a -> ApplicativeBoolean f b -> ApplicativeBoolean f a #

Applicative f => Applicative (ApplicativeBoolean f) Source # 
Instance details

Defined in Morley.Prelude.Boolean

(Applicative f, Boolean bool) => Boolean (ApplicativeBoolean f bool) Source # 
Instance details

Defined in Morley.Prelude.Boolean