diff options
Diffstat (limited to 'testsuite/tests/th/T12788_Lib.hs')
-rw-r--r-- | testsuite/tests/th/T12788_Lib.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/th/T12788_Lib.hs b/testsuite/tests/th/T12788_Lib.hs new file mode 100644 index 0000000000..2924eef5fb --- /dev/null +++ b/testsuite/tests/th/T12788_Lib.hs @@ -0,0 +1,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 [] |