Prelude.Extras

prelude-extras-0.4.0.3: Higher order versions of Prelude classes

Safe Haskell | Trustworthy
Language | Haskell98

Prelude.Extras

Contents

- Lifted Prelude classes for kind * -> *
- Lifted Prelude classes for kind * -> * -> *

Synopsis

- class Eq1 f where
  - (==#) :: Eq a => f a -> f a -> Bool
- (/=#) :: (Eq1 f, Eq a) => f a -> f a -> Bool
- class Eq1 f => Ord1 f where
  - compare1 :: Ord a => f a -> f a -> Ordering
- (<#) :: (Ord1 f, Ord a) => f a -> f a -> Bool
- (<=#) :: (Ord1 f, Ord a) => f a -> f a -> Bool
- (>=#) :: (Ord1 f, Ord a) => f a -> f a -> Bool
- (>#) :: (Ord1 f, Ord a) => f a -> f a -> Bool
- max1 :: (Ord1 f, Ord a) => f a -> f a -> f a
- min1 :: (Ord1 f, Ord a) => f a -> f a -> f a
- class Show1 f where
  - showsPrec1 :: Show a => Int -> f a -> ShowS
  - showList1 :: Show a => [f a] -> ShowS
- show1 :: (Show1 f, Show a) => f a -> String
- shows1 :: (Show1 f, Show a) => f a -> ShowS
- class Read1 f where
  - readsPrec1 :: Read a => Int -> ReadS (f a)
  - readList1 :: Read a => ReadS [f a]
- read1 :: (Read1 f, Read a) => String -> f a
- reads1 :: (Read1 f, Read a) => ReadS (f a)
- readPrec1 :: (Read1 f, Read a) => ReadPrec (f a)
- readListPrec1 :: (Read1 f, Read a) => ReadPrec [f a]
- readList1Default :: (Read1 f, Read a) => ReadS [f a]
- readListPrec1Default :: (Read1 f, Read a) => ReadPrec [f a]
- newtype Lift1 f a = Lift1 {
  - lower1 :: f a
  }
- class Eq2 f where
  - (==##) :: (Eq a, Eq b) => f a b -> f a b -> Bool
- (/=##) :: (Eq2 f, Eq a, Eq b) => f a b -> f a b -> Bool
- class Eq2 f => Ord2 f where
  - compare2 :: (Ord a, Ord b) => f a b -> f a b -> Ordering
- (<##) :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> Bool
- (<=##) :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> Bool
- (>=##) :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> Bool
- (>##) :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> Bool
- max2 :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> f a b
- min2 :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> f a b
- class Show2 f where
  - showsPrec2 :: (Show a, Show b) => Int -> f a b -> ShowS
  - showList2 :: (Show a, Show b) => [f a b] -> ShowS
- show2 :: (Show2 f, Show a, Show b) => f a b -> String
- shows2 :: (Show2 f, Show a, Show b) => f a b -> ShowS
- class Read2 f where
  - readsPrec2 :: (Read a, Read b) => Int -> ReadS (f a b)
  - readList2 :: (Read a, Read b) => ReadS [f a b]
- read2 :: (Read2 f, Read a, Read b) => String -> f a b
- reads2 :: (Read2 f, Read a, Read b) => ReadS (f a b)
- readPrec2 :: (Read2 f, Read a, Read b) => ReadPrec (f a b)
- readListPrec2 :: (Read2 f, Read a, Read b) => ReadPrec [f a b]
- readList2Default :: (Read2 f, Read a, Read b) => ReadS [f a b]
- readListPrec2Default :: (Read2 f, Read a, Read b) => ReadPrec [f a b]
- newtype Lift2 f a b = Lift2 {
  - lower2 :: f a b
  }

# Lifted Prelude classes for kind * -> *

class Eq1 f where

Minimal complete definition

Nothing

Methods

(==#) :: Eq a => f a -> f a -> Bool infixr 4

Instances

Eq1 [] |
Eq1 Ratio |
Eq1 StablePtr |
Eq1 Ptr |
Eq1 FunPtr |
Eq1 Identity |
Eq1 Fixed |
Eq1 Complex |
Eq1 Chan |
Eq1 ZipList |
Eq1 TVar |
Eq1 ForeignPtr |
Eq1 IORef |
Eq1 MVar |
Eq1 Dual |
Eq1 Sum |
Eq1 Product |
Eq1 First |
Eq1 Last |
Eq1 Down |
Eq1 Maybe |
Eq a => Eq1 (Either a) |
Eq a => Eq1 ((,) a) |
Eq a => Eq1 (Const a) |
Eq1 (Proxy *) |
Eq1 f => Eq1 (Lift1 f) |
(Eq a, Eq b) => Eq1 ((,,) a b) |
Eq1 f => Eq1 (Alt * f) |
(Eq2 f, Eq a) => Eq1 (Lift2 f a) |
(Eq a, Eq b, Eq c) => Eq1 ((,,,) a b c) |
(Eq a, Eq b, Eq c, Eq d) => Eq1 ((,,,,) a b c d) |
(Eq a, Eq b, Eq c, Eq d, Eq e) => Eq1 ((,,,,,) a b c d e) |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq1 ((,,,,,,) a b c d e f) |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) => Eq1 ((,,,,,,,) a b c d e f g) |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h) => Eq1 ((,,,,,,,,) a b c d e f g h) |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i) => Eq1 ((,,,,,,,,,) a b c d e f g h i) |

(/=#) :: (Eq1 f, Eq a) => f a -> f a -> Bool infixr 4

class Eq1 f => Ord1 f where

Minimal complete definition

Nothing

Methods

compare1 :: Ord a => f a -> f a -> Ordering

Instances

Ord1 [] |
Ord1 Ptr |
Ord1 FunPtr |
Ord1 Identity |
Ord1 Fixed |
Ord1 ZipList |
Ord1 ForeignPtr |
Ord1 Dual |
Ord1 Sum |
Ord1 Product |
Ord1 First |
Ord1 Last |
Ord1 Down |
Ord1 Maybe |
Ord a => Ord1 (Either a) |
Ord a => Ord1 ((,) a) |
Ord a => Ord1 (Const a) |
Ord1 (Proxy *) |
Ord1 f => Ord1 (Lift1 f) |
(Ord a, Ord b) => Ord1 ((,,) a b) |
Ord1 f => Ord1 (Alt * f) |
(Ord2 f, Ord a) => Ord1 (Lift2 f a) |
(Ord a, Ord b, Ord c) => Ord1 ((,,,) a b c) |
(Ord a, Ord b, Ord c, Ord d) => Ord1 ((,,,,) a b c d) |
(Ord a, Ord b, Ord c, Ord d, Ord e) => Ord1 ((,,,,,) a b c d e) |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord1 ((,,,,,,) a b c d e f) |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g) => Ord1 ((,,,,,,,) a b c d e f g) |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h) => Ord1 ((,,,,,,,,) a b c d e f g h) |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i) => Ord1 ((,,,,,,,,,) a b c d e f g h i) |

(<#) :: (Ord1 f, Ord a) => f a -> f a -> Bool infixr 4

(<=#) :: (Ord1 f, Ord a) => f a -> f a -> Bool infixr 4

(>=#) :: (Ord1 f, Ord a) => f a -> f a -> Bool infixr 4

(>#) :: (Ord1 f, Ord a) => f a -> f a -> Bool infixr 4

max1 :: (Ord1 f, Ord a) => f a -> f a -> f a

min1 :: (Ord1 f, Ord a) => f a -> f a -> f a

class Show1 f where

Minimal complete definition

Nothing

Methods

showsPrec1 :: Show a => Int -> f a -> ShowS

showList1 :: Show a => [f a] -> ShowS

Instances

Show1 [] |
Show1 Ptr |
Show1 FunPtr |
Show1 Identity |
Show1 Complex |
Show1 ZipList |
Show1 ForeignPtr |
Show1 Dual |
Show1 Sum |
Show1 Product |
Show1 First |
Show1 Last |
Show1 Down |
Show1 Maybe |
Show a => Show1 (Either a) |
Show a => Show1 ((,) a) |
Show a => Show1 (Const a) |
Show1 (Proxy *) |
Show1 f => Show1 (Lift1 f) |
(Show a, Show b) => Show1 ((,,) a b) |
Show1 f => Show1 (Alt * f) |
(Show2 f, Show a) => Show1 (Lift2 f a) |
(Show a, Show b, Show c) => Show1 ((,,,) a b c) |
(Show a, Show b, Show c, Show d) => Show1 ((,,,,) a b c d) |
(Show a, Show b, Show c, Show d, Show e) => Show1 ((,,,,,) a b c d e) |
(Show a, Show b, Show c, Show d, Show e, Show f) => Show1 ((,,,,,,) a b c d e f) |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g) => Show1 ((,,,,,,,) a b c d e f g) |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) => Show1 ((,,,,,,,,) a b c d e f g h) |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i) => Show1 ((,,,,,,,,,) a b c d e f g h i) |

show1 :: (Show1 f, Show a) => f a -> String

shows1 :: (Show1 f, Show a) => f a -> ShowS

class Read1 f where

Minimal complete definition

Nothing

Methods

readsPrec1 :: Read a => Int -> ReadS (f a)

readList1 :: Read a => ReadS [f a]

Instances

Read1 [] |
Read1 Identity |
Read1 Complex |
Read1 ZipList |
Read1 Dual |
Read1 Sum |
Read1 Product |
Read1 First |
Read1 Last |
Read1 Down |
Read1 Maybe |
Read a => Read1 (Either a) |
Read a => Read1 ((,) a) |
Read a => Read1 (Const a) |
Read1 (Proxy *) |
Read1 f => Read1 (Lift1 f) |
(Read a, Read b) => Read1 ((,,) a b) |
Read1 f => Read1 (Alt * f) |
(Read2 f, Read a) => Read1 (Lift2 f a) |
(Read a, Read b, Read c) => Read1 ((,,,) a b c) |
(Read a, Read b, Read c, Read d) => Read1 ((,,,,) a b c d) |
(Read a, Read b, Read c, Read d, Read e) => Read1 ((,,,,,) a b c d e) |
(Read a, Read b, Read c, Read d, Read e, Read f) => Read1 ((,,,,,,) a b c d e f) |
(Read a, Read b, Read c, Read d, Read e, Read f, Read g) => Read1 ((,,,,,,,) a b c d e f g) |
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h) => Read1 ((,,,,,,,,) a b c d e f g h) |
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i) => Read1 ((,,,,,,,,,) a b c d e f g h i) |

read1 :: (Read1 f, Read a) => String -> f a

reads1 :: (Read1 f, Read a) => ReadS (f a)

readPrec1 :: (Read1 f, Read a) => ReadPrec (f a)

readListPrec1 :: (Read1 f, Read a) => ReadPrec [f a]

readList1Default :: (Read1 f, Read a) => ReadS [f a]

readListPrec1Default :: (Read1 f, Read a) => ReadPrec [f a]

newtype Lift1 f a

Constructors

Lift1 |
Fields lower1 :: f a

Instances

Functor f => Functor (Lift1 f) |
Foldable f => Foldable (Lift1 f) |
Traversable f => Traversable (Lift1 f) |
Read1 f => Read1 (Lift1 f) |
Show1 f => Show1 (Lift1 f) |
Ord1 f => Ord1 (Lift1 f) |
Eq1 f => Eq1 (Lift1 f) |
(Eq1 f, Eq a) => Eq (Lift1 f a) |
(Ord1 f, Ord a) => Ord (Lift1 f a) |
(Read1 f, Read a) => Read (Lift1 f a) |
(Show1 f, Show a) => Show (Lift1 f a) |

# Lifted Prelude classes for kind * -> * -> *

class Eq2 f where

Minimal complete definition

Nothing

Methods

(==##) :: (Eq a, Eq b) => f a b -> f a b -> Bool infixr 4

Instances

Eq2 Either |
Eq2 (,) |
Eq2 Const |
Eq a => Eq2 ((,,) a) |
Eq2 f => Eq2 (Lift2 f) |
(Eq a, Eq b) => Eq2 ((,,,) a b) |
(Eq a, Eq b, Eq c) => Eq2 ((,,,,) a b c) |
(Eq a, Eq b, Eq c, Eq d) => Eq2 ((,,,,,) a b c d) |
(Eq a, Eq b, Eq c, Eq d, Eq e) => Eq2 ((,,,,,,) a b c d e) |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq2 ((,,,,,,,) a b c d e f) |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) => Eq2 ((,,,,,,,,) a b c d e f g) |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h) => Eq2 ((,,,,,,,,,) a b c d e f g h) |

(/=##) :: (Eq2 f, Eq a, Eq b) => f a b -> f a b -> Bool infixr 4

class Eq2 f => Ord2 f where

Minimal complete definition

Nothing

Methods

compare2 :: (Ord a, Ord b) => f a b -> f a b -> Ordering

Instances

Ord2 Either |
Ord2 (,) |
Ord2 Const |
Ord a => Ord2 ((,,) a) |
Ord2 f => Ord2 (Lift2 f) |
(Ord a, Ord b) => Ord2 ((,,,) a b) |
(Ord a, Ord b, Ord c) => Ord2 ((,,,,) a b c) |
(Ord a, Ord b, Ord c, Ord d) => Ord2 ((,,,,,) a b c d) |
(Ord a, Ord b, Ord c, Ord d, Ord e) => Ord2 ((,,,,,,) a b c d e) |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord2 ((,,,,,,,) a b c d e f) |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g) => Ord2 ((,,,,,,,,) a b c d e f g) |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h) => Ord2 ((,,,,,,,,,) a b c d e f g h) |

(<##) :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> Bool infixr 4

(<=##) :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> Bool infixr 4

(>=##) :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> Bool infixr 4

(>##) :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> Bool infixr 4

max2 :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> f a b

min2 :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> f a b

class Show2 f where

Minimal complete definition

Nothing

Methods

showsPrec2 :: (Show a, Show b) => Int -> f a b -> ShowS

showList2 :: (Show a, Show b) => [f a b] -> ShowS

Instances

Show2 Either |
Show2 (,) |
Show2 Const |
Show a => Show2 ((,,) a) |
Show2 f => Show2 (Lift2 f) |
(Show a, Show b) => Show2 ((,,,) a b) |
(Show a, Show b, Show c) => Show2 ((,,,,) a b c) |
(Show a, Show b, Show c, Show d) => Show2 ((,,,,,) a b c d) |
(Show a, Show b, Show c, Show d, Show e) => Show2 ((,,,,,,) a b c d e) |
(Show a, Show b, Show c, Show d, Show e, Show f) => Show2 ((,,,,,,,) a b c d e f) |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g) => Show2 ((,,,,,,,,) a b c d e f g) |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) => Show2 ((,,,,,,,,,) a b c d e f g h) |

show2 :: (Show2 f, Show a, Show b) => f a b -> String

shows2 :: (Show2 f, Show a, Show b) => f a b -> ShowS

class Read2 f where

Minimal complete definition

Nothing

Methods

readsPrec2 :: (Read a, Read b) => Int -> ReadS (f a b)

readList2 :: (Read a, Read b) => ReadS [f a b]

Instances

Read2 Either |
Read2 (,) |
Read2 Const |
Read a => Read2 ((,,) a) |
Read2 f => Read2 (Lift2 f) |
(Read a, Read b) => Read2 ((,,,) a b) |
(Read a, Read b, Read c) => Read2 ((,,,,) a b c) |
(Read a, Read b, Read c, Read d) => Read2 ((,,,,,) a b c d) |
(Read a, Read b, Read c, Read d, Read e) => Read2 ((,,,,,,) a b c d e) |
(Read a, Read b, Read c, Read d, Read e, Read f) => Read2 ((,,,,,,,) a b c d e f) |
(Read a, Read b, Read c, Read d, Read e, Read f, Read g) => Read2 ((,,,,,,,,) a b c d e f g) |
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h) => Read2 ((,,,,,,,,,) a b c d e f g h) |

read2 :: (Read2 f, Read a, Read b) => String -> f a b

reads2 :: (Read2 f, Read a, Read b) => ReadS (f a b)

readPrec2 :: (Read2 f, Read a, Read b) => ReadPrec (f a b)

readListPrec2 :: (Read2 f, Read a, Read b) => ReadPrec [f a b]

readList2Default :: (Read2 f, Read a, Read b) => ReadS [f a b]

readListPrec2Default :: (Read2 f, Read a, Read b) => ReadPrec [f a b]

newtype Lift2 f a b

Constructors

Lift2 |
Fields lower2 :: f a b

Instances

Read2 f => Read2 (Lift2 f) |
Show2 f => Show2 (Lift2 f) |
Ord2 f => Ord2 (Lift2 f) |
Eq2 f => Eq2 (Lift2 f) |
Functor (f a) => Functor (Lift2 f a) |
Foldable (f a) => Foldable (Lift2 f a) |
Traversable (f a) => Traversable (Lift2 f a) |
(Read2 f, Read a) => Read1 (Lift2 f a) |
(Show2 f, Show a) => Show1 (Lift2 f a) |
(Ord2 f, Ord a) => Ord1 (Lift2 f a) |
(Eq2 f, Eq a) => Eq1 (Lift2 f a) |
(Eq2 f, Eq a, Eq b) => Eq (Lift2 f a b) |
(Ord2 f, Ord a, Ord b) => Ord (Lift2 f a b) |
(Read2 f, Read a, Read b) => Read (Lift2 f a b) |
(Show2 f, Show a, Show b) => Show (Lift2 f a b) |