{-|
    Module      :  Numeric.OrdGenericBool
    Description :  Order with generic Bool-like type
    Copyright   :  (c) Michal Konecny
    License     :  BSD3

    Maintainer  :  mikkonecny@gmail.com
    Stability   :  experimental
    Portability :  portable

    Order ops with generic return type.  
    
    Originally developed for semi-decidable comparisons that return Kleenean instead of Bool.
    
    Use in combination with:

    import Prelude hiding ((==),(/=),(<),(<=),(>),(>=),abs,max,min,not,(&&),(||))
    import qualified Prelude as P

    The usual comparison operators are still available using the P prefix.
-}
module Numeric.OrdGenericBool
(
    -- * order operators
    (==), (/=), (<), (<=), (>), (>=), abs, max, min,
    -- * logical operators
    not, (&&), (||)
)
where

import Prelude hiding ((==),(/=),(<),(<=),(>),(>=),abs,max,min,not,(&&),(||))

import qualified MixedTypesNumPrelude as M

infix  4  ==, /=

(==) :: (M.HasEqAsymmetric t t) => t -> t -> (M.EqCompareType t t)
== :: forall t. HasEqAsymmetric t t => t -> t -> EqCompareType t t
(==) = forall a b. HasEqAsymmetric a b => a -> b -> EqCompareType a b
(M.==)

(/=) :: (M.HasEqAsymmetric t t) => t -> t -> (M.EqCompareType t t)
/= :: forall t. HasEqAsymmetric t t => t -> t -> EqCompareType t t
(/=) = forall a b. HasEqAsymmetric a b => a -> b -> EqCompareType a b
(M./=)

infix  4  <, <=, >=, >

(<) :: (M.HasOrderAsymmetric t t) => t -> t -> (M.OrderCompareType t t)
< :: forall t. HasOrderAsymmetric t t => t -> t -> OrderCompareType t t
(<) = forall a b.
HasOrderAsymmetric a b =>
a -> b -> OrderCompareType a b
(M.<)

(<=) :: (M.HasOrderAsymmetric t t) => t -> t -> (M.OrderCompareType t t)
<= :: forall t. HasOrderAsymmetric t t => t -> t -> OrderCompareType t t
(<=) = forall a b.
HasOrderAsymmetric a b =>
a -> b -> OrderCompareType a b
(M.<=)

(>) :: (M.HasOrderAsymmetric t t) => t -> t -> (M.OrderCompareType t t)
> :: forall t. HasOrderAsymmetric t t => t -> t -> OrderCompareType t t
(>) = forall a b.
HasOrderAsymmetric a b =>
a -> b -> OrderCompareType a b
(M.>)

(>=) :: (M.HasOrderAsymmetric t t) => t -> t -> (M.OrderCompareType t t)
>= :: forall t. HasOrderAsymmetric t t => t -> t -> OrderCompareType t t
(>=) = forall a b.
HasOrderAsymmetric a b =>
a -> b -> OrderCompareType a b
(M.>=)

abs :: (M.CanAbsSameType t) => t -> t
abs :: forall t. CanAbsSameType t => t -> t
abs = (forall t. CanAbs t => t -> AbsType t
M.abs)

max :: (M.CanMinMaxSameType t) => t -> t -> t
max :: forall t. CanMinMaxSameType t => t -> t -> t
max = (forall t1 t2.
CanMinMaxAsymmetric t1 t2 =>
t1 -> t2 -> MinMaxType t1 t2
M.max)

min :: (M.CanMinMaxSameType t) => t -> t -> t
min :: forall t. CanMinMaxSameType t => t -> t -> t
min = (forall t1 t2.
CanMinMaxAsymmetric t1 t2 =>
t1 -> t2 -> MinMaxType t1 t2
M.min)

infixr 3  &&
infixr 2  ||

(&&) :: (M.CanAndOrSameType t) => t -> t -> t
&& :: forall t. CanAndOrSameType t => t -> t -> t
(&&) = forall a b. CanAndOrAsymmetric a b => a -> b -> AndOrType a b
(M.&&)

(||) :: (M.CanAndOrSameType t) => t -> t -> t
|| :: forall t. CanAndOrSameType t => t -> t -> t
(||) = forall a b. CanAndOrAsymmetric a b => a -> b -> AndOrType a b
(M.||)

not :: (M.CanNegSameType t) => t -> t
not :: forall t. CanNegSameType t => t -> t
not = forall t. CanNeg t => t -> NegType t
M.not