module Ness.Global where
import qualified Data.Text as Text
import Global
type SamplingRate = Int
class Render a where
render :: a -> Text
instance Render Double where
render :: Double -> Text
render Double
n = forall a. a -> Maybe a -> a
fromMaybe Text
t forall a b. (a -> b) -> a -> b
$ Text -> Text -> Maybe Text
Text.stripSuffix Text
".0" Text
t
where t :: Text
t = forall a. Show a => a -> Text
showt Double
n
instance Render Int where render :: Int -> Text
render = forall a. Show a => a -> Text
showt
instance Render Bool where render :: Bool -> Text
render Bool
b = if Bool
b then Text
"1" else Text
"0"
type Meters = Double
type Seconds = Double
type Newtons = Double
type Kg = Double
type Velocity = Double
type Pan = Double
type Location = Double
type Frequency = Double