No title

Anonymous Coward 2018-03-12 16:39:10.533256 UTC

1data BuildOptions = BuildOptions { libs :: [String]
2 , includePaths :: [String]
3 , compiler :: String
4 , compilerFlags :: [String]
5 }
6 deriving Show
7
8instance FromJSON BuildOptions where
9 parseJSON (Object val) = BuildOptions <$>
10 val .: "libs" <*>
11 val .: "includePaths" <*>
12 val .: "compiler" <*>
13 val .: "compilerFlags"
14 -- A non-Object value is of the wrong type, so fail.
15 --}
16 parseJSON _ = error "Can't parse BuildOptions from YAML/JSON"