@@ -1,6 +1,7 @@
1{-# LANGUAGE DeriveDataTypeable, OverloadedStrings, NoImplicitPrelude
1{-# LANGUAGE DeriveDataTypeable, OverloadedStrings, NoImplicitPrelude
2 , DeriveGeneric, DeriveAnyClass, PatternGuards, FlexibleInstances
2 , DeriveGeneric, DeriveAnyClass, PatternGuards, FlexibleInstances
3− , MultiParamTypeClasses, StandaloneDeriving #-}
3+ , MultiParamTypeClasses, StandaloneDeriving, CPP #-}
4+{-# OPTIONS_GHC -fconstraint-solver-iterations=10 #-}
4-- | This file is generated from the Wikipedia page
5-- | This file is generated from the Wikipedia page
5-- <http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>
6-- <http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>
6module Data.CountryCodes.ISO31661 (
7module Data.CountryCodes.ISO31661 (
@@ -19,10 +20,14 @@ import Control.DeepSeq (NFData(..))
19import Data.Aeson
20import Data.Aeson
20import Data.Typeable
21import Data.Typeable
21import Data.Text as T
22import Data.Text as T
23import GHC.Generics
23import GHC.Generics
24import Prelude (Show,Read,Eq,Ord,Bounded,Enum,error,($),(++),Maybe(..),(.),fail,seq)
24import Prelude (Show,Read,Eq,Ord,Bounded,Enum,error,($),(++),Maybe(..),(.),fail,seq)
25import Text.Shakespeare.I18N
25import Text.Shakespeare.I18N
28+import Test.QuickCheck.Arbitrary
29+import Test.QuickCheck.Arbitrary.Generic
27data CountryCode =
32data CountryCode =
@@ -282,7 +287,11 @@ data CountryCode =
285− deriving (Show,Read,Eq,Ord,Bounded,Enum,Typeable, Generic, ToSchema)
290+ deriving (Show,Read,Eq,Ord,Bounded,Enum,Typeable, Generic
287-- | Maybe get the CountryCode from the text code.
296-- | Maybe get the CountryCode from the text code.
288fromMText :: T.Text -> Maybe CountryCode
297fromMText :: T.Text -> Maybe CountryCode
@@ -1605,3 +1614,9 @@ instance RenderMessage master CountryCode where
1605-- | Allow the deep evaluation of CountryCode with `deepseq`
1614-- | Allow the deep evaluation of CountryCode with `deepseq`
1606instance NFData CountryCode where
1615instance NFData CountryCode where
1607 rnf a = a `seq` ()
1616 rnf a = a `seq` ()
1619+instance Arbitrary CountryCode where
1620+ arbitrary = genericArbitrary
1621+ shrink = genericShrink