diff --git a/src/Handler/Utils/Zip/Rating.hs b/src/Handler/Utils/Zip/Rating.hs index 79ef3775e..6837fccfd 100644 --- a/src/Handler/Utils/Zip/Rating.hs +++ b/src/Handler/Utils/Zip/Rating.hs @@ -4,6 +4,7 @@ {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE DeriveGeneric, DeriveDataTypeable #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} @@ -30,6 +31,9 @@ import qualified Data.ByteString.Lazy as Lazy (ByteString) import Text.Read (readEither) +import GHC.Generics (Generic) +import Data.Typeable (Typeable) + instance HasResolution prec => Pretty (Fixed prec) where pretty = pretty . show @@ -41,8 +45,7 @@ data Rating = Rating , ratingSubmissionId :: SubmissionId , ratingComment :: Maybe Text , ratingPoints :: Maybe Points - } - + } deriving (Read, Show, Eq, Generic, Typeable) getRating :: SubmissionId -> YesodDB UniWorX (Maybe Rating)