From 2f0989fb35630f2ca7db29236b36f75dabf0e921 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Thu, 24 Oct 2019 00:33:01 -0400 Subject: [PATCH] created Comparable typeclass --- test/TypesSpec.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/TypesSpec.hs b/test/TypesSpec.hs index 1a9a00b..819aa0f 100644 --- a/test/TypesSpec.hs +++ b/test/TypesSpec.hs @@ -21,7 +21,7 @@ along with this program. If not, see . {-# LANGUAGE OverloadedStrings, RankNTypes #-} -module TypesSpec (spec) where +module TypesSpec (Comparable (..), spec) where import Data.Aeson (FromJSON, ToJSON, decode, encode, toJSON) import Data.Aeson.Types (Value (Object)) @@ -35,6 +35,9 @@ import Mtlstats.Types import qualified Types.MenuSpec as Menu +class Comparable a where + compareTest :: a -> a -> Spec + spec :: Spec spec = describe "Mtlstats.Types" $ do playerSpec