{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
module Experimenter.StepResult where
import Control.DeepSeq
import Control.Lens
import qualified Data.Text as T
import GHC.Generics
data StepResult = StepResult
{ StepResult -> Text
_resultName :: !T.Text
, StepResult -> Maybe Double
_resultXValue :: !(Maybe Double)
, StepResult -> Double
_resultYValue :: !Double
} deriving (forall x. Rep StepResult x -> StepResult
forall x. StepResult -> Rep StepResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StepResult x -> StepResult
$cfrom :: forall x. StepResult -> Rep StepResult x
Generic)
makeLenses ''StepResult
instance NFData StepResult where
rnf :: StepResult -> ()
rnf (StepResult Text
n Maybe Double
x Double
y) = forall a. NFData a => a -> ()
rnf Text
n seq :: forall a b. a -> b -> b
`seq` forall (f :: * -> *) a. (NFData1 f, NFData a) => f a -> ()
rnf1 Maybe Double
x seq :: forall a b. a -> b -> b
`seq` forall a. NFData a => a -> ()
rnf Double
y