@@ -1,6 +1,6 @@
11{-# LANGUAGE DeriveDataTypeable, OverloadedStrings, NoImplicitPrelude
22 , DeriveGeneric, DeriveAnyClass, PatternGuards, FlexibleInstances
3− , MultiParamTypeClasses, StandaloneDeriving #-}
3+ , MultiParamTypeClasses, StandaloneDeriving, CPP #-}
44{-# OPTIONS_GHC -fconstraint-solver-iterations=10 #-}
55-- | This file is generated from the Wikipedia page
66-- <http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>
@@ -20,12 +20,14 @@ import Control.DeepSeq (NFData(..))
2020import Data.Aeson
2121import Data.Typeable
2222import Data.Text as T
23−import Data.OpenApi
2423import GHC.Generics
2524import Prelude (Show,Read,Eq,Ord,Bounded,Enum,error,($),(++),Maybe(..),(.),fail,seq)
2625import Text.Shakespeare.I18N
26+#ifdef BACKEND
27+import Data.OpenApi
2728import Test.QuickCheck.Arbitrary
2829import Test.QuickCheck.Arbitrary.Generic
30+#endif
2931
3032data CountryCode =
3133 AD
@@ -285,7 +287,11 @@ data CountryCode =
285287 | XK
286288 | XC
287289 | WE
288− deriving (Show,Read,Eq,Ord,Bounded,Enum,Typeable, Generic, ToSchema)
290+ deriving (Show,Read,Eq,Ord,Bounded,Enum,Typeable, Generic
291+#ifdef BACKEND
292+ , ToSchema
293+#endif
294+ )
289295
290296-- | Maybe get the CountryCode from the text code.
291297fromMText :: T.Text -> Maybe CountryCode
@@ -1609,6 +1615,8 @@ instance RenderMessage master CountryCode where
16091615instance NFData CountryCode where
16101616 rnf a = a `seq` ()
16111617
1618+#ifdef BACKEND
16121619instance Arbitrary CountryCode where
16131620 arbitrary = genericArbitrary
16141621 shrink = genericShrink
1622+#endif