module Patrol.Type.Platform
( Platform(..)
) where
import qualified Data.Aeson as Aeson
data Platform
= As3
| C
| Cfml
| Cocoa
| Csharp
| Elixir
| Go
| Groovy
| Haskell
| Java
| Javascript
| Native
| Node
| Objc
| Other
| Perl
| Php
| Python
| Ruby
deriving (Platform -> Platform -> Bool
(Platform -> Platform -> Bool)
-> (Platform -> Platform -> Bool) -> Eq Platform
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Platform -> Platform -> Bool
$c/= :: Platform -> Platform -> Bool
== :: Platform -> Platform -> Bool
$c== :: Platform -> Platform -> Bool
Eq, Int -> Platform -> ShowS
[Platform] -> ShowS
Platform -> String
(Int -> Platform -> ShowS)
-> (Platform -> String) -> ([Platform] -> ShowS) -> Show Platform
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Platform] -> ShowS
$cshowList :: [Platform] -> ShowS
show :: Platform -> String
$cshow :: Platform -> String
showsPrec :: Int -> Platform -> ShowS
$cshowsPrec :: Int -> Platform -> ShowS
Show)
instance Aeson.ToJSON Platform where
toJSON :: Platform -> Value
toJSON Platform
platform = String -> Value
forall a. ToJSON a => a -> Value
Aeson.toJSON (String -> Value) -> String -> Value
forall a b. (a -> b) -> a -> b
$ case Platform
platform of
Platform
As3 -> String
"as3"
Platform
C -> String
"c"
Platform
Cfml -> String
"cfml"
Platform
Cocoa -> String
"cocoa"
Platform
Csharp -> String
"csharp"
Platform
Elixir -> String
"elixir"
Platform
Go -> String
"go"
Platform
Groovy -> String
"groovy"
Platform
Haskell -> String
"haskell"
Platform
Java -> String
"java"
Platform
Javascript -> String
"javascript"
Platform
Native -> String
"native"
Platform
Node -> String
"node"
Platform
Objc -> String
"objc"
Platform
Other -> String
"other"
Platform
Perl -> String
"perl"
Platform
Php -> String
"php"
Platform
Python -> String
"python"
Platform
Ruby -> String
"ruby"