module Biobase.Types.Evalue where
import Control.DeepSeq
import Control.Lens
import Data.Aeson
import Data.Binary
import Data.Default
import Data.Hashable (Hashable)
import Data.Primitive.Types
import Data.Serialize
import Data.Vector.Unboxed.Base
import Data.Vector.Unboxed.Deriving
import GHC.Generics (Generic)
import qualified Data.Vector.Generic as VG
import qualified Data.Vector.Generic.Mutable as VGM
import qualified Data.Vector.Unboxed as VU
import Numeric.Limits
newtype Evalue = Evalue { getEvalue :: Double }
deriving (Eq,Ord,Read,Show,Num,Generic)
makeWrapped ''Evalue
instance Binary Evalue
instance FromJSON Evalue
instance Hashable Evalue
instance Serialize Evalue
instance ToJSON Evalue
instance NFData Evalue
derivingUnbox "Evalue"
[t| Evalue -> Double |] [| getEvalue |] [| Evalue |]
instance Default Evalue where
def = Evalue 0
{-# Inline def #-}
instance NumericLimits Evalue where
maxFinite = Evalue maxFinite
minFinite = Evalue 0
{-# Inline maxFinite #-}
{-# Inline minFinite #-}