I want to use automated DeriveGeneric for my parameterized type. I get error. I want to decode a yaml file ino FromJSON type.
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeFamilies #-}
import Web.Scotty
import Data.ByteString.Char8 (pack, unpack)
import Data.ByteString.Lazy (toStrict, fromStrict)
import Data.List
import Data.Yaml
import GHC.Generics
data EPSG a = EPSG { epsg3857 :: a }
data Resolution = Resolution { max :: Int, items :: [Double]}
data Config = Config { minX :: EPSG Double, minY :: EPSG Double, maxX :: EPSG Double, maxY :: EPSG Double
, resolution :: EPSG Resolution
, metersPerUnit :: EPSG Double
, pixelSize :: EPSG Double
, scaleNames :: EPSG [String]
, tileWidth :: EPSG Double
, tileHeight :: EPSG Double
, subdirBit :: EPSG [Int]
, subdirShiftBit :: EPSG [Int]
, subdirNumSize :: EPSG [Int]
, fileNameNumSize :: EPSG [Int] } deriving Generic
instance FromJSON EPSG *
instance FromJSON Resolution
instance FromJSON Config
Line EPSG * raises error. How should I fix it?