Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

- class Searchable a where
- forsome :: Searchable a => (a -> Bool) -> Bool
- forevery :: Searchable a => (a -> Bool) -> Bool
- class (Searchable a, Countable a) => Finite a where
- finiteSearch :: Finite a => (a -> Maybe b) -> Maybe b
- finiteCountPrevious :: Finite a => a -> Maybe a
- finiteCountMaybeNext :: Finite a => Maybe a -> Maybe a

# Documentation

class Searchable a where Source #

It turns out there are `Searchable`

instances that are not `Finite`

.
The `(c -> s)`

instance is based on the algorithm at
http://math.andrej.com/2007/09/28/seemingly-impossible-functional-programs/.

Searchable Bool Source # | |

Searchable Int8 Source # | |

Searchable Int16 Source # | |

Searchable Int32 Source # | |

Searchable Int64 Source # | |

Searchable Word8 Source # | |

Searchable Word16 Source # | |

Searchable Word32 Source # | |

Searchable Word64 Source # | |

Searchable () Source # | |

Searchable None Source # | |

Searchable a => Searchable (Maybe a) Source # | |

(Countable c, Searchable s) => Searchable (c -> s) Source # | |

(Searchable a, Searchable b) => Searchable (Either a b) Source # | |

(Searchable a, Searchable b) => Searchable (a, b) Source # | |

class (Searchable a, Countable a) => Finite a where Source #

Not necessarily in counting order.

assemble :: forall b f. Applicative f => (a -> f b) -> f (a -> b) Source #

Finite Bool Source # | |

Finite Int8 Source # | |

Finite Int16 Source # | |

Finite Int32 Source # | |

Finite Int64 Source # | |

Finite Word8 Source # | |

Finite Word16 Source # | |

Finite Word32 Source # | |

Finite Word64 Source # | |

Finite () Source # | |

Finite None Source # | |

Finite a => Finite (Maybe a) Source # | |

(Finite a, Finite b) => Finite (a -> b) Source # | |

(Finite a, Finite b) => Finite (Either a b) Source # | |

(Finite a, Finite b) => Finite (a, b) Source # | |

finiteCountPrevious :: Finite a => a -> Maybe a Source #

# Orphan instances

Finite t => Foldable ((->) t) Source # | |

Finite a => Traversable ((->) a) Source # | |

(Searchable a, Eq b) => Eq (a -> b) Source # | |

(Show a, Finite a, Show b) => Show (a -> b) Source # | |

(Finite a, AtLeastOneCountable a, InfiniteCountable b) => InfiniteCountable (a -> b) Source # | |

(Finite a, AtLeastOneCountable b) => AtLeastOneCountable (a -> b) Source # | |

(Finite a, Countable b) => Countable (a -> b) Source # | |