Add file
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
module Dodge.Cloud where
|
||||
|
||||
import Dodge.Data.Cloud
|
||||
|
||||
cRad :: Cloud -> Float
|
||||
cRad cl = case _clType cl of
|
||||
SmokeCloud -> 0
|
||||
FlamerSmokeCloud -> 6
|
||||
RocketCloud -> 15
|
||||
StoneDust -> 15
|
||||
CryoReleaseCloud -> 10
|
||||
GasCloud -> 15
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
module Dodge.Data.Machine.Sensor.Type
|
||||
where
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
|
||||
data SensorType
|
||||
= LaserSensor
|
||||
| ElectricSensor
|
||||
| ThermalSensor
|
||||
| PhysicalSensor
|
||||
deriving (Eq,Ord,Show,Read,Bounded,Enum)
|
||||
|
||||
deriveJSON defaultOptions ''SensorType
|
||||
instance ToJSONKey SensorType
|
||||
instance FromJSONKey SensorType
|
||||
Reference in New Issue
Block a user