Copyright | (c) Andrey Mulik 2019-2021 |
---|---|
License | BSD-style |
Maintainer | work.a.mulik@gmail.com |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe |
Language | Haskell2010 |
SDP.Estimate provides Estimate
class, type synonyms and some common
comparators. This module is exported by SDP.SafePrelude.
Synopsis
- module Data.Functor.Classes
- class Estimate e where
- type Estimate1 rep e = Estimate (rep e)
- type Estimate2 rep i e = Estimate (rep i e)
- type Estimate' rep = forall e. Estimate (rep e)
- type Estimate'' rep = forall i e. Estimate (rep i e)
- (<=.>) :: Estimate e => Int -> e -> Ordering
- (<.) :: Estimate e => Int -> e -> Bool
- (>.) :: Estimate e => Int -> e -> Bool
- (<=.) :: Estimate e => Int -> e -> Bool
- (>=.) :: Estimate e => Int -> e -> Bool
- (==.) :: Estimate e => Int -> e -> Bool
- (/=.) :: Estimate e => Int -> e -> Bool
Exports
module Data.Functor.Classes
Estimate
class Estimate e where Source #
Estimate
class provides the lazy comparsion structures by length.
For some types (e.g., lists), this allows you to speed up the comparison or make it finite. For others (e.g., arrays), it may be convenient abbreviation.
(<.=>) :: e -> Int -> Ordering infixl 4 Source #
Compare structure length with given number.
(<==>) :: Compare e infixl 4 Source #
Compare pair of structures by length.
(.==) :: e -> Int -> Bool infixl 4 Source #
Compare structure length with given number.
(./=) :: e -> Int -> Bool infixl 4 Source #
Compare structure length with given number.
(.<=) :: e -> Int -> Bool infixl 4 Source #
Compare structure length with given number.
(.>=) :: e -> Int -> Bool infixl 4 Source #
Compare structure length with given number.
(.<) :: e -> Int -> Bool infixl 4 Source #
Compare structure length with given number.
(.>) :: e -> Int -> Bool infixl 4 Source #
Compare structure length with given number.
(.<.) :: e -> e -> Bool infixl 4 Source #
Compare pair of structures by length.
(.>.) :: e -> e -> Bool infixl 4 Source #
Compare pair of structures by length.
(.<=.) :: e -> e -> Bool infixl 4 Source #
Compare pair of structures by length.
(.>=.) :: e -> e -> Bool infixl 4 Source #
Compare pair of structures by length.
(.==.) :: e -> e -> Bool infixl 4 Source #
Compare pair of structures by length.
(./=.) :: e -> e -> Bool infixl 4 Source #
Compare pair of structures by length.
Instances
Rank 2 quantified constraints
GHC 8.6.1+ only
type Estimate' rep = forall e. Estimate (rep e) Source #
Estimate
quantified contraint for (Type -> Type)
-kind types.
type Estimate'' rep = forall i e. Estimate (rep i e) Source #
Estimate
quantified contraint for (Type -> Type -> Type)
-kind types.
Right-side Estimate functions.
(<=.>) :: Estimate e => Int -> e -> Ordering infixl 4 Source #
Compare given number with structure length.
(<=.) :: Estimate e => Int -> e -> Bool infixl 4 Source #
Compare given number with structure length.
(>=.) :: Estimate e => Int -> e -> Bool infixl 4 Source #
Compare given number with structure length.