summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T12788_Lib.hs
blob: 2924eef5fbb20472dcd7ae044ec16345ce6228e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module T12788_Lib where

import Language.Haskell.TH

data Options = Options
    { fieldLabelModifier :: String -> String
    , constructorTagModifier :: String -> String
    , allNullaryToStringTag :: Bool
    , omitNothingFields :: Bool
    , sumEncoding :: SumEncoding
    , unwrapUnaryRecords :: Bool
    }

data SumEncoding =
    TaggedObject { tagFieldName      :: String
                 , contentsFieldName :: String
                 }
  | ObjectWithSingleField
  | TwoElemArray

deriveJSON :: Options -> Name -> Q [Dec]
deriveJSON _ _ = return []