@@ -24,6 +24,13 @@ flag with-aeson
24 -- with instances by default
24 -- with instances by default
25 default: True
25 default: True
28+ description: Enable GHC.Generics instances
29+ -- don't let the solver fiddle with the flag
31+ -- with instances by default
27-- A common stanza to share with tests, so that ghcid (bin/test) will reload
34-- A common stanza to share with tests, so that ghcid (bin/test) will reload
28-- instantly when the library sources change (without us having to restart it).
35-- instantly when the library sources change (without us having to restart it).
29common library-common
36common library-common
@@ -81,13 +88,15 @@ library
81 JRec.Field
88 JRec.Field
82 if flag(with-aeson)
89 if flag(with-aeson)
83 cpp-options: -DWITH_AESON
90 cpp-options: -DWITH_AESON
91+ if flag(with-generics)
92+ cpp-options: -DWITH_GENERICS
85test-suite jrec-test
94test-suite jrec-test
86 import: library-common
95 import: library-common
87 type: exitcode-stdio-1.0
96 type: exitcode-stdio-1.0
88 hs-source-dirs: test, src
97 hs-source-dirs: test, src
89 main-is: Spec.hs
98 main-is: Spec.hs
90− cpp-options: -DWITH_AESON
99+ cpp-options: -DWITH_AESON -DWITH_GENERICS
91 build-depends:
100 build-depends: