diff options
Diffstat (limited to 'src/Xanthous/Resource.hs')
-rw-r--r-- | src/Xanthous/Resource.hs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Xanthous/Resource.hs b/src/Xanthous/Resource.hs index 782fd5040d93..13f7e539679b 100644 --- a/src/Xanthous/Resource.hs +++ b/src/Xanthous/Resource.hs @@ -1,8 +1,13 @@ +-------------------------------------------------------------------------------- module Xanthous.Resource ( Name(..) ) where - +-------------------------------------------------------------------------------- import Xanthous.Prelude +-------------------------------------------------------------------------------- +import Test.QuickCheck +import Test.QuickCheck.Arbitrary.Generic +-------------------------------------------------------------------------------- data Name = MapViewport -- ^ The main viewport where we display the game content @@ -11,4 +16,8 @@ data Name = MapViewport | MessageBox -- ^ The box where we display messages to the user | Prompt - deriving stock (Show, Eq, Ord) + deriving stock (Show, Eq, Ord, Generic) + deriving anyclass (NFData, CoArbitrary, Function) + +instance Arbitrary Name where + arbitrary = genericArbitrary |