From 9fd3de070901b5591e90406cced64c633cb9ca95 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 30 Dec 2014 13:38:33 -0500 Subject: [PATCH] Add Generic instance for TSN.Team. --- src/TSN/Team.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/TSN/Team.hs b/src/TSN/Team.hs index 2f58acf..1fef0a3 100644 --- a/src/TSN/Team.hs +++ b/src/TSN/Team.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE QuasiQuotes #-} @@ -28,8 +29,10 @@ import Database.Groundhog.TH ( defaultCodegenConfig, groundhog, mkPersist ) +import qualified GHC.Generics as GHC ( Generic ) -- Local imports +import Generics ( Generic(..) ) import Xml ( Child(..), Db(..) ) @@ -49,8 +52,11 @@ data Team = -- don't have them for some teams. name :: Maybe String -- ^ Some teams don't even have names! } - deriving (Eq, Show) + deriving (Eq, GHC.Generic, Show) +-- | Needed for 'Generics.to_tuple'. +-- +instance Generic Team -- * VTeam / HTeam -- 2.44.2