{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Network.Mux.DeltaQ.TraceTypes
( SISec (..)
, SISec2 (..)
, squareSISec
) where
newtype SISec = S Float
deriving (SISec -> SISec -> Bool
(SISec -> SISec -> Bool) -> (SISec -> SISec -> Bool) -> Eq SISec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SISec -> SISec -> Bool
== :: SISec -> SISec -> Bool
$c/= :: SISec -> SISec -> Bool
/= :: SISec -> SISec -> Bool
Eq, Eq SISec
Eq SISec =>
(SISec -> SISec -> Ordering)
-> (SISec -> SISec -> Bool)
-> (SISec -> SISec -> Bool)
-> (SISec -> SISec -> Bool)
-> (SISec -> SISec -> Bool)
-> (SISec -> SISec -> SISec)
-> (SISec -> SISec -> SISec)
-> Ord SISec
SISec -> SISec -> Bool
SISec -> SISec -> Ordering
SISec -> SISec -> SISec
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: SISec -> SISec -> Ordering
compare :: SISec -> SISec -> Ordering
$c< :: SISec -> SISec -> Bool
< :: SISec -> SISec -> Bool
$c<= :: SISec -> SISec -> Bool
<= :: SISec -> SISec -> Bool
$c> :: SISec -> SISec -> Bool
> :: SISec -> SISec -> Bool
$c>= :: SISec -> SISec -> Bool
>= :: SISec -> SISec -> Bool
$cmax :: SISec -> SISec -> SISec
max :: SISec -> SISec -> SISec
$cmin :: SISec -> SISec -> SISec
min :: SISec -> SISec -> SISec
Ord, Integer -> SISec
SISec -> SISec
SISec -> SISec -> SISec
(SISec -> SISec -> SISec)
-> (SISec -> SISec -> SISec)
-> (SISec -> SISec -> SISec)
-> (SISec -> SISec)
-> (SISec -> SISec)
-> (SISec -> SISec)
-> (Integer -> SISec)
-> Num SISec
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: SISec -> SISec -> SISec
+ :: SISec -> SISec -> SISec
$c- :: SISec -> SISec -> SISec
- :: SISec -> SISec -> SISec
$c* :: SISec -> SISec -> SISec
* :: SISec -> SISec -> SISec
$cnegate :: SISec -> SISec
negate :: SISec -> SISec
$cabs :: SISec -> SISec
abs :: SISec -> SISec
$csignum :: SISec -> SISec
signum :: SISec -> SISec
$cfromInteger :: Integer -> SISec
fromInteger :: Integer -> SISec
Num)
newtype SISec2 = S2 Float
deriving (SISec2 -> SISec2 -> Bool
(SISec2 -> SISec2 -> Bool)
-> (SISec2 -> SISec2 -> Bool) -> Eq SISec2
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SISec2 -> SISec2 -> Bool
== :: SISec2 -> SISec2 -> Bool
$c/= :: SISec2 -> SISec2 -> Bool
/= :: SISec2 -> SISec2 -> Bool
Eq, Eq SISec2
Eq SISec2 =>
(SISec2 -> SISec2 -> Ordering)
-> (SISec2 -> SISec2 -> Bool)
-> (SISec2 -> SISec2 -> Bool)
-> (SISec2 -> SISec2 -> Bool)
-> (SISec2 -> SISec2 -> Bool)
-> (SISec2 -> SISec2 -> SISec2)
-> (SISec2 -> SISec2 -> SISec2)
-> Ord SISec2
SISec2 -> SISec2 -> Bool
SISec2 -> SISec2 -> Ordering
SISec2 -> SISec2 -> SISec2
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: SISec2 -> SISec2 -> Ordering
compare :: SISec2 -> SISec2 -> Ordering
$c< :: SISec2 -> SISec2 -> Bool
< :: SISec2 -> SISec2 -> Bool
$c<= :: SISec2 -> SISec2 -> Bool
<= :: SISec2 -> SISec2 -> Bool
$c> :: SISec2 -> SISec2 -> Bool
> :: SISec2 -> SISec2 -> Bool
$c>= :: SISec2 -> SISec2 -> Bool
>= :: SISec2 -> SISec2 -> Bool
$cmax :: SISec2 -> SISec2 -> SISec2
max :: SISec2 -> SISec2 -> SISec2
$cmin :: SISec2 -> SISec2 -> SISec2
min :: SISec2 -> SISec2 -> SISec2
Ord, Integer -> SISec2
SISec2 -> SISec2
SISec2 -> SISec2 -> SISec2
(SISec2 -> SISec2 -> SISec2)
-> (SISec2 -> SISec2 -> SISec2)
-> (SISec2 -> SISec2 -> SISec2)
-> (SISec2 -> SISec2)
-> (SISec2 -> SISec2)
-> (SISec2 -> SISec2)
-> (Integer -> SISec2)
-> Num SISec2
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: SISec2 -> SISec2 -> SISec2
+ :: SISec2 -> SISec2 -> SISec2
$c- :: SISec2 -> SISec2 -> SISec2
- :: SISec2 -> SISec2 -> SISec2
$c* :: SISec2 -> SISec2 -> SISec2
* :: SISec2 -> SISec2 -> SISec2
$cnegate :: SISec2 -> SISec2
negate :: SISec2 -> SISec2
$cabs :: SISec2 -> SISec2
abs :: SISec2 -> SISec2
$csignum :: SISec2 -> SISec2
signum :: SISec2 -> SISec2
$cfromInteger :: Integer -> SISec2
fromInteger :: Integer -> SISec2
Num)
squareSISec :: SISec -> SISec2
squareSISec :: SISec -> SISec2
squareSISec (S Float
x) = Float -> SISec2
S2 (Float -> SISec2) -> Float -> SISec2
forall a b. (a -> b) -> a -> b
$ Float
x Float -> Float -> Float
forall a. Num a => a -> a -> a
* Float
x