Add generic derivations and To/FromJSON instances
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
module Dodge.Data.FloatFunction where
|
||||
|
||||
import GHC.Generics
|
||||
import Data.Aeson
|
||||
data FloatFloat = FloatID
|
||||
| FloatFOV Float
|
||||
| FloatLessCheck Float
|
||||
| FloatAbsCheckGreaterLess Float Float Float
|
||||
| FloatConst Float
|
||||
deriving (Eq,Ord,Show,Read)
|
||||
deriving (Eq,Ord,Show,Read,Generic)
|
||||
instance ToJSON FloatFloat where
|
||||
toEncoding = genericToEncoding defaultOptions
|
||||
instance FromJSON FloatFloat
|
||||
|
||||
Reference in New Issue
Block a user