From f208d2aa998680d0877be39ea6baf470bd778440 Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Fri, 20 Jan 2023 09:17:50 +0100 Subject: [PATCH] attempt to fix build by removing derive Typeable (likely no effect) --- load/Load.hs | 8 ++-- models/sheets.model | 2 +- src/Application.hs | 2 +- src/Audit.hs | 4 +- src/Audit/Types.hs | 2 +- src/Auth/Dummy.hs | 2 +- src/Auth/LDAP.hs | 8 ++-- src/Auth/LDAP/AD.hs | 2 +- src/Auth/PWHash.hs | 4 +- src/Control/Monad/Trans/Except/Instances.hs | 2 +- src/CryptoID/Cached.hs | 6 +-- src/Data/Time/LocalTime/Instances.hs | 1 - src/Database/Persist/Types/Instances.hs | 2 - src/Foundation/Authorization.hs | 8 ++-- src/Foundation/I18n.hs | 6 +-- src/Foundation/I18n/TH.hs | 8 ++-- src/Foundation/Instances/ButtonClass.hs | 2 +- src/Foundation/Navigation.hs | 12 ++--- src/Foundation/SiteLayout.hs | 6 +-- src/Foundation/Type.hs | 8 ++-- src/Foundation/Types.hs | 2 +- src/Foundation/Yesod/Auth.hs | 2 +- src/Handler/Admin/Avs.hs | 10 ++-- src/Handler/Admin/Test.hs | 2 +- src/Handler/Admin/Test/Download.hs | 4 +- src/Handler/Admin/Tokens.hs | 6 +-- src/Handler/Course/LecturerInvite.hs | 6 +-- src/Handler/Course/ParticipantInvite.hs | 10 ++-- src/Handler/Course/Register.hs | 2 +- src/Handler/Course/User.hs | 4 +- src/Handler/Course/Users.hs | 14 +++--- src/Handler/Exam/AddUser.hs | 2 +- src/Handler/Exam/AutoOccurrence.hs | 6 +-- src/Handler/Exam/CorrectorInvite.hs | 6 +-- src/Handler/Exam/Edit.hs | 2 +- src/Handler/Exam/Form.hs | 4 +- src/Handler/Exam/Register.hs | 2 +- src/Handler/Exam/RegistrationInvite.hs | 6 +-- src/Handler/Exam/Users.hs | 8 ++-- src/Handler/ExamOffice/Exam.hs | 8 ++-- src/Handler/ExamOffice/Exams.hs | 4 +- src/Handler/ExamOffice/Fields.hs | 2 +- src/Handler/ExamOffice/Users.hs | 6 +-- src/Handler/ExternalExam/StaffInvite.hs | 6 +-- src/Handler/LMS.hs | 6 +-- src/Handler/LMS/Result.hs | 6 +-- src/Handler/LMS/Userlist.hs | 6 +-- src/Handler/Participants.hs | 2 +- src/Handler/PrintCenter.hs | 6 +-- src/Handler/Profile.hs | 8 ++-- src/Handler/Sheet/CorrectorInvite.hs | 6 +-- src/Handler/Sheet/PersonalisedFiles.hs | 8 ++-- src/Handler/Sheet/PersonalisedFiles/Meta.hs | 2 +- src/Handler/Sheet/PersonalisedFiles/Types.hs | 9 ++-- src/Handler/Sheet/Pseudonym.hs | 2 +- src/Handler/Submission/Assign.hs | 2 +- src/Handler/Submission/List.hs | 4 +- .../Submission/SubmissionUserInvite.hs | 6 +-- src/Handler/Submission/Upload.hs | 2 +- src/Handler/SystemMessage.hs | 2 +- src/Handler/Tutorial/TutorInvite.hs | 6 +-- src/Handler/Tutorial/Users.hs | 4 +- src/Handler/Upload.hs | 2 +- src/Handler/Users.hs | 16 +++---- src/Handler/Utils/Avs.hs | 2 +- src/Handler/Utils/Communication.hs | 6 +-- src/Handler/Utils/Download.hs | 2 +- src/Handler/Utils/Exam.hs | 6 +-- src/Handler/Utils/ExternalExam/Users.hs | 12 ++--- src/Handler/Utils/Files.hs | 2 +- src/Handler/Utils/Form.hs | 32 ++++++------- src/Handler/Utils/Form/MassInput.hs | 20 ++++---- src/Handler/Utils/Form/Occurrences.hs | 4 +- src/Handler/Utils/Invitations.hs | 4 +- src/Handler/Utils/Memcached.hs | 17 +++---- src/Handler/Utils/Pandoc.hs | 2 +- src/Handler/Utils/Rating/Format.hs | 2 +- src/Handler/Utils/Sheet.hs | 2 +- src/Handler/Utils/StudyFeatures.hs | 4 +- src/Handler/Utils/Submission.hs | 8 ++-- src/Handler/Utils/Table/Pagination.hs | 6 +-- src/Handler/Utils/Table/Pagination/Types.hs | 2 +- src/Handler/Utils/TermCandidates.hs | 2 +- src/Handler/Utils/Users.hs | 8 ++-- src/Handler/Utils/Zip.hs | 2 +- src/Jobs.hs | 2 +- src/Jobs/Handler/Files.hs | 2 +- src/Jobs/Handler/SynchroniseLdap.hs | 2 +- src/Jobs/Types.hs | 17 ++++--- src/Jose/Jwt/Instances.hs | 2 - src/Ldap/Client/Pool.hs | 2 +- src/Mail.hs | 4 +- src/Model.hs | 10 ++-- src/Model/Migration/Definitions.hs | 2 +- src/Model/Migration/Types.hs | 2 +- src/Model/Migration/Version.hs | 2 +- src/Model/Rating.hs | 16 +++---- src/Model/Submission.hs | 4 +- src/Model/Tokens/Bearer.hs | 4 +- src/Model/Tokens/Session.hs | 2 +- src/Model/Tokens/Upload.hs | 6 +-- src/Model/Types/Apis.hs | 4 +- src/Model/Types/Avs.hs | 42 ++++++++--------- src/Model/Types/Changelog.hs | 2 +- src/Model/Types/Communication.hs | 2 +- src/Model/Types/Course.hs | 4 +- src/Model/Types/Csv.hs | 8 ++-- src/Model/Types/DateTime.hs | 12 ++--- src/Model/Types/Exam.hs | 46 +++++++++---------- src/Model/Types/File.hs | 28 +++++------ src/Model/Types/Health.hs | 6 +-- src/Model/Types/Languages.hs | 2 +- src/Model/Types/Lms.hs | 10 ++-- src/Model/Types/Mail.hs | 10 ++-- src/Model/Types/Markup.hs | 4 +- src/Model/Types/Misc.hs | 6 +-- src/Model/Types/Room.hs | 4 +- src/Model/Types/School.hs | 6 +-- src/Model/Types/Security.hs | 8 ++-- src/Model/Types/Sheet.hs | 14 +++--- src/Model/Types/Submission.hs | 2 +- src/Model/Types/Upload.hs | 2 +- src/Model/Types/User.hs | 2 +- src/Network/Mail/Mime/Instances.hs | 2 +- src/ServantApi/ExternalApis/Type.hs | 12 ++--- src/Settings.hs | 14 +++--- src/Settings/Cluster.hs | 2 +- src/Settings/Cluster/Volatile.hs | 2 +- src/Settings/Cookies.hs | 2 +- src/Settings/WellKnownFiles/TH.hs | 2 +- src/Utils.hs | 18 ++++---- src/Utils/ARC.hs | 4 +- src/Utils/Cookies/Registered.hs | 4 +- src/Utils/Csv.hs | 5 +- src/Utils/DateTime.hs | 4 +- src/Utils/Failover.hs | 4 +- src/Utils/Form.hs | 16 +++---- src/Utils/Frontend/I18n.hs | 2 +- src/Utils/Frontend/Notification.hs | 2 +- src/Utils/Holidays.hs | 2 +- src/Utils/HttpConditional.hs | 24 +++++----- src/Utils/I18n.hs | 2 +- src/Utils/Icon.hs | 2 +- src/Utils/LRU.hs | 4 +- src/Utils/Message.hs | 4 +- src/Utils/Metrics.hs | 14 +++--- src/Utils/NTop.hs | 2 +- src/Utils/Pool.hs | 2 +- src/Utils/Postgresql.hs | 2 +- src/Utils/Route.hs | 3 +- src/Utils/Session.hs | 2 +- src/Utils/Sql.hs | 2 +- src/Utils/SystemMessage.hs | 2 +- src/Utils/TH.hs | 2 +- src/Utils/Tokens.hs | 4 +- src/Utils/Users.hs | 2 +- src/Utils/VolatileClusterSettings.hs | 2 +- .../Backend/Persistent/Memcached.hs | 4 +- src/Web/ServerSession/Frontend/Yesod/Jwt.hs | 2 +- src/Yesod/Servant.hs | 6 +-- test/Handler/Utils/ZipSpec.hs | 4 +- test/PandocSpec.hs | 4 +- test/TestImport.hs | 4 +- translate.hs | 4 +- 164 files changed, 479 insertions(+), 493 deletions(-) diff --git a/load/Load.hs b/load/Load.hs index 2d7b2bb38..843127132 100644 --- a/load/Load.hs +++ b/load/Load.hs @@ -58,7 +58,7 @@ import qualified Control.Retry as Retry data Normal k = Normal { dAvg :: k , dRelDev :: Centi - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) sampleN :: (Random.MonadSplit g m, RandomGen g) => (k -> Centi -> k) -> Normal k -> m k sampleN scale Normal{..} @@ -101,7 +101,7 @@ instance PathPiece DiffTime where data LoadSimulation = LoadSheetDownload | LoadSheetSubmission - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''LoadSimulation $ camelToPathPiece' 1 @@ -112,7 +112,7 @@ data LoadOptions = LoadOptions , loadToken :: Maybe Jwt , loadTerm :: TermId, loadSchool :: SchoolId, loadCourse :: CourseShorthand, loadSheet :: SheetName , loadUploadChunks :: Normal Natural, loadUploadChunkSize :: Normal Natural - } deriving (Eq, Ord, Show, Generic, Typeable) + } deriving (Eq, Ord, Show, Generic) instance Default LoadOptions where def = LoadOptions @@ -127,7 +127,7 @@ instance Default LoadOptions where data SimulationOptions = SimulationOptions { simParallel :: Natural , simDelay, simDuration :: Normal DiffTime - } deriving (Eq, Ord, Show, Generic, Typeable) + } deriving (Eq, Ord, Show, Generic) instance Default SimulationOptions where def = SimulationOptions diff --git a/models/sheets.model b/models/sheets.model index 0aeefb217..c6de9b368 100644 --- a/models/sheets.model +++ b/models/sheets.model @@ -63,7 +63,7 @@ PersonalisedSheetFile content FileContentReference Maybe modified UTCTime UniquePersonalisedSheetFile sheet user type title - deriving Eq Ord Read Show Typeable Generic + deriving Eq Ord Read Show Generic FallbackPersonalisedSheetFilesKey course CourseId OnDeleteCascade OnUpdateCascade diff --git a/src/Application.hs b/src/Application.hs index 0c3024a6e..6592a8342 100644 --- a/src/Application.hs +++ b/src/Application.hs @@ -383,7 +383,7 @@ makeFoundation appSettings''@AppSettings{..} = do data SessionStoreException = SessionStoreNotAvailable - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance Exception SessionStoreException mkSessionStore :: forall m. diff --git a/src/Audit.hs b/src/Audit.hs index a113cfcd0..c6b7c7dfd 100644 --- a/src/Audit.hs +++ b/src/Audit.hs @@ -35,7 +35,7 @@ import GHC.Stack data AuditRemoteException = ARUnsupportedSocketKind - deriving (Show, Generic, Typeable) + deriving (Show, Generic) instance Exception AuditRemoteException @@ -80,7 +80,7 @@ getRemote = handle testHandler $ do data AuditException = AuditRemoteException AuditRemoteException - deriving (Show, Generic, Typeable) + deriving (Show, Generic) instance Exception AuditException diff --git a/src/Audit/Types.hs b/src/Audit/Types.hs index db4dbdd30..d01835b7b 100644 --- a/src/Audit/Types.hs +++ b/src/Audit/Types.hs @@ -210,7 +210,7 @@ data Transaction , transactionUser :: UserId } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriveJSON defaultOptions { constructorTagModifier = camelToPathPiece' 1 diff --git a/src/Auth/Dummy.hs b/src/Auth/Dummy.hs index b584bcc38..06bf4985e 100644 --- a/src/Auth/Dummy.hs +++ b/src/Auth/Dummy.hs @@ -20,7 +20,7 @@ import qualified Data.CaseInsensitive as CI data DummyMessage = MsgDummyIdent | MsgDummyIdentPlaceholder | MsgDummyNoFormData - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) dummyForm :: ( RenderMessage (HandlerSite m) FormMessage diff --git a/src/Auth/LDAP.hs b/src/Auth/LDAP.hs index fc225edf4..ecc9f160b 100644 --- a/src/Auth/LDAP.hs +++ b/src/Auth/LDAP.hs @@ -44,13 +44,13 @@ deriving newtype instance Ord Ldap.Attr data CampusLogin = CampusLogin { campusIdent :: CI Text , campusPassword :: Text - } deriving (Generic, Typeable) + } deriving (Generic) data CampusMessage = MsgCampusIdentPlaceholder | MsgCampusIdent | MsgCampusPassword | MsgCampusPasswordPlaceholder - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) findUser :: LdapConf -> Ldap -> Text -> [Ldap.Attr] -> IO [Ldap.SearchEntry] @@ -107,7 +107,7 @@ ldapUserEmail = Ldap.Attr "mail" :| data CampusUserException = CampusUserLdapError LdapPoolError | CampusUserNoResult | CampusUserAmbiguous - deriving (Show, Eq, Generic, Typeable) + deriving (Show, Eq, Generic) instance Exception CampusUserException @@ -173,7 +173,7 @@ campusUserMatr' pool mode newtype ADInvalidCredentials = ADInvalidCredentials ADError - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving newtype (Universe, Finite, Enum, Bounded, PathPiece, ToJSON, FromJSON, ToJSONKey, FromJSONKey) isUnusualADError :: ADError -> Bool diff --git a/src/Auth/LDAP/AD.hs b/src/Auth/LDAP/AD.hs index fa653a101..986a65273 100644 --- a/src/Auth/LDAP/AD.hs +++ b/src/Auth/LDAP/AD.hs @@ -34,7 +34,7 @@ data ADError | ADAccountExpired | ADPasswordMustChange | ADAccountLockedOut - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''ADError $ camelToPathPiece' 1 diff --git a/src/Auth/PWHash.hs b/src/Auth/PWHash.hs index 36423f35c..e857d8dcc 100644 --- a/src/Auth/PWHash.hs +++ b/src/Auth/PWHash.hs @@ -24,13 +24,13 @@ import qualified Yesod.Auth.Message as Msg data HashLogin = HashLogin { hashIdent :: CI Text , hashPassword :: Text - } deriving (Generic, Typeable) + } deriving (Generic) data PWHashMessage = MsgPWHashIdent | MsgPWHashIdentPlaceholder | MsgPWHashPassword | MsgPWHashPasswordPlaceholder - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) hashForm :: ( RenderMessage (HandlerSite m) FormMessage diff --git a/src/Control/Monad/Trans/Except/Instances.hs b/src/Control/Monad/Trans/Except/Instances.hs index ed1dd85c5..f1b465fbe 100644 --- a/src/Control/Monad/Trans/Except/Instances.hs +++ b/src/Control/Monad/Trans/Except/Instances.hs @@ -15,7 +15,7 @@ import Control.Arrow (left) newtype UnliftIOExceptTError e = UnliftIOExceptTError { getUnliftIOExceptTError :: e } - deriving (Read, Show, Generic, Typeable) + deriving (Read, Show, Generic) deriving newtype (Exception) diff --git a/src/CryptoID/Cached.hs b/src/CryptoID/Cached.hs index bc7dc701d..ebbf06c4e 100644 --- a/src/CryptoID/Cached.hs +++ b/src/CryptoID/Cached.hs @@ -13,10 +13,8 @@ import qualified Data.Binary as Binary import qualified Data.CryptoID.Class.ImplicitNamespace as I -newtype CryptoIDDecryption ciphertext plaintext = CryptoIDDecryption plaintext - deriving (Typeable) -newtype CryptoIDEncryption ciphertext plaintext = CryptoIDEncryption ciphertext - deriving (Typeable) +newtype CryptoIDDecryption ciphertext plaintext = CryptoIDDecryption plaintext +newtype CryptoIDEncryption ciphertext plaintext = CryptoIDEncryption ciphertext encrypt :: forall plaintext ciphertext m. ( I.HasCryptoID ciphertext plaintext (HandlerFor (HandlerSite m)) diff --git a/src/Data/Time/LocalTime/Instances.hs b/src/Data/Time/LocalTime/Instances.hs index 4b197786d..f0f8c449f 100644 --- a/src/Data/Time/LocalTime/Instances.hs +++ b/src/Data/Time/LocalTime/Instances.hs @@ -16,7 +16,6 @@ import qualified Language.Haskell.TH.Syntax as TH deriving instance Generic TimeOfDay -deriving instance Typeable TimeOfDay instance Hashable TimeOfDay diff --git a/src/Database/Persist/Types/Instances.hs b/src/Database/Persist/Types/Instances.hs index 86adf8459..e32ed5951 100644 --- a/src/Database/Persist/Types/Instances.hs +++ b/src/Database/Persist/Types/Instances.hs @@ -22,7 +22,6 @@ import Data.Binary (Binary) deriving instance Generic LiteralType -deriving instance Typeable LiteralType instance Hashable LiteralType instance Binary LiteralType @@ -30,7 +29,6 @@ instance NFData LiteralType deriving instance Generic PersistValue -deriving instance Typeable PersistValue instance Hashable PersistValue instance Binary PersistValue diff --git a/src/Foundation/Authorization.hs b/src/Foundation/Authorization.hs index 7b27f7cf6..832cf62a7 100644 --- a/src/Foundation/Authorization.hs +++ b/src/Foundation/Authorization.hs @@ -90,7 +90,7 @@ type BearerAuthSite site -- Access Control newtype InvalidAuthTag = InvalidAuthTag Text - deriving (Eq, Ord, Show, Read, Generic, Typeable) + deriving (Eq, Ord, Show, Read, Generic) instance Exception InvalidAuthTag @@ -251,7 +251,7 @@ data AuthContext = AuthContext { authCtxAuth :: Maybe (AuthId UniWorX) , authCtxBearer :: Maybe (BearerToken UniWorX) , authActiveTags :: AuthTagActive - } deriving (Generic, Typeable) + } deriving (Generic) deriving stock instance Eq (AuthId UniWorX) => Eq AuthContext deriving stock instance Ord (AuthId UniWorX) => Ord AuthContext @@ -276,7 +276,7 @@ getAuthContext = liftHandler $ do return authCtx newtype IsDryRun = MkIsDryRun { unIsDryRun :: Bool } - deriving stock (Read, Show, Generic, Typeable) + deriving stock (Read, Show, Generic) deriving newtype (Eq, Ord) deriving (Semigroup, Monoid) via Any @@ -475,7 +475,7 @@ data AuthorizationCacheKey | AuthCacheLecturerList | AuthCacheExternalExamStaffList | AuthCacheCorrectorList | AuthCacheExamCorrectorList | AuthCacheTutorList | AuthCacheSubmissionGroupUserList | AuthCacheCourseRegisteredList TermId SchoolId CourseShorthand | AuthCacheVisibleSystemMessages - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Hashable, Binary) cacheAPSchoolFunction :: BearerAuthSite UniWorX diff --git a/src/Foundation/I18n.hs b/src/Foundation/I18n.hs index e9871a67c..bca3c6b87 100644 --- a/src/Foundation/I18n.hs +++ b/src/Foundation/I18n.hs @@ -345,7 +345,7 @@ embedRenderMessageVariant ''UniWorX ''ShortSex ("Short" <>) data SheetType' = NotGraded' | Normal' | Bonus' | Informational' | ExamPartPoints' - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving (Universe, Finite) classifySheetType :: SheetType a -> SheetType' @@ -360,7 +360,7 @@ nullaryPathPiece ''SheetType' (camelToPathPiece . dropSuffix "'") embedRenderMessage ''UniWorX ''SheetType' $ ("SheetType" <>) . fromMaybe (error "Expected SheetType' to have '") . stripSuffix "'" newtype SheetArchiveFileTypeDirectory = SheetArchiveFileTypeDirectory SheetFileType - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving newtype (Enum, Bounded, Universe, Finite) embedRenderMessageVariant ''UniWorX ''SheetArchiveFileTypeDirectory $ ("SheetArchiveFileTypeDirectory" <>) . concat . drop 1 . splitCamel @@ -470,7 +470,7 @@ embedRenderMessageVariant ''UniWorX ''ErrorResponseTitle ("ErrorResponseTitle" < newtype UniWorXMessages = UniWorXMessages [SomeMessage UniWorX] - deriving stock (Generic, Typeable) + deriving stock (Generic) deriving newtype (Semigroup, Monoid) instance IsList UniWorXMessages where diff --git a/src/Foundation/I18n/TH.hs b/src/Foundation/I18n/TH.hs index 4f8dbd28e..66d3ac77a 100644 --- a/src/Foundation/I18n/TH.hs +++ b/src/Foundation/I18n/TH.hs @@ -40,7 +40,7 @@ import Utils.TH.AlphaConversion (alphaConvE) newtype MsgFile f g = MsgFile { msgFileContent :: InsOrdHashMap String (f (MsgDef f g)) - } deriving (Generic, Typeable) + } deriving (Generic) deriving stock instance Eq (f (MsgDef f g)) => Eq (MsgFile f g) deriving stock instance Show (f (MsgDef f g)) => Show (MsgFile f g) @@ -54,18 +54,18 @@ data MsgDef f g = MsgDef { msgDefVars :: InsOrdHashMap String (f (g TH.Type)) , msgDefContent :: [MsgDefContent] , msgDefAnnotations :: Set MsgDefAnnotation - } deriving (Generic, Typeable) + } deriving (Generic) deriving stock instance Eq (f (g TH.Type)) => Eq (MsgDef f g) deriving stock instance Show (f (g TH.Type)) => Show (MsgDef f g) data MsgDefContent = MsgDefContentLiteral String | MsgDefContentSplice Bool {- Recurse? -} TH.Exp - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) data MsgDefAnnotation = MsgDefIdenticalOk | MsgDefEmptyOk - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) makePrisms ''MsgDefContent makePrisms ''MsgDefAnnotation diff --git a/src/Foundation/Instances/ButtonClass.hs b/src/Foundation/Instances/ButtonClass.hs index ed933a50c..fd4ffb974 100644 --- a/src/Foundation/Instances/ButtonClass.hs +++ b/src/Foundation/Instances/ButtonClass.hs @@ -25,7 +25,7 @@ data instance ButtonClass UniWorX | BCDanger | BCLink | BCMassInputAdd | BCMassInputDelete - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite) instance PathPiece (ButtonClass UniWorX) where diff --git a/src/Foundation/Navigation.hs b/src/Foundation/Navigation.hs index 47039a242..bc5e2476b 100644 --- a/src/Foundation/Navigation.hs +++ b/src/Foundation/Navigation.hs @@ -380,7 +380,7 @@ breadcrumb SwaggerJsonR = breadcrumb SwaggerR data NavQuickView = NavQuickViewFavourite | NavQuickViewPageActionSecondary - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving (Universe, Finite) navQuick :: NavQuickView -> (NavQuickView -> Any) @@ -394,17 +394,17 @@ data NavType { navMethod :: StdMethod , navData :: [(Text, Text)] } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Hashable, Binary) makeLenses_ ''NavType makePrisms ''NavType data NavLevel = NavLevelTop | NavLevelInner - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) data NavHeaderRole = NavHeaderPrimary | NavHeaderSecondary - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) data NavAccess = NavAccessDB (ReaderT SqlReadBackend Handler Bool) | NavAccessHandler (Handler Bool) @@ -465,7 +465,7 @@ data Nav } | NavFooter { navLink :: NavLink - } deriving (Generic, Typeable) + } deriving (Generic) makeLenses_ ''Nav makePrisms ''Nav @@ -479,7 +479,7 @@ type family ChildrenNavChildren a where data NavigationCacheKey = NavCacheRouteAccess AuthContext NavType (Route UniWorX) - deriving (Generic, Typeable) + deriving (Generic) deriving stock instance Eq (AuthId UniWorX) => Eq NavigationCacheKey deriving stock instance Ord (AuthId UniWorX) => Ord NavigationCacheKey diff --git a/src/Foundation/SiteLayout.hs b/src/Foundation/SiteLayout.hs index a6c6c8bf6..46d3f9272 100644 --- a/src/Foundation/SiteLayout.hs +++ b/src/Foundation/SiteLayout.hs @@ -51,7 +51,7 @@ data CourseFavouriteToggleButton = BtnCourseFavouriteToggleManual | BtnCourseFavouriteToggleAutomatic | BtnCourseFavouriteToggleOff - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''CourseFavouriteToggleButton $ camelToPathPiece' 4 @@ -105,7 +105,7 @@ storedFavouriteReason tid ssh csh muid = fmap unValueFirst . E.select . E.from $ data MemcachedKeyFavourites = MemcachedKeyFavouriteQuickActions (TermId, SchoolId, CourseShorthand) AuthContext (NonEmpty Lang) - deriving (Generic, Typeable) + deriving (Generic) deriving instance Eq AuthContext => Eq MemcachedKeyFavourites deriving instance Read AuthContext => Read MemcachedKeyFavourites @@ -115,7 +115,7 @@ deriving instance Binary AuthContext => Binary MemcachedKeyFavourites data MemcachedLimitKeyFavourites = MemcachedLimitKeyFavourites - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Hashable, Binary) diff --git a/src/Foundation/Type.hs b/src/Foundation/Type.hs index dcddb8003..5c77e9863 100644 --- a/src/Foundation/Type.hs +++ b/src/Foundation/Type.hs @@ -51,14 +51,14 @@ type SMTPPool = Pool SMTPConnection data SomeSessionStorage = SessionStorageMemcachedSql { sessionStorageMemcachedSql :: MemcachedSqlStorage SessionMap } | SessionStorageAcid { sessionStorageAcid :: AcidStorage SessionMap } - deriving (Generic, Typeable) + deriving (Generic) makePrisms ''SomeSessionStorage data AppMemcached = AppMemcached { memcachedKey :: AEAD.Key , memcachedConn :: Memcached.Connection - } deriving (Generic, Typeable) + } deriving (Generic) makeLenses_ ''AppMemcached @@ -66,7 +66,7 @@ data AppMemcachedLocal = AppMemcachedLocal { memcachedLocalARC :: ARCHandle (Fingerprint, Lazy.ByteString) Int (NFDynamic, Maybe POSIXTime) , memcachedLocalHandleInvalidations :: Async () , memcachedLocalInvalidationQueue :: TVar (Seq (Fingerprint, Lazy.ByteString)) - } deriving (Generic, Typeable) + } deriving (Generic) makeLenses_ ''AppMemcachedLocal @@ -104,7 +104,7 @@ data UniWorX = UniWorX , appVolatileClusterSettingsCache :: TVar VolatileClusterSettingsCache , appStartTime :: UTCTime -- for Status Page , appAvsQuery :: Maybe AvsQuery - } deriving (Typeable) + } makeLenses_ ''UniWorX instance HasInstanceID UniWorX InstanceId where diff --git a/src/Foundation/Types.hs b/src/Foundation/Types.hs index 7e8d9ae6a..786b943b0 100644 --- a/src/Foundation/Types.hs +++ b/src/Foundation/Types.hs @@ -17,7 +17,7 @@ data UpsertCampusUserMode | UpsertCampusUserLoginOther { upsertCampusUserIdent :: UserIdent } -- erlaubt keinen späteren Login | UpsertCampusUserLdapSync { upsertCampusUserIdent :: UserIdent } | UpsertCampusUserGuessUser - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) makeLenses_ ''UpsertCampusUserMode makePrisms ''UpsertCampusUserMode diff --git a/src/Foundation/Yesod/Auth.hs b/src/Foundation/Yesod/Auth.hs index 5b7b6e969..3044f385c 100644 --- a/src/Foundation/Yesod/Auth.hs +++ b/src/Foundation/Yesod/Auth.hs @@ -130,7 +130,7 @@ data CampusUserConversionException | CampusUserInvalidMatriculation | CampusUserInvalidFeaturesOfStudy Text | CampusUserInvalidAssociatedSchools Text - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Exception) _upsertCampusUserMode :: Traversal' (Creds UniWorX) UpsertCampusUserMode diff --git a/src/Handler/Admin/Avs.hs b/src/Handler/Admin/Avs.hs index 9599ed97f..c5ec10082 100644 --- a/src/Handler/Admin/Avs.hs +++ b/src/Handler/Admin/Avs.hs @@ -41,7 +41,7 @@ single = uncurry Map.singleton -- Button only needed in AVS TEST; further buttons see below data ButtonAvsTest = BtnCheckLicences | BtnSynchLicences - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonAvsTest instance Finite ButtonAvsTest @@ -279,7 +279,7 @@ type SynchDBRow = (E.Value AvsPersonId, E.Value AvsLicence, Entity Qualification -- Buttons only needed for AVS Synching data ButtonAvsImportUnknown = BtnAvsImportUnknown - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonAvsImportUnknown instance Finite ButtonAvsImportUnknown nullaryPathPiece ''ButtonAvsImportUnknown camelToPathPiece @@ -288,7 +288,7 @@ instance Button UniWorX ButtonAvsImportUnknown where btnClasses BtnAvsImportUnknown = [BCIsButton, BCPrimary] data ButtonAvsRevokeUnknown = BtnAvsRevokeUnknown - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonAvsRevokeUnknown instance Finite ButtonAvsRevokeUnknown nullaryPathPiece ''ButtonAvsRevokeUnknown camelToPathPiece @@ -300,7 +300,7 @@ instance Button UniWorX ButtonAvsRevokeUnknown where data LicenceTableAction = LicenceTableChangeAvs | LicenceTableRevokeFDrive | LicenceTableGrantFDrive - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''LicenceTableAction $ camelToPathPiece' 2 @@ -311,7 +311,7 @@ data LicenceTableActionData = LicenceTableChangeAvsData | LicenceTableGrantFDriveData { licenceTableChangeFDriveQId :: QualificationId , licenceTableChangeFDriveEnd :: Day } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) postProblemAvsSynchR, getProblemAvsSynchR :: Handler Html diff --git a/src/Handler/Admin/Test.hs b/src/Handler/Admin/Test.hs index 77b1da476..6c9c64a47 100644 --- a/src/Handler/Admin/Test.hs +++ b/src/Handler/Admin/Test.hs @@ -35,7 +35,7 @@ import Handler.Admin.Test.Download (testDownload) -- BEGIN - Buttons needed only here data ButtonCreate = CreateMath | CreateInf | CrashApp -- Dummy for Example - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonCreate instance Finite ButtonCreate diff --git a/src/Handler/Admin/Test/Download.hs b/src/Handler/Admin/Test/Download.hs index 2101ab9b2..65d9efd7a 100644 --- a/src/Handler/Admin/Test/Download.hs +++ b/src/Handler/Admin/Test/Download.hs @@ -30,7 +30,7 @@ data TestDownloadMode = TestDownloadDirect | TestDownloadInTransaction | TestDownloadFromDatabase - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite, Binary) nullaryPathPiece ''TestDownloadMode $ camelToPathPiece' 2 @@ -40,7 +40,7 @@ data TestDownloadOptions = TestDownloadOptions { dlSeed :: Random.Seed , dlMaxSize, dlChunkSize :: Int , dlMode :: TestDownloadMode - } deriving (Generic, Typeable) + } deriving (Generic) deriving anyclass (Binary) testDownloadForm :: Form TestDownloadOptions diff --git a/src/Handler/Admin/Tokens.hs b/src/Handler/Admin/Tokens.hs index 4d4e40a6b..fc781eaf4 100644 --- a/src/Handler/Admin/Tokens.hs +++ b/src/Handler/Admin/Tokens.hs @@ -38,10 +38,10 @@ data BTFImpersonate { btfiCount :: Int64 , btfiWeightActivity :: Bool } - deriving (Eq, Ord, Generic, Typeable) + deriving (Eq, Ord, Generic) data BTFImpersonate' = BTFINone' | BTFISingle' | BTFIRandom' - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving (Universe, Finite, Hashable) nullaryPathPiece ''BTFImpersonate' $ let noNone n | n == "none" = "impersonate-" <> n | otherwise = n @@ -56,7 +56,7 @@ data BearerTokenForm = BearerTokenForm , btfAddAuth :: Maybe AuthDNF , btfExpiresAt :: Maybe (Maybe UTCTime) , btfStartsAt :: Maybe UTCTime - } deriving (Generic, Typeable) + } deriving (Generic) bearerTokenForm :: WForm Handler (FormResult BearerTokenForm) bearerTokenForm = do diff --git a/src/Handler/Course/LecturerInvite.hs b/src/Handler/Course/LecturerInvite.hs index 96f9d860b..434b19c82 100644 --- a/src/Handler/Course/LecturerInvite.hs +++ b/src/Handler/Course/LecturerInvite.hs @@ -27,12 +27,12 @@ instance IsInvitableJunction Lecturer where type InvitationFor Lecturer = Course data InvitableJunction Lecturer = JunctionLecturer { jLecturerType :: LecturerType - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) data InvitationDBData Lecturer = InvDBDataLecturer { invDBLecturerType :: Maybe LecturerType - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) data InvitationTokenData Lecturer = InvTokenDataLecturer - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) _InvitableJunction = iso (\Lecturer{..} -> (lecturerUser, lecturerCourse, JunctionLecturer lecturerType)) diff --git a/src/Handler/Course/ParticipantInvite.hs b/src/Handler/Course/ParticipantInvite.hs index dc3575fa4..9425ecea1 100644 --- a/src/Handler/Course/ParticipantInvite.hs +++ b/src/Handler/Course/ParticipantInvite.hs @@ -30,7 +30,7 @@ type TutorialIdent = CI Text data ButtonCourseRegisterMode = BtnCourseRegisterConfirm | BtnCourseRegisterAbort - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe ButtonCourseRegisterMode instance Finite ButtonCourseRegisterMode @@ -50,7 +50,7 @@ data CourseRegisterAction = CourseRegisterActionAddParticipant | CourseRegisterActionAddTutorialMember -- | CourseRegisterActionUnknownPerson - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe CourseRegisterAction instance Finite CourseRegisterAction @@ -67,7 +67,7 @@ data CourseRegisterActionData -- | CourseRegisterActionUnknownPersonData -- pseudo-action; just for display -- { crActUnknownPersonIdent :: Text -- } - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) makeLenses_ ''CourseRegisterActionData makePrisms ''CourseRegisterActionData @@ -97,7 +97,7 @@ courseRegisterRenderAction act = [whamlet|^{userWidget (view _2 (crActUser act)) data AddUserRequest = AddUserRequest { auReqUsers :: Set UserSearchKey , auReqTutorial :: Maybe TutorialIdent - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) data AddParticipantsResult = AddParticipantsResult @@ -106,7 +106,7 @@ data AddParticipantsResult = AddParticipantsResult , aurAlreadyTutorialMember , aurRegisterSuccess , aurTutorialSuccess :: Set UserId - } deriving (Read, Show, Generic, Typeable) + } deriving (Read, Show, Generic) instance Semigroup AddParticipantsResult where (<>) = mappenddefault diff --git a/src/Handler/Course/Register.hs b/src/Handler/Course/Register.hs index 028e5d4ac..611c52e70 100644 --- a/src/Handler/Course/Register.hs +++ b/src/Handler/Course/Register.hs @@ -23,7 +23,7 @@ import qualified Database.Esqueleto.Utils as E -- Dedicated CourseRegistrationButton data ButtonCourseRegister = BtnCourseRegister | BtnCourseDeregister - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonCourseRegister instance Finite ButtonCourseRegister nullaryPathPiece ''ButtonCourseRegister $ camelToPathPiece' 1 diff --git a/src/Handler/Course/User.hs b/src/Handler/Course/User.hs index 8b5a07119..1f9a7a247 100644 --- a/src/Handler/Course/User.hs +++ b/src/Handler/Course/User.hs @@ -37,7 +37,7 @@ import qualified Data.Text.Lazy as LT data ExamAction = ExamDeregister | ExamSetResult - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''ExamAction $ camelToPathPiece' 1 embedRenderMessage ''UniWorX ''ExamAction $ Text.replace "Exam" "ExamUser" @@ -46,7 +46,7 @@ data ExamActionData = ExamDeregisterData | ExamSetResultData (Maybe ExamResultPassedGrade) data TutorialAction = TutorialDeregister - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''TutorialAction $ camelToPathPiece' 1 embedRenderMessage ''UniWorX ''TutorialAction $ Text.replace "Tutorial" "TutorialUser" diff --git a/src/Handler/Course/Users.hs b/src/Handler/Course/Users.hs index f1dc4bf69..9c1b9ff40 100644 --- a/src/Handler/Course/Users.hs +++ b/src/Handler/Course/Users.hs @@ -196,7 +196,7 @@ data UserTableCsv = UserTableCsv , csvUserTutorials :: ([TutorialName], Map (CI Text) (Maybe TutorialName)) , csvUserExams :: [ExamName] , csvUserSheets :: Map SheetName (SheetType (), Maybe Points) - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) makeLenses_ ''UserTableCsv instance Csv.ToNamedRecord UserTableCsv where @@ -245,7 +245,7 @@ instance CsvColumnsExplained UserTableCsv where newtype UserCsvExportData = UserCsvExportData { csvUserIncludeSheets :: Bool - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) instance Default UserCsvExportData where def = UserCsvExportData False @@ -279,17 +279,17 @@ data UserTableJson = UserTableJson , jsonUserTutorialGroups :: Map (CI Text) (Maybe TutorialName) , jsonUserExams :: Set ExamName , jsonUserSheets :: Map SheetName UserTableJsonSheetResult - } deriving (Generic, Typeable) + } deriving (Generic) data UserTableJsonSheetResult = UserTableJsonSheetResult { jsonSheetType :: SheetType UserTableJsonSheetTypeExamPartRef , jsonPoints :: Maybe Points - } deriving (Generic, Typeable) + } deriving (Generic) data UserTableJsonSheetTypeExamPartRef = UserTableJsonSheetTypeExamPartRef { jsonExam :: ExamName , jsonExamPart :: ExamPartNumber - } deriving (Generic, Typeable) + } deriving (Generic) deriveToJSON defaultOptions { fieldLabelModifier = camelToPathPiece' 1 @@ -325,7 +325,7 @@ data CourseUserAction = CourseUserSendMail | CourseUserReRegister | CourseUserDeregister | CourseUserDownloadPersonalisedSheetFiles - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe CourseUserAction instance Finite CourseUserAction @@ -350,7 +350,7 @@ data CourseUserActionData = CourseUserSendMailData { downloadPersonalisedFilesForSheet :: SheetName , downloadPersonalisedFilesAnonMode :: PersonalisedSheetFilesDownloadAnonymous } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) makeCourseUserTable :: forall h p cols act act'. diff --git a/src/Handler/Exam/AddUser.hs b/src/Handler/Exam/AddUser.hs index 3eaedaee2..69c795384 100644 --- a/src/Handler/Exam/AddUser.hs +++ b/src/Handler/Exam/AddUser.hs @@ -29,7 +29,7 @@ data AddRecipientsResult = AddRecipientsResult , aurNoCourseRegistration , aurSuccess , aurSuccessCourse :: [UserEmail] - } deriving (Read, Show, Generic, Typeable) + } deriving (Read, Show, Generic) instance Semigroup AddRecipientsResult where (<>) = mappenddefault diff --git a/src/Handler/Exam/AutoOccurrence.hs b/src/Handler/Exam/AutoOccurrence.hs index 469d199d1..9146024f3 100644 --- a/src/Handler/Exam/AutoOccurrence.hs +++ b/src/Handler/Exam/AutoOccurrence.hs @@ -21,7 +21,7 @@ import Database.Persist.Sql (updateWhereCount) newtype ExamAutoOccurrenceCalculateForm = ExamAutoOccurrenceCalculateForm { eaofConfig :: ExamAutoOccurrenceConfig - } deriving stock (Eq, Ord, Read, Show, Generic, Typeable) + } deriving stock (Eq, Ord, Read, Show, Generic) deriving newtype (Default, FromJSON, ToJSON) makeLenses_ ''ExamAutoOccurrenceCalculateForm @@ -30,7 +30,7 @@ data ExamAutoOccurrenceAcceptForm = ExamAutoOccurrenceAcceptForm { eaofMapping :: ExamOccurrenceMapping ExamOccurrenceId , eaofAssignment :: Map UserId (Maybe ExamOccurrenceId) , eaofSuccess :: Bool - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) deriveJSON defaultOptions { fieldLabelModifier = camelToPathPiece' 1 @@ -41,7 +41,7 @@ data ExamAutoOccurrenceButton | BtnExamAutoOccurrenceAccept | BtnExamAutoOccurrenceNudgeUp | BtnExamAutoOccurrenceNudgeDown | BtnExamAutoOccurrenceIgnore | BtnExamAutoOccurrenceReconsider - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance Universe ExamAutoOccurrenceButton instance Finite ExamAutoOccurrenceButton diff --git a/src/Handler/Exam/CorrectorInvite.hs b/src/Handler/Exam/CorrectorInvite.hs index eaca235be..defd3850a 100644 --- a/src/Handler/Exam/CorrectorInvite.hs +++ b/src/Handler/Exam/CorrectorInvite.hs @@ -25,11 +25,11 @@ import qualified Data.HashSet as HashSet instance IsInvitableJunction ExamCorrector where type InvitationFor ExamCorrector = Exam data InvitableJunction ExamCorrector = JunctionExamCorrector - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data InvitationDBData ExamCorrector = InvDBDataExamCorrector - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data InvitationTokenData ExamCorrector = InvTokenDataExamCorrector - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) _InvitableJunction = iso (\ExamCorrector{..} -> (examCorrectorUser, examCorrectorExam, JunctionExamCorrector)) diff --git a/src/Handler/Exam/Edit.hs b/src/Handler/Exam/Edit.hs index 94b6ef30d..725236bd8 100644 --- a/src/Handler/Exam/Edit.hs +++ b/src/Handler/Exam/Edit.hs @@ -25,7 +25,7 @@ import qualified Database.Esqueleto.Utils as E data ExamEditException = ExamEditExamNameTaken ExamName | ExamEditWouldBreakSheetTypeReference - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Exception) embedRenderMessage ''UniWorX ''ExamEditException id diff --git a/src/Handler/Exam/Form.hs b/src/Handler/Exam/Form.hs index b5f333776..1a4b64bc1 100644 --- a/src/Handler/Exam/Form.hs +++ b/src/Handler/Exam/Form.hs @@ -68,7 +68,7 @@ data ExamOccurrenceForm = ExamOccurrenceForm , eofStart :: UTCTime , eofEnd :: Maybe UTCTime , eofDescription :: Maybe StoredMarkup - } deriving (Show, Eq, Generic, Typeable) + } deriving (Show, Eq, Generic) instance Ord ExamOccurrenceForm where compare = mconcat @@ -88,7 +88,7 @@ data ExamPartForm = ExamPartForm , epfName :: Maybe ExamPartName , epfMaxPoints :: Maybe Points , epfWeight :: Rational - } deriving (Read, Show, Eq, Generic, Typeable) + } deriving (Read, Show, Eq, Generic) instance Ord ExamPartForm where compare = mconcat diff --git a/src/Handler/Exam/Register.hs b/src/Handler/Exam/Register.hs index 7c6634d25..7dcf1678a 100644 --- a/src/Handler/Exam/Register.hs +++ b/src/Handler/Exam/Register.hs @@ -21,7 +21,7 @@ data ButtonExamRegister = BtnExamRegisterOccurrence | BtnExamSwitchOccurrence | BtnExamRegister | BtnExamDeregister - deriving (Enum, Bounded, Eq, Ord, Read, Show, Generic, Typeable) + deriving (Enum, Bounded, Eq, Ord, Read, Show, Generic) instance Universe ButtonExamRegister instance Finite ButtonExamRegister nullaryPathPiece ''ButtonExamRegister $ camelToPathPiece' 2 diff --git a/src/Handler/Exam/RegistrationInvite.hs b/src/Handler/Exam/RegistrationInvite.hs index a9cf6d209..8be44e461 100644 --- a/src/Handler/Exam/RegistrationInvite.hs +++ b/src/Handler/Exam/RegistrationInvite.hs @@ -31,14 +31,14 @@ instance IsInvitableJunction ExamRegistration where data InvitableJunction ExamRegistration = JunctionExamRegistration { jExamRegistrationOccurrence :: Maybe ExamOccurrenceId , jExamRegistrationTime :: UTCTime - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) data InvitationDBData ExamRegistration = InvDBDataExamRegistration { invDBExamRegistrationOccurrence :: Maybe ExamOccurrenceId , invDBExamRegistrationDeadline :: UTCTime , invDBExamRegistrationCourseRegister :: Bool - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) data InvitationTokenData ExamRegistration = InvTokenDataExamRegistration - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) _InvitableJunction = iso (\ExamRegistration{..} -> (examRegistrationUser, examRegistrationExam, JunctionExamRegistration examRegistrationOccurrence examRegistrationTime)) diff --git a/src/Handler/Exam/Users.hs b/src/Handler/Exam/Users.hs index 8e8ec3aa3..89d0bf40f 100644 --- a/src/Handler/Exam/Users.hs +++ b/src/Handler/Exam/Users.hs @@ -298,7 +298,7 @@ data ExamUserAction = ExamUserDeregister | ExamUserSetResult | ExamUserAcceptComputedResult | ExamUserResetToComputedResult - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe ExamUserAction instance Finite ExamUserAction @@ -328,7 +328,7 @@ data ExamUserCsvActionClass | ExamUserCsvOverrideResult | ExamUserCsvSetCourseNote | ExamUserCsvDeregister - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) embedRenderMessage ''UniWorX ''ExamUserCsvActionClass id data ExamUserCsvAction @@ -366,7 +366,7 @@ data ExamUserCsvAction { examUserCsvActUser :: UserId , examUserCsvActCourseNote :: Maybe StoredMarkup } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriveJSON defaultOptions { constructorTagModifier = over Text.packed $ Text.intercalate "-" . map Text.toLower . drop 3 . dropEnd 1 . splitCamel , fieldLabelModifier = camelToPathPiece' 4 @@ -379,7 +379,7 @@ data ExamUserCsvException | ExamUserCsvExceptionNoMatchingStudyFeatures | ExamUserCsvExceptionNoMatchingOccurrence | ExamUserCsvExceptionMismatchedGradingMode ExamGradingMode ExamGradingMode - deriving (Show, Generic, Typeable) + deriving (Show, Generic) instance Exception ExamUserCsvException diff --git a/src/Handler/ExamOffice/Exam.hs b/src/Handler/ExamOffice/Exam.hs index 0d72ed7f2..94b1f94da 100644 --- a/src/Handler/ExamOffice/Exam.hs +++ b/src/Handler/ExamOffice/Exam.hs @@ -30,7 +30,7 @@ import Handler.Utils.StudyFeatures data ButtonCloseExam = BtnCloseExam - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonCloseExam instance Finite ButtonCloseExam @@ -84,7 +84,7 @@ examCloseWidget dest eId = do data ButtonFinishExam = BtnFinishExam - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonFinishExam instance Finite ButtonFinishExam @@ -211,7 +211,7 @@ instance CsvColumnsExplained ExamUserTableCsv where ] data ExamUserAction = ExamUserMarkSynchronised - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe ExamUserAction instance Finite ExamUserAction @@ -224,7 +224,7 @@ data ExamUserCsvExportData = ExamUserCsvExportData { csvEUserMarkSynchronised :: Bool , csvEUserSetLabel :: Bool } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) -- | View a list of all users' grades that the current user has access to diff --git a/src/Handler/ExamOffice/Exams.hs b/src/Handler/ExamOffice/Exams.hs index 1670f4546..c45a77afa 100644 --- a/src/Handler/ExamOffice/Exams.hs +++ b/src/Handler/ExamOffice/Exams.hs @@ -25,7 +25,7 @@ import qualified Data.Set as Set data ExamAction = ExamSetLabel | ExamRemoveLabel - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''ExamAction $ camelToPathPiece' 1 @@ -35,7 +35,7 @@ data ExamActionData = ExamSetLabelData { easlNewLabel :: ExamOfficeLabelId } | ExamRemoveLabelData - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data ExamsTableFilterProj = ExamsTableFilterProj diff --git a/src/Handler/ExamOffice/Fields.hs b/src/Handler/ExamOffice/Fields.hs index 26c5aefcc..10175b986 100644 --- a/src/Handler/ExamOffice/Fields.hs +++ b/src/Handler/ExamOffice/Fields.hs @@ -20,7 +20,7 @@ data ExamOfficeFieldMode = EOFNotSubscribed | EOFSubscribed | EOFForced - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) embedRenderMessage ''UniWorX ''ExamOfficeFieldMode $ concat . set (ix 0) "ExamOfficeField" . splitCamel instance Universe ExamOfficeFieldMode instance Finite ExamOfficeFieldMode diff --git a/src/Handler/ExamOffice/Users.hs b/src/Handler/ExamOffice/Users.hs index ef5f9948e..a0f4c17e0 100644 --- a/src/Handler/ExamOffice/Users.hs +++ b/src/Handler/ExamOffice/Users.hs @@ -29,13 +29,13 @@ import qualified Data.HashSet as HashSet instance IsInvitableJunction ExamOfficeUser where type InvitationFor ExamOfficeUser = User data InvitableJunction ExamOfficeUser = JunctionExamOfficeUser - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data InvitationDBData ExamOfficeUser = InvDBDataExamOfficeUser - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data InvitationTokenData ExamOfficeUser = InvTokenDataExamOfficeUser { invTokenExamOfficeUserOffice :: CryptoUUIDUser } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) _InvitableJunction = iso (\ExamOfficeUser{..} -> (examOfficeUserUser, examOfficeUserOffice, JunctionExamOfficeUser)) diff --git a/src/Handler/ExternalExam/StaffInvite.hs b/src/Handler/ExternalExam/StaffInvite.hs index 3cd30eae1..4c7da8bb9 100644 --- a/src/Handler/ExternalExam/StaffInvite.hs +++ b/src/Handler/ExternalExam/StaffInvite.hs @@ -22,11 +22,11 @@ import qualified Data.HashSet as HashSet instance IsInvitableJunction ExternalExamStaff where type InvitationFor ExternalExamStaff = ExternalExam data InvitableJunction ExternalExamStaff = JunctionExternalExamStaff - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data InvitationDBData ExternalExamStaff = InvDBDataExternalExamStaff - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data InvitationTokenData ExternalExamStaff = InvTokenDataExternalExamStaff - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) _InvitableJunction = iso (\ExternalExamStaff{..} -> (externalExamStaffUser, externalExamStaffExam, JunctionExternalExamStaff)) diff --git a/src/Handler/LMS.hs b/src/Handler/LMS.hs index f1e37c3fa..9e3754e22 100644 --- a/src/Handler/LMS.hs +++ b/src/Handler/LMS.hs @@ -53,7 +53,7 @@ single = uncurry Map.singleton -- Button only needed here data ButtonManualLms = BtnLmsEnqueue | BtnLmsDequeue - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonManualLms instance Finite ButtonManualLms @@ -302,7 +302,7 @@ instance HasUser LmsTableData where data LmsTableAction = LmsActNotify | LmsActRenewNotify | LmsActRenewPin - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe LmsTableAction instance Finite LmsTableAction @@ -313,7 +313,7 @@ embedRenderMessage ''UniWorX ''LmsTableAction id data LmsTableActionData = LmsActNotifyData | LmsActRenewNotifyData | LmsActRenewPinData -- no longer used - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) isNotifyAct :: LmsTableActionData -> Bool isNotifyAct LmsActNotifyData = True diff --git a/src/Handler/LMS/Result.hs b/src/Handler/LMS/Result.hs index be5ac16f4..c9bec0c04 100644 --- a/src/Handler/LMS/Result.hs +++ b/src/Handler/LMS/Result.hs @@ -63,13 +63,13 @@ instance CsvColumnsExplained LmsResultTableCsv where single k v = singletonMap k [whamlet|_{v}|] data LmsResultCsvActionClass = LmsResultInsert | LmsResultUpdate - deriving (Eq, Ord, Read, Show, Generic, Typeable, Enum, Bounded) + deriving (Eq, Ord, Read, Show, Generic, Enum, Bounded) embedRenderMessage ''UniWorX ''LmsResultCsvActionClass id -- By coincidence the action type is identical to LmsResultTableCsv data LmsResultCsvAction = LmsResultInsertData { lmsResultInsertIdent :: LmsIdent, lmsResultInsertSuccess :: Day } | LmsResultUpdateData { lmsResultInsertIdent :: LmsIdent, lmsResultInsertSuccess :: Day } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriveJSON defaultOptions { constructorTagModifier = camelToPathPiece'' 2 1 -- LmsResultInsertData -> insert @@ -79,7 +79,7 @@ deriveJSON defaultOptions data LmsResultCsvException = LmsResultCsvExceptionDuplicatedKey -- TODO: this is not used anywhere?! - deriving (Show, Generic, Typeable) + deriving (Show, Generic) instance Exception LmsResultCsvException embedRenderMessage ''UniWorX ''LmsResultCsvException id diff --git a/src/Handler/LMS/Userlist.hs b/src/Handler/LMS/Userlist.hs index 0104f7eb0..5732e1cd3 100644 --- a/src/Handler/LMS/Userlist.hs +++ b/src/Handler/LMS/Userlist.hs @@ -62,12 +62,12 @@ instance CsvColumnsExplained LmsUserlistTableCsv where data LmsUserlistCsvActionClass = LmsUserlistInsert | LmsUserlistUpdate - deriving (Eq, Ord, Read, Show, Generic, Typeable, Enum, Bounded) + deriving (Eq, Ord, Read, Show, Generic, Enum, Bounded) embedRenderMessage ''UniWorX ''LmsUserlistCsvActionClass id data LmsUserlistCsvAction = LmsUserlistInsertData { lmsUserlistInsertIdent :: LmsIdent, lmsUserlistInsertFailed :: Bool } | LmsUserlistUpdateData { lmsUserlistInsertIdent :: LmsIdent, lmsUserlistInsertFailed :: Bool } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriveJSON defaultOptions { constructorTagModifier = camelToPathPiece'' 2 1 -- LmsUserlistInsertData -> insert @@ -78,7 +78,7 @@ deriveJSON defaultOptions data LmsUserlistCsvException = LmsUserlistCsvExceptionDuplicatedKey -- TODO: this is not used anywhere?! - deriving (Show, Generic, Typeable) + deriving (Show, Generic) instance Exception LmsUserlistCsvException embedRenderMessage ''UniWorX ''LmsUserlistCsvException id diff --git a/src/Handler/Participants.hs b/src/Handler/Participants.hs index 318130962..3e516613e 100644 --- a/src/Handler/Participants.hs +++ b/src/Handler/Participants.hs @@ -30,7 +30,7 @@ import qualified Data.Conduit.List as C data ParticipantEntry = ParticipantEntry { peCourse :: CourseName , peEmail :: UserEmail - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) instance ToNamedRecord ParticipantEntry where toNamedRecord ParticipantEntry{..} = Csv.namedRecord diff --git a/src/Handler/PrintCenter.hs b/src/Handler/PrintCenter.hs index eda7c05aa..29e7a89a2 100644 --- a/src/Handler/PrintCenter.hs +++ b/src/Handler/PrintCenter.hs @@ -56,7 +56,7 @@ data MetaPinRenewal = MetaPinRenewal , mppClosing :: Maybe Text , mppSupervisor:: Maybe Text } - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) -- TODO: just for testing, remove in production instance Default MetaPinRenewal where @@ -125,7 +125,7 @@ mprToMetaUser entUser@Entity{entityVal = u} mpr = do data PJTableAction = PJActAcknowledge - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe PJTableAction @@ -135,7 +135,7 @@ embedRenderMessage ''UniWorX ''PJTableAction id -- Not yet needed, since there is no additional data for now: data PJTableActionData = PJActAcknowledgeData - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) type PJTableExpr = ( E.SqlExpr (Entity PrintJob) `E.LeftOuterJoin` E.SqlExpr (Maybe (Entity User)) diff --git a/src/Handler/Profile.hs b/src/Handler/Profile.hs index ba13bc131..f5dfeb2da 100644 --- a/src/Handler/Profile.hs +++ b/src/Handler/Profile.hs @@ -84,7 +84,7 @@ data NotificationTriggerKind | NTKCorrector | NTKCourseLecturer | NTKFunctionary SchoolFunction - deriving (Eq, Ord, Generic, Typeable) + deriving (Eq, Ord, Generic) deriveFinite ''NotificationTriggerKind instance RenderMessage UniWorX NotificationTriggerKind where @@ -375,7 +375,7 @@ validateSettings User{..} = do data ButtonResetTokens = BtnResetTokens - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonResetTokens instance Finite ButtonResetTokens @@ -386,7 +386,7 @@ instance Button UniWorX ButtonResetTokens where btnClasses BtnResetTokens = [BCIsButton, BCDanger] data ProfileAnchor = ProfileSettings | ProfileResetTokens - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe ProfileAnchor instance Finite ProfileAnchor @@ -1053,7 +1053,7 @@ postUserNotificationR cID = do data ButtonSetDisplayEmail = BtnSetDisplayEmail - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance Universe ButtonSetDisplayEmail instance Finite ButtonSetDisplayEmail diff --git a/src/Handler/Sheet/CorrectorInvite.hs b/src/Handler/Sheet/CorrectorInvite.hs index 8c7452628..d3141c8b9 100644 --- a/src/Handler/Sheet/CorrectorInvite.hs +++ b/src/Handler/Sheet/CorrectorInvite.hs @@ -25,13 +25,13 @@ instance IsInvitableJunction SheetCorrector where data InvitableJunction SheetCorrector = JunctionSheetCorrector { jSheetCorrectorLoad :: Load , jSheetCorrectorState :: CorrectorState - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) data InvitationDBData SheetCorrector = InvDBDataSheetCorrector { invDBSheetCorrectorLoad :: Load , invDBSheetCorrectorState :: CorrectorState - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) data InvitationTokenData SheetCorrector = InvTokenDataSheetCorrector - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) _InvitableJunction = iso (\SheetCorrector{..} -> (sheetCorrectorUser, sheetCorrectorSheet, JunctionSheetCorrector sheetCorrectorLoad sheetCorrectorState)) diff --git a/src/Handler/Sheet/PersonalisedFiles.hs b/src/Handler/Sheet/PersonalisedFiles.hs index 3457c51cb..2d521aca4 100644 --- a/src/Handler/Sheet/PersonalisedFiles.hs +++ b/src/Handler/Sheet/PersonalisedFiles.hs @@ -63,21 +63,21 @@ data PersonalisedSheetFileUnresolved a = PSFUnresolvedDirectory a | PSFUnresolvedCollatable Text a | PSFUnresolved a - deriving (Eq, Ord, Read, Show, Functor, Foldable, Traversable, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Functor, Foldable, Traversable, Generic) makePrisms ''PersonalisedSheetFileUnresolved data PersonalisedSheetFilesRestriction = PSFRExamRegistered { psfrExam :: ExamId } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) makeLenses_ ''PersonalisedSheetFilesRestriction data PersonalisedSheetFilesForm = PersonalisedSheetFilesForm { psffAnonymous :: PersonalisedSheetFilesDownloadAnonymous , psffRestrictions :: Set PersonalisedSheetFilesRestriction - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) embedRenderMessage ''UniWorX ''PersonalisedSheetFilesDownloadAnonymous id @@ -312,7 +312,7 @@ data PersonalisedSheetFilesKeyException | FallbackPersonalisedSheetFilesKeysExhausted | PersonalisedSheetFilesKeyInsufficientContext | PersonalisedSheetFilesKeyNotFound - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Exception) newPersonalisedFilesKey :: forall m. diff --git a/src/Handler/Sheet/PersonalisedFiles/Meta.hs b/src/Handler/Sheet/PersonalisedFiles/Meta.hs index 1bdc3dcfe..ee27aaa36 100644 --- a/src/Handler/Sheet/PersonalisedFiles/Meta.hs +++ b/src/Handler/Sheet/PersonalisedFiles/Meta.hs @@ -32,7 +32,7 @@ data PrettifyState | PrettifyFlowSequence PrettifyState | PrettifyBlockSequence PrettifyState | PrettifySeed | PrettifySeedDone - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) diff --git a/src/Handler/Sheet/PersonalisedFiles/Types.hs b/src/Handler/Sheet/PersonalisedFiles/Types.hs index 170a0a202..d6b50fe85 100644 --- a/src/Handler/Sheet/PersonalisedFiles/Types.hs +++ b/src/Handler/Sheet/PersonalisedFiles/Types.hs @@ -39,7 +39,7 @@ data PersonalisedSheetFilesDownloadAnonymous | PersonalisedSheetFilesDownloadSurnames | PersonalisedSheetFilesDownloadMatriculations | PersonalisedSheetFilesDownloadGroups - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''PersonalisedSheetFilesDownloadAnonymous $ camelToPathPiece' 4 @@ -47,7 +47,7 @@ makePrisms ''PersonalisedSheetFilesDownloadAnonymous newtype PersonalisedSheetFilesSeed = PersonalisedSheetFilesSeed (Digest (SHAKE256 144)) - deriving (Eq, Ord, Read, Show, Lift, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Lift, Generic) deriving newtype ( PersistField , PathPiece, ToHttpApiData, FromHttpApiData, ToJSON, FromJSON , Hashable, NFData @@ -55,8 +55,7 @@ newtype PersonalisedSheetFilesSeed = PersonalisedSheetFilesSeed (Digest (SHAKE25 , Binary ) -newtype PersonalisedSheetFilesSeedKey = PersonalisedSheetFilesSeedKey { psfskKeyMaterial :: ByteString } - deriving (Typeable) +newtype PersonalisedSheetFilesSeedKey = PersonalisedSheetFilesSeedKey { psfskKeyMaterial :: ByteString } deriving newtype (ByteArrayAccess) -- | Does not actually show any key material @@ -94,4 +93,4 @@ mkPersonalisedSheetFilesSeed k u = PersonalisedSheetFilesSeed . Crypto.kmacGetDi data PersonalisedSheetFilesKeySet = PersonalisedSheetFilesKeySet { psfksCryptoID :: CryptoIDKey , psfksSeed :: Maybe PersonalisedSheetFilesSeedKey - } deriving (Show, Typeable) + } deriving (Show) diff --git a/src/Handler/Sheet/Pseudonym.hs b/src/Handler/Sheet/Pseudonym.hs index 41eff99b3..e24ef9a34 100644 --- a/src/Handler/Sheet/Pseudonym.hs +++ b/src/Handler/Sheet/Pseudonym.hs @@ -13,7 +13,7 @@ import Handler.Utils data ButtonGeneratePseudonym = BtnGenerate - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonGeneratePseudonym instance Finite ButtonGeneratePseudonym diff --git a/src/Handler/Submission/Assign.hs b/src/Handler/Submission/Assign.hs index f2d59f56d..95dc1b574 100644 --- a/src/Handler/Submission/Assign.hs +++ b/src/Handler/Submission/Assign.hs @@ -288,7 +288,7 @@ assignHandler tid ssh csh cid assignSids = do data ButtonSubmissionsAssign = BtnSubmissionsAssign SheetName | BtnSubmissionsAssignAll - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) derivePathPiece ''ButtonSubmissionsAssign (camelToPathPiece' 2) "--" instance RenderMessage UniWorX ButtonSubmissionsAssign where diff --git a/src/Handler/Submission/List.hs b/src/Handler/Submission/List.hs index 787d04574..72c17f0e5 100644 --- a/src/Handler/Submission/List.hs +++ b/src/Handler/Submission/List.hs @@ -269,7 +269,7 @@ data CorrectionTableCsvQualification = CorrectionTableCsvNoQualification | CorrectionTableCsvQualifySheet | CorrectionTableCsvQualifyCourse - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) correctionTableCsvHeader :: Bool -- ^ @showCorrector@ @@ -309,7 +309,7 @@ data CorrectionTableCsvSettings = forall filename sheetName. newtype CorrectionTableCsvExportData = CorrectionTableCsvExportData { csvCorrectionSingleSubmittors :: Bool - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) instance Default CorrectionTableCsvExportData where def = CorrectionTableCsvExportData False diff --git a/src/Handler/Submission/SubmissionUserInvite.hs b/src/Handler/Submission/SubmissionUserInvite.hs index 566e1f8ae..134185c97 100644 --- a/src/Handler/Submission/SubmissionUserInvite.hs +++ b/src/Handler/Submission/SubmissionUserInvite.hs @@ -24,11 +24,11 @@ import qualified Data.HashSet as HashSet instance IsInvitableJunction SubmissionUser where type InvitationFor SubmissionUser = Submission data InvitableJunction SubmissionUser = JunctionSubmissionUser - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data InvitationDBData SubmissionUser = InvDBDataSubmissionUser - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data InvitationTokenData SubmissionUser = InvTokenDataSubmissionUser - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) _InvitableJunction = iso (\SubmissionUser{..} -> (submissionUserUser, submissionUserSubmission, JunctionSubmissionUser)) diff --git a/src/Handler/Submission/Upload.hs b/src/Handler/Submission/Upload.hs index f8a4cfc87..d94c5b547 100644 --- a/src/Handler/Submission/Upload.hs +++ b/src/Handler/Submission/Upload.hs @@ -24,7 +24,7 @@ data SubmissionDoneMode = SubmissionDoneNever | SubmissionDoneByFile | SubmissionDoneAlways - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''SubmissionDoneMode $ camelToPathPiece' 2 embedRenderMessage ''UniWorX ''SubmissionDoneMode id diff --git a/src/Handler/SystemMessage.hs b/src/Handler/SystemMessage.hs index 4557b101c..05b327e00 100644 --- a/src/Handler/SystemMessage.hs +++ b/src/Handler/SystemMessage.hs @@ -353,7 +353,7 @@ postMessageListR = do data ButtonSystemMessageHide = BtnSystemMessageHide | BtnSystemMessageUnhide - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''ButtonSystemMessageHide $ camelToPathPiece' 3 embedRenderMessage ''UniWorX ''ButtonSystemMessageHide id diff --git a/src/Handler/Tutorial/TutorInvite.hs b/src/Handler/Tutorial/TutorInvite.hs index 6993845c8..db12b0599 100644 --- a/src/Handler/Tutorial/TutorInvite.hs +++ b/src/Handler/Tutorial/TutorInvite.hs @@ -23,11 +23,11 @@ import qualified Data.HashSet as HashSet instance IsInvitableJunction Tutor where type InvitationFor Tutor = Tutorial data InvitableJunction Tutor = JunctionTutor - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data InvitationDBData Tutor = InvDBDataTutor - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data InvitationTokenData Tutor = InvTokenDataTutor - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) _InvitableJunction = iso (\Tutor{..} -> (tutorUser, tutorTutorial, JunctionTutor)) diff --git a/src/Handler/Tutorial/Users.hs b/src/Handler/Tutorial/Users.hs index 90af4f4f7..325a075a1 100644 --- a/src/Handler/Tutorial/Users.hs +++ b/src/Handler/Tutorial/Users.hs @@ -29,7 +29,7 @@ data TutorialUserAction = TutorialUserGrantQualification | TutorialUserSendMail | TutorialUserDeregister - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe TutorialUserAction instance Finite TutorialUserAction @@ -43,7 +43,7 @@ data TutorialUserActionData } | TutorialUserSendMailData | TutorialUserDeregisterData{} - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) getTUsersR, postTUsersR :: TermId -> SchoolId -> CourseShorthand -> TutorialName -> Handler Html diff --git a/src/Handler/Upload.hs b/src/Handler/Upload.hs index 8c92eebfc..260e428a3 100644 --- a/src/Handler/Upload.hs +++ b/src/Handler/Upload.hs @@ -11,7 +11,7 @@ import Import data UploadResponse = UploadResponseNoToken - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriveJSON defaultOptions { tagSingleConstructors = True diff --git a/src/Handler/Users.hs b/src/Handler/Users.hs index 0de5653cf..b2cfbd16c 100644 --- a/src/Handler/Users.hs +++ b/src/Handler/Users.hs @@ -56,7 +56,7 @@ hijackUserForm csrf = do -- hasUser = _entityVal data UserAction = UserLdapSync | UserAddSupervisor | UserSetSupervisor | UserRemoveSupervisor - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''UserAction $ camelToPathPiece' 1 @@ -67,7 +67,7 @@ data UserActionData = UserLdapSyncData | UserAddSupervisorData { getActionSupervisors :: Set Text, getActionRerouteNotifications :: Bool } | UserSetSupervisorData { getActionSupervisors :: Set Text, getActionRerouteNotifications :: Bool } | UserRemoveSupervisorData - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) isNotSetSupervisor :: UserActionData -> Bool isNotSetSupervisor UserSetSupervisorData{} = False @@ -80,7 +80,7 @@ isActionSupervisor _ = False data AllUsersAction = AllUsersLdapSync - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''AllUsersAction $ camelToPathPiece' 1 @@ -396,7 +396,7 @@ postAdminHijackUserR cID = do data ButtonAuthMode = BtnAuthLDAP | BtnAuthPWHash | BtnPasswordReset - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance Universe ButtonAuthMode instance Finite ButtonAuthMode @@ -408,7 +408,7 @@ instance Button UniWorX ButtonAuthMode where data UserAssimilateButton = BtnUserAssimilate - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite) instance Button UniWorX UserAssimilateButton where @@ -716,16 +716,16 @@ instance IsInvitableJunction UserFunction where data InvitableJunction UserFunction = JunctionUserFunction { jFunction :: SchoolFunction } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data InvitationDBData UserFunction = InvDBDataUserFunction { invDBUserFunctionDeadline :: UTCTime } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data InvitationTokenData UserFunction = InvTokenDataUserFunction { invTokenUserFunctionSchool :: SchoolShorthand , invTokenUserFunctionFunction :: SchoolFunction } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) _InvitableJunction = iso (\UserFunction{..} -> (userFunctionUser, userFunctionSchool, JunctionUserFunction userFunctionFunction)) diff --git a/src/Handler/Utils/Avs.hs b/src/Handler/Utils/Avs.hs index 6808ce6e7..583981100 100644 --- a/src/Handler/Utils/Avs.hs +++ b/src/Handler/Utils/Avs.hs @@ -55,7 +55,7 @@ data AvsException | AvsPersonSearchEmpty -- AvsPersonSearch returned empty result | AvsPersonSearchAmbiguous -- AvsPersonSearch returned more than one result | AvsSetLicencesFailed Text -- AvsSetLicence total failure - deriving (Show, Eq, Ord, Generic, Typeable) + deriving (Show, Eq, Ord, Generic) instance Exception AvsException {- diff --git a/src/Handler/Utils/Communication.hs b/src/Handler/Utils/Communication.hs index 4423d65a1..93577f8ed 100644 --- a/src/Handler/Utils/Communication.hs +++ b/src/Handler/Utils/Communication.hs @@ -30,7 +30,7 @@ data RecipientGroup = RGCourseParticipants | RGCourseLecturers | RGCourseCorrect | RGTutorialParticipants CryptoUUIDTutorial | RGExamRegistered CryptoUUIDExam | RGSheetSubmittor CryptoUUIDSheet - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance LowerBounded RecipientGroup where minBound' = RGCourseParticipants @@ -42,7 +42,7 @@ pathPieceJSON ''RecipientGroup data RecipientCategory = RecipientGroup RecipientGroup | RecipientCustom - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance LowerBounded RecipientCategory where minBound' = RecipientGroup minBound' @@ -60,7 +60,7 @@ pathPieceJSONKey ''RecipientCategory data CommunicationButton = BtnCommunicationSend | BtnCommunicationTest - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''CommunicationButton $ camelToPathPiece' 2 diff --git a/src/Handler/Utils/Download.hs b/src/Handler/Utils/Download.hs index 444b8428b..c80957efc 100644 --- a/src/Handler/Utils/Download.hs +++ b/src/Handler/Utils/Download.hs @@ -32,7 +32,7 @@ import qualified Network.Wai as W data DownloadTokenRestriction = DownloadRestrictSingle { downloadRestrictReference :: FileContentReference } | DownloadRestrictMultiple - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriveJSON defaultOptions { constructorTagModifier = camelToPathPiece' 2 , fieldLabelModifier = camelToPathPiece' 2 diff --git a/src/Handler/Utils/Exam.hs b/src/Handler/Utils/Exam.hs index 3d8ce3078..cd834709b 100644 --- a/src/Handler/Utils/Exam.hs +++ b/src/Handler/Utils/Exam.hs @@ -226,7 +226,7 @@ examBonusGrade exam@Exam{..} bonusInp = (mBonus, ) . examGrade exam mBonus data ExamAutoOccurrenceIgnoreRooms = ExamAutoOccurrenceIgnoreRooms {eaoirIgnored :: Set ExamOccurrenceId, eaoirSorted :: Bool} - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance Default ExamAutoOccurrenceIgnoreRooms where def = ExamAutoOccurrenceIgnoreRooms Set.empty False @@ -242,7 +242,7 @@ data ExamAutoOccurrenceConfig = ExamAutoOccurrenceConfig , eaocFinenessCost :: Rational -- ^ Cost factor incentivising shorter common prefixes on breaks between rooms , eaocNudge :: Map ExamOccurrenceId Integer , eaocNudgeSize :: Rational - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) instance Default ExamAutoOccurrenceConfig where def = ExamAutoOccurrenceConfig @@ -263,7 +263,7 @@ data ExamAutoOccurrenceException | ExamAutoOccurrenceExceptionNotEnoughSpace | ExamAutoOccurrenceExceptionNoUsers | ExamAutoOccurrenceExceptionRoomTooSmall - deriving (Show, Eq, Generic, Typeable) + deriving (Show, Eq, Generic) instance Exception ExamAutoOccurrenceException diff --git a/src/Handler/Utils/ExternalExam/Users.hs b/src/Handler/Utils/ExternalExam/Users.hs index 0c6fe0b79..b52645637 100644 --- a/src/Handler/Utils/ExternalExam/Users.hs +++ b/src/Handler/Utils/ExternalExam/Users.hs @@ -37,7 +37,7 @@ import Handler.Utils.StudyFeatures data ExternalExamUserMode = EEUMUsers | EEUMGrades - deriving (Eq, Ord, Read, Show, Bounded, Enum, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Bounded, Enum, Generic) instance Universe ExternalExamUserMode instance Finite ExternalExamUserMode nullaryPathPiece ''ExternalExamUserMode $ camelToPathPiece' 1 @@ -127,7 +127,7 @@ data ExternalExamUserAction | ExternalExamUserEditOccurrence | ExternalExamUserEditResult | ExternalExamUserDelete - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe ExternalExamUserAction instance Finite ExternalExamUserAction nullaryPathPiece ''ExternalExamUserAction $ camelToPathPiece' 3 @@ -142,13 +142,13 @@ data ExternalExamUserActionData data ExternalExamUserCsvExportDataGrades = ExternalExamUserCsvExportDataGrades { csvEEUserMarkSynchronised :: Bool , csvEEUserSetLabel :: Bool - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) data ExamUserCsvException = ExamUserCsvExceptionNoMatchingUser | ExamUserCsvExceptionNoOccurrenceTime - deriving (Show, Generic, Typeable) + deriving (Show, Generic) instance Exception ExamUserCsvException @@ -160,7 +160,7 @@ data ExternalExamUserCsvActionClass | ExternalExamUserCsvDeregister | ExternalExamUserCsvSetTime | ExternalExamUserCsvSetResult - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) embedRenderMessage ''UniWorX ''ExternalExamUserCsvActionClass id data ExternalExamUserCsvAction @@ -180,7 +180,7 @@ data ExternalExamUserCsvAction | ExternalExamUserCsvDeregisterData { externalExamUserCsvActRegistration :: ExternalExamResultId } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriveJSON defaultOptions { constructorTagModifier = over Text.packed $ Text.intercalate "-" . map Text.toLower . drop 4 . dropEnd 1 . splitCamel , fieldLabelModifier = camelToPathPiece' 5 diff --git a/src/Handler/Utils/Files.hs b/src/Handler/Utils/Files.hs index d73af181c..07b777643 100644 --- a/src/Handler/Utils/Files.hs +++ b/src/Handler/Utils/Files.hs @@ -38,7 +38,7 @@ import qualified Data.ByteString as ByteString data SourceFilesException = SourceFilesMismatchedHashes | SourceFilesContentUnavailable - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Exception) makePrisms ''SourceFilesException diff --git a/src/Handler/Utils/Form.hs b/src/Handler/Utils/Form.hs index af5726e71..a4d6fa709 100644 --- a/src/Handler/Utils/Form.hs +++ b/src/Handler/Utils/Form.hs @@ -88,7 +88,7 @@ import qualified Data.List.NonEmpty as NonEmpty data ButtonDelete = BtnDelete - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonDelete instance Finite ButtonDelete @@ -99,7 +99,7 @@ instance Button UniWorX ButtonDelete where btnClasses BtnDelete = [BCIsButton, BCDanger] data ButtonSave = BtnSave - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonSave instance Finite ButtonSave @@ -116,7 +116,7 @@ instance Button UniWorX ButtonSave where data ButtonHandIn = BtnHandIn - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonHandIn instance Finite ButtonHandIn @@ -128,7 +128,7 @@ instance Button UniWorX ButtonHandIn where data ButtonConfirm = BtnConfirm - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonConfirm instance Finite ButtonConfirm @@ -144,7 +144,7 @@ instance Button UniWorX ButtonConfirm where data ButtonRegister = BtnRegister | BtnDeregister - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonRegister instance Finite ButtonRegister @@ -156,7 +156,7 @@ instance Button UniWorX ButtonRegister where btnClasses BtnDeregister = [BCIsButton, BCDanger] data ButtonHijack = BtnHijack - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonHijack instance Finite ButtonHijack @@ -167,7 +167,7 @@ instance Button UniWorX ButtonHijack where btnClasses BtnHijack = [BCIsButton, BCDefault] data ButtonSubmitDelete = BtnSubmit' | BtnDelete' - deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic, Typeable) + deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonSubmitDelete instance Finite ButtonSubmitDelete @@ -769,7 +769,7 @@ submissionModeForm prev = explainedMultiActionA actions opts (fslI MsgUtilSheetS data ExamBonusRule' = ExamBonusManual' | ExamBonusPoints' - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance Universe ExamBonusRule' instance Finite ExamBonusRule' @@ -804,7 +804,7 @@ data ExamOccurrenceRule' = ExamRoomManual' | ExamRoomSurname' | ExamRoomMatriculation' | ExamRoomRandom' - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance Universe ExamOccurrenceRule' instance Finite ExamOccurrenceRule' @@ -830,7 +830,7 @@ examOccurrenceRuleForm = fmap reverseClassify . areq (selectField optionsFinite) ExamRoomRandom' -> ExamRoomRandom data ExamGradingRule' = ExamGradingKey' - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance Universe ExamGradingRule' instance Finite ExamGradingRule' @@ -1423,7 +1423,7 @@ data JsonFieldKind = JsonFieldNormal | JsonFieldLarge | JsonFieldHidden - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite) jsonField :: ( ToJSON a, FromJSON a @@ -2044,7 +2044,7 @@ examField optMsg cId = hoistField liftHandler . selectField' optMsg . fmap (fmap data CsvFormatOptions' = CsvFormatOptionsPreset' CsvPreset | CsvFormatOptionsCustom' - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriveFinite ''CsvFormatOptions' instance PathPiece CsvFormatOptions' where toPathPiece = \case @@ -2200,7 +2200,7 @@ labeledCheckBoxView label theId name attrs val isReq = $(widgetFile "widgets/fie newtype CourseParticipantStateIsActive = CourseParticipantStateIsActive { getCourseParticipantStateIsActive :: Bool } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving newtype (Universe, Finite) embedRenderMessageVariant ''UniWorX ''CourseParticipantStateIsActive $ \case @@ -2224,7 +2224,7 @@ data CustomPresetFormOption p = CPFONone | CPFOPreset p | CPFOCustom - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriveFinite ''CustomPresetFormOption derivePathPiece ''CustomPresetFormOption (camelToPathPiece' 1) "--" @@ -2362,12 +2362,12 @@ roomReferenceForm' noneOpt fs mPrev = multiActionAOpts opts opts' fs $ fmap clas newtype I18nLangs = I18nLangs { unI18nLangs :: Set I18nLang } deriving newtype (ToJSON, FromJSON, MonoFoldable, Semigroup, Monoid, Lattice, BoundedJoinSemiLattice) - deriving (Eq, Ord, Generic, Typeable, Read, Show) + deriving (Eq, Ord, Generic, Read, Show) type instance Element I18nLangs = I18nLang newtype I18nLang = I18nLang { unI18nLang :: Lang } deriving newtype (PathPiece, ToJSON, FromJSON, ToJSONKey, FromJSONKey) - deriving (Eq, Generic, Typeable, Read, Show) + deriving (Eq, Generic, Read, Show) instance Ord I18nLang where compare = mconcat diff --git a/src/Handler/Utils/Form/MassInput.hs b/src/Handler/Utils/Form/MassInput.hs index d0b9f34d9..7e5d5e7dd 100644 --- a/src/Handler/Utils/Form/MassInput.hs +++ b/src/Handler/Utils/Form/MassInput.hs @@ -50,7 +50,7 @@ $(mapM tupleBoxCoord [2..4]) newtype ListLength = ListLength { unListLength :: Natural } deriving newtype (Num, Integral, Real, Enum, PathPiece) - deriving (Eq, Ord, Generic, Typeable, Read, Show) + deriving (Eq, Ord, Generic, Read, Show) makeWrapped ''ListLength @@ -61,7 +61,7 @@ instance BoundedJoinSemiLattice ListLength where newtype ListPosition = ListPosition { unListPosition :: Natural } deriving newtype (Num, Integral, Real, Enum, PathPiece, ToJSON, FromJSON, ToJSONKey, FromJSONKey) - deriving (Eq, Ord, Generic, Typeable, Read, Show) + deriving (Eq, Ord, Generic, Read, Show) makeWrapped ''ListPosition @@ -88,7 +88,7 @@ instance Liveliness ListLength where newtype EnumLiveliness enum = EnumLiveliness { unEnumLiveliness :: IntSet } - deriving (Eq, Ord, Generic, Typeable, Read, Show) + deriving (Eq, Ord, Generic, Read, Show) deriving newtype (Lattice, BoundedJoinSemiLattice) makeWrapped ''EnumLiveliness @@ -96,7 +96,7 @@ makeWrapped ''EnumLiveliness newtype EnumPosition enum = EnumPosition { unEnumPosition :: enum } deriving newtype (Enum, Bounded, PathPiece, ToJSON, FromJSON, ToJSONKey, FromJSONKey) - deriving (Eq, Ord, Generic, Typeable, Read, Show) + deriving (Eq, Ord, Generic, Read, Show) makeWrapped ''EnumPosition @@ -118,13 +118,13 @@ class Ord coord => LowerBounded coord where minBound' :: coord newtype BoundedLiveliness coord = BoundedLiveliness { unBoundedLiveliness :: Set coord } - deriving (Eq, Ord, Generic, Typeable, Read, Show) + deriving (Eq, Ord, Generic, Read, Show) deriving newtype (Lattice, BoundedJoinSemiLattice, BoundedMeetSemiLattice) makeWrapped ''BoundedLiveliness newtype BoundedPosition coord = BoundedPosition { unBoundedPosition :: coord } deriving newtype (Enum, Bounded, PathPiece, ToJSON, FromJSON, ToJSONKey, FromJSONKey, LowerBounded) - deriving (Eq, Ord, Generic, Typeable, Read, Show) + deriving (Eq, Ord, Generic, Read, Show) makeWrapped ''BoundedPosition instance (LowerBounded coord, PathPiece coord, ToJSON coord, FromJSON coord, ToJSONKey coord, FromJSONKey coord, Ord coord) => IsBoxCoord (BoundedPosition coord) where @@ -137,7 +137,7 @@ instance (LowerBounded coord, PathPiece coord, ToJSON coord, FromJSON coord, ToJ newtype MapLiveliness l1 l2 = MapLiveliness { unMapLiveliness :: Map (BoxCoord l1) l2 } - deriving (Generic, Typeable) + deriving (Generic) makeWrapped ''MapLiveliness @@ -169,7 +169,7 @@ miDeleteList dat pos data ButtonMassInput coord = MassInputAddDimension Natural coord | MassInputDeleteCell coord - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance PathPiece coord => PathPiece (ButtonMassInput coord) where toPathPiece = \case @@ -204,7 +204,7 @@ data MassInputFieldName coord | MassInputAddButton { miName :: Text, miCoord :: coord } | MassInputDeleteButton { miName :: Text, miCoord :: coord } | MassInputCell { miName :: Text, miCoord :: coord, miCellField :: Text } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance IsBoxCoord coord => PathPiece (MassInputFieldName coord) where toPathPiece = \case @@ -246,7 +246,7 @@ instance IsBoxCoord coord => PathPiece (MassInputFieldName coord) where ] data MassInputException = MassInputInvalidShape - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance Exception MassInputException diff --git a/src/Handler/Utils/Form/Occurrences.hs b/src/Handler/Utils/Form/Occurrences.hs index e5f5828f7..13d413c80 100644 --- a/src/Handler/Utils/Form/Occurrences.hs +++ b/src/Handler/Utils/Form/Occurrences.hs @@ -16,7 +16,7 @@ import qualified Data.Map as Map data OccurrenceScheduleKind = ScheduleKindWeekly - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe OccurrenceScheduleKind instance Finite OccurrenceScheduleKind @@ -26,7 +26,7 @@ embedRenderMessage ''UniWorX ''OccurrenceScheduleKind id data OccurrenceExceptionKind = ExceptionKindOccur | ExceptionKindNoOccur - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe OccurrenceExceptionKind instance Finite OccurrenceExceptionKind diff --git a/src/Handler/Utils/Invitations.hs b/src/Handler/Utils/Invitations.hs index 4ff819ca2..df77997e7 100644 --- a/src/Handler/Utils/Invitations.hs +++ b/src/Handler/Utils/Invitations.hs @@ -147,7 +147,7 @@ data InvitationTokenConfig = InvitationTokenConfig , itAddAuth :: Maybe AuthDNF , itExpiresAt :: Maybe (Maybe UTCTime) , itStartsAt :: Maybe UTCTime - } deriving (Generic, Typeable) + } deriving (Generic) data InvitationTokenRestriction junction = IsInvitableJunction junction => InvitationTokenRestriction { itEmail :: UserEmail @@ -342,7 +342,7 @@ deleteInvitation invitationFor = deleteInvitationsF @junction invitationFor . Id data ButtonInvite = BtnInviteAccept | BtnInviteDecline - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance Universe ButtonInvite instance Finite ButtonInvite diff --git a/src/Handler/Utils/Memcached.hs b/src/Handler/Utils/Memcached.hs index 568272c9a..706a56024 100644 --- a/src/Handler/Utils/Memcached.hs +++ b/src/Handler/Utils/Memcached.hs @@ -100,7 +100,7 @@ data MemcachedValue = MemcachedValue { mNonce :: AEAD.Nonce , mExpiry :: Maybe POSIXTime , mCiphertext :: ByteString - } deriving (Generic, Typeable) + } deriving (Generic) putExpiry :: Maybe POSIXTime -> Binary.Put putExpiry mExp = Binary.put $ fromMaybe 0 expEnc @@ -151,7 +151,7 @@ memcachedAvailable = getsYesod $ is _Just . appMemcached data MemcachedException = MemcachedException Memcached.MemcachedException | MemcachedInvalidExpiry Expiry - deriving (Show, Typeable) + deriving (Show) deriving anyclass (Exception) @@ -281,7 +281,7 @@ memcachedByInvalidate (Binary.encode -> k) _ = arc >> memcache data MemcachedLocalInvalidateMsg = MemcachedLocalInvalidateMsg { mLocalInvalidateType :: Fingerprint , mLocalInvalidateKey :: Lazy.ByteString - } deriving (Eq, Ord, Show, Typeable) + } deriving (Eq, Ord, Show) instance Binary MemcachedLocalInvalidateMsg where get = Binary.label "MemcachedLocalInvalidateMsg" $ do @@ -318,8 +318,7 @@ manageMemcachedLocalInvalidations localARC iQueue = PostgresqlChannelManager } -newtype MemcachedUnkeyed a = MemcachedUnkeyed { unMemcachedUnkeyed :: a } - deriving (Typeable) +newtype MemcachedUnkeyed a = MemcachedUnkeyed { unMemcachedUnkeyed :: a } deriving newtype (Eq, Ord, Show, Binary) instance NFData a => NFData (MemcachedUnkeyed a) where rnf = rnf . unMemcachedUnkeyed @@ -370,8 +369,7 @@ memcachedBy :: forall a m k. memcachedBy mExp k = memcachedWith (memcachedByGet k, \x -> x <$ memcachedBySet mExp k x) -newtype MemcachedUnkeyedLoc a = MemcachedUnkeyedLoc { unMemcachedUnkeyedLoc :: a } - deriving (Typeable) +newtype MemcachedUnkeyedLoc a = MemcachedUnkeyedLoc { unMemcachedUnkeyedLoc :: a } deriving newtype (Eq, Ord, Show, Binary) instance NFData a => NFData (MemcachedUnkeyedLoc a) where rnf MemcachedUnkeyedLoc{..} = rnf unMemcachedUnkeyedLoc @@ -381,8 +379,7 @@ memcachedHere = do loc <- location [e| \mExp -> fmap unMemcachedUnkeyedLoc . memcachedBy mExp loc . fmap MemcachedUnkeyedLoc |] -newtype MemcachedKeyedLoc a = MemcachedKeyedLoc { unMemcachedKeyedLoc :: a } - deriving (Typeable) +newtype MemcachedKeyedLoc a = MemcachedKeyedLoc { unMemcachedKeyedLoc :: a } deriving newtype (Eq, Ord, Show, Binary) instance NFData a => NFData (MemcachedKeyedLoc a) where rnf MemcachedKeyedLoc{..} = rnf unMemcachedKeyedLoc @@ -597,7 +594,7 @@ memcacheAuthHereMax = do data AsyncTimeoutException = AsyncTimeoutReturnTypeDoesNotMatchComputationKey - deriving (Show, Typeable) + deriving (Show) deriving anyclass (Exception) data DynamicAsync = forall a. DynamicAsync !(TypeRep a) !(Async a) diff --git a/src/Handler/Utils/Pandoc.hs b/src/Handler/Utils/Pandoc.hs index 5643dd30e..797bcf625 100644 --- a/src/Handler/Utils/Pandoc.hs +++ b/src/Handler/Utils/Pandoc.hs @@ -27,7 +27,7 @@ import Text.HTML.SanitizeXSS (sanitizeBalance) data HtmlFieldKind = HtmlFieldNormal | HtmlFieldSmall - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe HtmlFieldKind instance Finite HtmlFieldKind diff --git a/src/Handler/Utils/Rating/Format.hs b/src/Handler/Utils/Rating/Format.hs index 2eafd3527..e3817d895 100644 --- a/src/Handler/Utils/Rating/Format.hs +++ b/src/Handler/Utils/Rating/Format.hs @@ -51,7 +51,7 @@ data PrettifyState | PrettifyRating | PrettifyRatingDone | PrettifyComment - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) formatRating :: MsgRendererS UniWorX -> DateTimeFormatter -> CryptoFileNameSubmission -> Rating -> Lazy.ByteString diff --git a/src/Handler/Utils/Sheet.hs b/src/Handler/Utils/Sheet.hs index 6c37a8e77..6758ad466 100644 --- a/src/Handler/Utils/Sheet.hs +++ b/src/Handler/Utils/Sheet.hs @@ -62,7 +62,7 @@ fetchSheetIdCourseId tid ssh cid shn = bimap E.unValue E.unValue <$> fetchSheetA data ResolveSheetTypeException = ResolveSheetTypeExamPartUnavailable SqlBackendKey | ResolveSheetTypeForeignExam - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Exception) resolveSheetType :: ( MonadThrow m diff --git a/src/Handler/Utils/StudyFeatures.hs b/src/Handler/Utils/StudyFeatures.hs index dce62eea0..1bc5baba8 100644 --- a/src/Handler/Utils/StudyFeatures.hs +++ b/src/Handler/Utils/StudyFeatures.hs @@ -38,7 +38,7 @@ data UserTableStudyFeature = UserTableStudyFeature , userTableDegree :: Text , userTableSemester :: Int , userTableFieldType :: StudyFieldType - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) makeLenses_ ''UserTableStudyFeature deriveJSON defaultOptions @@ -46,7 +46,7 @@ deriveJSON defaultOptions } ''UserTableStudyFeature newtype UserTableStudyFeatures = UserTableStudyFeatures (Set UserTableStudyFeature) - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving newtype ( ToJSON, FromJSON , Semigroup, Monoid ) diff --git a/src/Handler/Utils/Submission.hs b/src/Handler/Utils/Submission.hs index 1c8ecf902..1d6fd7f00 100644 --- a/src/Handler/Utils/Submission.hs +++ b/src/Handler/Utils/Submission.hs @@ -66,7 +66,7 @@ import Data.Char (isAlphaNum) data AssignSubmissionException = NoCorrectors | NoCorrectorsByProportion | SubmissionsNotFound (NonNull (Set SubmissionId)) - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance Exception AssignSubmissionException @@ -301,7 +301,7 @@ data SubmissionDownloadAnonymous = SubmissionDownloadAnonymous | SubmissionDownloadSurnames | SubmissionDownloadMatriculations | SubmissionDownloadGroups - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''SubmissionDownloadAnonymous $ camelToPathPiece' 2 @@ -420,7 +420,7 @@ data SubmissionSinkState = SubmissionSinkState { sinkSeenRating :: Last Rating' , sinkSubmissionTouched :: Any , sinkFilenames :: Set FilePath - } deriving (Show, Eq, Generic, Typeable) + } deriving (Show, Eq, Generic) instance Semigroup SubmissionSinkState where (<>) = mappenddefault @@ -955,7 +955,7 @@ submissionDeleteRoute drRecords = DeleteRoute data CorrectionInvisibleReason = CorrectionInvisibleExamUnfinished | CorrectionInvisibleRatingNotDone - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) embedRenderMessage ''UniWorX ''CorrectionInvisibleReason id diff --git a/src/Handler/Utils/Table/Pagination.hs b/src/Handler/Utils/Table/Pagination.hs index c3225c421..213b907d0 100644 --- a/src/Handler/Utils/Table/Pagination.hs +++ b/src/Handler/Utils/Table/Pagination.hs @@ -404,7 +404,7 @@ psToPi PaginationSettings{..} = PaginationInput data DBCsvActionMode = DBCsvActionNew | DBCsvActionExisting | DBCsvActionMissing - deriving (Read, Show, Eq, Ord, Enum, Bounded, Generic, Typeable) + deriving (Read, Show, Eq, Ord, Enum, Bounded, Generic) instance Universe DBCsvActionMode instance Finite DBCsvActionMode @@ -415,7 +415,7 @@ deriveJSON defaultOptions data ButtonCsvMode = BtnCsvExport | BtnCsvImport | BtnCsvImportConfirm | BtnCsvImportAbort - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe ButtonCsvMode instance Finite ButtonCsvMode @@ -483,7 +483,7 @@ data DBCsvException k' | DBCsvUnavailableActionRequested { dbCsvActions :: Set Value } - deriving (Show, Typeable) + deriving (Show) makeLenses_ ''DBCsvException diff --git a/src/Handler/Utils/Table/Pagination/Types.hs b/src/Handler/Utils/Table/Pagination/Types.hs index 5c9c65647..7533c3a7b 100644 --- a/src/Handler/Utils/Table/Pagination/Types.hs +++ b/src/Handler/Utils/Table/Pagination/Types.hs @@ -83,7 +83,7 @@ _Sortable = prism' fromSortable $ \x -> ($ x) . toSortable <$> pSortable data DBTableInvalid = DBTIRowsMissing Int - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance Exception DBTableInvalid diff --git a/src/Handler/Utils/TermCandidates.hs b/src/Handler/Utils/TermCandidates.hs index 7f394691f..8992339fc 100644 --- a/src/Handler/Utils/TermCandidates.hs +++ b/src/Handler/Utils/TermCandidates.hs @@ -33,7 +33,7 @@ import qualified Database.Esqueleto.Internal.Internal as E type STKey = Int -- for convenience, assmued identical to field StudyTermNameCandidateKey data FailedCandidateInference = FailedCandidateInference [Entity StudyTerms] - deriving (Typeable, Show) + deriving (Show) instance Exception FailedCandidateInference -- Default Instance diff --git a/src/Handler/Utils/Users.hs b/src/Handler/Utils/Users.hs index 01991de25..d40992ab3 100644 --- a/src/Handler/Utils/Users.hs +++ b/src/Handler/Utils/Users.hs @@ -119,7 +119,7 @@ data GuessUserInfo { guessUserSurname :: UserSurname } | GuessUserFirstName { guessUserFirstName :: UserFirstName } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance Binary GuessUserInfo makeLenses_ ''GuessUserInfo @@ -129,7 +129,7 @@ data NameMatchQuality | NameMatchPrefix | NameMatchPermutation | NameMatchEqual - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) matchesName :: Textual t => t -- ^ haystack @@ -257,7 +257,7 @@ guessUser (((Set.toList . toNullable) <$>) . Set.toList . dnfTerms -> criteria) data UserAssimilateException = UserAssimilateException { userAssimilateOldUser, userAssimilateNewUser :: UserId , userAssimilateException :: UserAssimilateExceptionReason - } deriving (Eq, Ord, Show, Generic, Typeable) + } deriving (Eq, Ord, Show, Generic) deriving anyclass (Exception) data UserAssimilateExceptionReason @@ -271,7 +271,7 @@ data UserAssimilateExceptionReason | UserAssimilateTutorialParticipantCollidingRegGroups (Entity TutorialParticipant) (Entity TutorialParticipant) | UserAssimilateCouldNotDetermineUserIdents | UserAssimilateConflictingLmsQualifications (Set.Set QualificationId) - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) assimilateUser :: UserId -- ^ @newUserId@ -> UserId -- ^ @oldUserId@ diff --git a/src/Handler/Utils/Zip.hs b/src/Handler/Utils/Zip.hs index 934b506b5..40c0b495d 100644 --- a/src/Handler/Utils/Zip.hs +++ b/src/Handler/Utils/Zip.hs @@ -61,7 +61,7 @@ instance Default ZipInfo where data ConsumeZipException = ConsumeZipUnZipException SomeException | ConsumeZipUnexpectedContent - deriving (Show, Generic, Typeable) + deriving (Show, Generic) deriving anyclass (Exception) diff --git a/src/Jobs.hs b/src/Jobs.hs index 544b75f67..ae2000aa9 100644 --- a/src/Jobs.hs +++ b/src/Jobs.hs @@ -93,7 +93,7 @@ import System.Clock data JobQueueException = JInvalid QueuedJobId QueuedJob | JLocked QueuedJobId InstanceId UTCTime | JNonexistant QueuedJobId - deriving (Read, Show, Eq, Generic, Typeable) + deriving (Read, Show, Eq, Generic) instance Exception JobQueueException diff --git a/src/Jobs/Handler/Files.hs b/src/Jobs/Handler/Files.hs index d3f610fba..158a92f47 100644 --- a/src/Jobs/Handler/Files.hs +++ b/src/Jobs/Handler/Files.hs @@ -366,7 +366,7 @@ dispatchJobInjectFiles = JobHandlerException . maybeT_ $ do data RechunkFileException = RechunkFileExceptionHashMismatch { oldHash, newHash :: FileContentReference } - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriving anyclass (Exception) dispatchJobRechunkFiles :: JobHandler UniWorX diff --git a/src/Jobs/Handler/SynchroniseLdap.hs b/src/Jobs/Handler/SynchroniseLdap.hs index 66a14cbee..4f3b846a7 100644 --- a/src/Jobs/Handler/SynchroniseLdap.hs +++ b/src/Jobs/Handler/SynchroniseLdap.hs @@ -19,7 +19,7 @@ import Jobs.Queue data SynchroniseLdapException = SynchroniseLdapNoLdap - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Exception SynchroniseLdapException dispatchJobSynchroniseLdap :: Natural -> Natural -> Natural -> JobHandler UniWorX diff --git a/src/Jobs/Types.hs b/src/Jobs/Types.hs index 7aa1cfd0b..410a2d960 100644 --- a/src/Jobs/Types.hs +++ b/src/Jobs/Types.hs @@ -117,7 +117,7 @@ data Job | JobLmsDequeue { jQualification :: QualificationId } | JobLmsUserlist { jQualification :: QualificationId } | JobLmsResults { jQualification :: QualificationId } - deriving (Eq, Ord, Show, Read, Generic, Typeable) + deriving (Eq, Ord, Show, Read, Generic) data Notification = NotificationSubmissionRated { nSubmission :: SubmissionId } | NotificationSheetActive { nSheet :: SheetId } @@ -144,7 +144,7 @@ data Notification | NotificationQualificationExpiry { nQualification :: QualificationId, nExpiry :: Day } | NotificationQualificationExpired { nQualification :: QualificationId, nExpiry :: Day } | NotificationQualificationRenewal { nQualification :: QualificationId } - deriving (Eq, Ord, Show, Read, Generic, Typeable) + deriving (Eq, Ord, Show, Read, Generic) instance Hashable Job instance NFData Job @@ -200,7 +200,7 @@ data JobCtlPrewarmSource { jcpsSheet :: SheetId , jcpsSheetFileType :: SheetFileType } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Hashable, NFData) makeLenses_ ''JobCtlPrewarmSource @@ -228,7 +228,7 @@ data JobCtl = JobCtlFlush | JobCtlGenerateHealthReport HealthCheck | JobCtlTest | JobCtlSleep Micro -- ^ For debugging - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Hashable, NFData) makePrisms ''JobCtl @@ -255,8 +255,7 @@ data JobHandler site = JobHandlerAtomic (YesodJobDB site ()) | JobHandlerException (HandlerFor site ()) | forall a. JobHandlerAtomicWithFinalizer (YesodJobDB site a) (a -> HandlerFor site ()) - | forall a. JobHandlerAtomicDeferrableWithFinalizer (ReaderT SqlReadBackend (HandlerFor site) a) (a -> HandlerFor site ()) - deriving (Typeable) + | forall a. JobHandlerAtomicDeferrableWithFinalizer (ReaderT SqlReadBackend (HandlerFor site) a) (a -> HandlerFor site ()) makePrisms ''JobHandler @@ -265,7 +264,7 @@ data JobWorkerState = JobWorkerBusy | JobWorkerExecJobCtl { jobWorkerJobCtl :: JobCtl } | JobWorkerExecJob { jobWorkerJob :: Job } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) makeLenses_ ''JobWorkerState @@ -302,7 +301,7 @@ data JobContext = JobContext data JobPriority = JobPrioBatch | JobPrioRealtime - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe JobPriority instance Finite JobPriority instance NFData JobPriority @@ -316,7 +315,7 @@ prioritiseJob JobCtlDetermineCrontab = JobPrioRealtime prioritiseJob _ = JobPrioBatch data JobNoQueueSame = JobNoQueueSame | JobNoQueueSameTag - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) jobNoQueueSame :: Job -> Maybe JobNoQueueSame diff --git a/src/Jose/Jwt/Instances.hs b/src/Jose/Jwt/Instances.hs index 441c85a5e..959c2e4df 100644 --- a/src/Jose/Jwt/Instances.hs +++ b/src/Jose/Jwt/Instances.hs @@ -17,7 +17,6 @@ import Jose.Jwt deriving instance Ord Jwt deriving instance Read Jwt deriving instance Generic Jwt -deriving instance Typeable Jwt deriving anyclass instance NFData Jwt instance PathPiece Jwt where @@ -30,6 +29,5 @@ derivePersistFieldPathPiece ''Jwt deriving instance Generic JwtError -deriving instance Typeable JwtError instance Exception JwtError diff --git a/src/Ldap/Client/Pool.hs b/src/Ldap/Client/Pool.hs index 89e4588dd..47eb4147c 100644 --- a/src/Ldap/Client/Pool.hs +++ b/src/Ldap/Client/Pool.hs @@ -48,7 +48,7 @@ data LdapExecutor = LdapExecutor data LdapPoolError = LdapPoolTimeout | LdapError LdapError | LdapLineTooLong | LdapHostNotResolved String | LdapHostCannotConnect String [IOException] - deriving (Eq, Show, Generic, Typeable) + deriving (Eq, Show, Generic) deriving anyclass (Exception) diff --git a/src/Mail.hs b/src/Mail.hs index 1b9342d66..6f8879b71 100644 --- a/src/Mail.hs +++ b/src/Mail.hs @@ -204,7 +204,7 @@ data MailContext = MailContext { mcLanguages :: Languages , mcDateTimeFormat :: SelDateTimeFormat -> DateTimeFormat , mcCsvOptions :: CsvOptions - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) deriveJSON defaultOptions { fieldLabelModifier = intercalate "-" . map toLower . drop 1 . splitCamel @@ -253,7 +253,7 @@ getMailMsgRenderer = do data MailException = MailNotAvailable | MailNoSenderSpecified | MailNoRecipientsSpecified - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance Exception MailException diff --git a/src/Model.hs b/src/Model.hs index ecc1234ed..67b1ace01 100644 --- a/src/Model.hs +++ b/src/Model.hs @@ -80,7 +80,7 @@ instance HasFileReference SheetFile where data FileReferenceResidual SheetFile = SheetFileResidual { sheetFileResidualSheet :: SheetId , sheetFileResidualType :: SheetFileType - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) _FileReference = iso (\SheetFile{..} -> ( FileReference @@ -115,7 +115,7 @@ instance HasFileReference PersonalisedSheetFile where { personalisedSheetFileResidualSheet :: SheetId , personalisedSheetFileResidualUser :: UserId , personalisedSheetFileResidualType :: SheetFileType - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) _FileReference = iso (\PersonalisedSheetFile{..} -> ( FileReference @@ -152,7 +152,7 @@ instance HasFileReference SubmissionFile where { submissionFileResidualSubmission :: SubmissionId , submissionFileResidualIsUpdate , submissionFileResidualIsDeletion :: Bool - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) _FileReference = iso (\SubmissionFile{..} -> ( FileReference @@ -187,7 +187,7 @@ instance IsFileReference SubmissionFile where instance HasFileReference CourseNewsFile where newtype FileReferenceResidual CourseNewsFile = CourseNewsFileResidual { courseNewsFileResidualNews :: CourseNewsId } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) _FileReference = iso (\CourseNewsFile{..} -> ( FileReference @@ -216,7 +216,7 @@ instance IsFileReference CourseNewsFile where instance HasFileReference MaterialFile where newtype FileReferenceResidual MaterialFile = MaterialFileResidual { materialFileResidualMaterial :: MaterialId } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) _FileReference = iso (\MaterialFile{..} -> ( FileReference diff --git a/src/Model/Migration/Definitions.hs b/src/Model/Migration/Definitions.hs index 03b68280a..146785bea 100644 --- a/src/Model/Migration/Definitions.hs +++ b/src/Model/Migration/Definitions.hs @@ -92,7 +92,7 @@ data ManualMigration | Migration20210208StudyFeaturesRelevanceCachedUUIDs | Migration20210318CrontabSubmissionRatedNotification | Migration20210608SeparateTermActive - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''ManualMigration $ \t@(splitCamel -> verbs) -> case verbs of diff --git a/src/Model/Migration/Types.hs b/src/Model/Migration/Types.hs index 531bd3689..50df4a3ee 100644 --- a/src/Model/Migration/Types.hs +++ b/src/Model/Migration/Types.hs @@ -86,7 +86,7 @@ data Transaction , transactionExam :: Current.ExamName , transactionUser :: Current.UserIdent } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriveJSON defaultOptions { constructorTagModifier = camelToPathPiece' 1 diff --git a/src/Model/Migration/Version.hs b/src/Model/Migration/Version.hs index 951e6e697..bbaae7ea0 100644 --- a/src/Model/Migration/Version.hs +++ b/src/Model/Migration/Version.hs @@ -34,7 +34,7 @@ deriving instance Lift Version data MigrationVersion = InitialVersion | MigrationVersion Version - deriving (Eq, Ord, Show, Read, Generic, Typeable, Data, Lift) + deriving (Eq, Ord, Show, Read, Generic, Data, Lift) deriveJSON defaultOptions { constructorTagModifier = toLower . fromJust . stripSuffix "Version" diff --git a/src/Model/Rating.hs b/src/Model/Rating.hs index ec90c396c..bc5aaf949 100644 --- a/src/Model/Rating.hs +++ b/src/Model/Rating.hs @@ -22,13 +22,13 @@ data Rating = Rating , ratingCorrectorName :: Maybe Text , ratingSheetType :: SheetType RatingExamPartReference , ratingValues :: Rating' - } deriving (Read, Show, Eq, Generic, Typeable) + } deriving (Read, Show, Eq, Generic) deriving anyclass (NFData) data RatingExamPartReference = RatingExamPartReference { ratingExamName :: ExamName , ratingExamPartNumber :: ExamPartNumber - } deriving (Read, Show, Eq, Ord, Generic, Typeable) + } deriving (Read, Show, Eq, Ord, Generic) deriving anyclass (NFData) data Rating' = Rating' @@ -36,7 +36,7 @@ data Rating' = Rating' , ratingComment :: Maybe Text , ratingTime :: Maybe UTCTime , ratingDone :: Bool - } deriving (Read, Show, Eq, Generic, Typeable) + } deriving (Read, Show, Eq, Generic) deriving anyclass (NFData) deriveJSON defaultOptions @@ -50,7 +50,7 @@ data RatingValidityException | RatingNotExpected -- ^ Rating not expected | RatingBinaryExpected -- ^ Rating must be 0 or 1 | RatingPointsRequired -- ^ Rating without points for sheet that requires there to be points - deriving (Show, Eq, Generic, Typeable) + deriving (Show, Eq, Generic) deriving anyclass (Exception) data RatingParseLegacyException @@ -58,7 +58,7 @@ data RatingParseLegacyException | RatingMissingSeparator -- ^ Could not split rating header from comments | RatingMultiple -- ^ Encountered multiple point values in rating | RatingInvalid Text -- ^ Failed to parse rating point value - deriving (Show, Eq, Generic, Typeable) + deriving (Show, Eq, Generic) deriving anyclass (Exception) data RatingParseException @@ -68,7 +68,7 @@ data RatingParseException | RatingYAMLException String -- ^ Could not parse YAML | RatingYAMLCommentNotUnicode UnicodeException | RatingYAMLNotUnicode String - deriving (Show, Eq, Generic, Typeable) + deriving (Show, Eq, Generic) deriving anyclass (Exception) data RatingException @@ -77,7 +77,7 @@ data RatingException | RatingParseException RatingParseException | RatingParseLegacyException RatingParseLegacyException | RatingValidityException RatingValidityException - deriving (Show, Eq, Generic, Typeable) + deriving (Show, Eq, Generic) deriving anyclass (Exception) data RatingFileException @@ -89,5 +89,5 @@ data RatingFileException { ratingExceptionSubmission :: CryptoFileNameSubmission , ratingException :: RatingException } - deriving (Show, Eq, Generic, Typeable) + deriving (Show, Eq, Generic) deriving anyclass (Exception) diff --git a/src/Model/Submission.hs b/src/Model/Submission.hs index c14badd14..4ca9c4f89 100644 --- a/src/Model/Submission.hs +++ b/src/Model/Submission.hs @@ -12,7 +12,7 @@ data SubmissionSinkException = DuplicateFileTitle FilePath | RatingWithoutUpdate | ForeignRating CryptoFileNameSubmission | InvalidFileTitleExtension FilePath - deriving (Typeable, Show) + deriving (Show) instance Exception SubmissionSinkException @@ -22,6 +22,6 @@ data SubmissionMultiSinkException , _submissionSinkFedFile :: Maybe FilePath , _submissionSinkException :: SubmissionSinkException } - deriving (Typeable, Show) + deriving (Show) instance Exception SubmissionMultiSinkException diff --git a/src/Model/Tokens/Bearer.hs b/src/Model/Tokens/Bearer.hs index e49ce489c..c2176dc7f 100644 --- a/src/Model/Tokens/Bearer.hs +++ b/src/Model/Tokens/Bearer.hs @@ -53,7 +53,7 @@ import qualified Data.CryptoID.Class.ImplicitNamespace as I data BearerTokenRouteMode = BearerTokenRouteEval -- ^ Token is not to be evaluated for routes outside of the given restriction | BearerTokenRouteAccess -- ^ Token may be evaluated for routes outside of the given restriction, but not if the initial request was outside the restriction - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, Hashable, Binary) nullaryPathPiece ''BearerTokenRouteMode $ camelToPathPiece' 3 pathPieceJSON ''BearerTokenRouteMode @@ -82,7 +82,7 @@ data BearerToken site = BearerToken , bearerIssuedFor :: ClusterId , bearerExpiresAt , bearerStartsAt :: Maybe UTCTime - } deriving (Generic, Typeable) + } deriving (Generic) deriving stock instance (Eq (AuthId site), Eq (Route site)) => Eq (BearerToken site) deriving stock instance (Ord (AuthId site), Ord (Route site)) => Ord (BearerToken site) diff --git a/src/Model/Tokens/Session.hs b/src/Model/Tokens/Session.hs index e76f76a3e..879aa98ef 100644 --- a/src/Model/Tokens/Session.hs +++ b/src/Model/Tokens/Session.hs @@ -31,7 +31,7 @@ data SessionToken sess = SessionToken , sessionIssuedFor :: ClusterId , sessionExpiresAt , sessionStartsAt :: Maybe UTCTime - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) makeLenses_ ''SessionToken instance HasTokenIdentifier (SessionToken sess) TokenId where diff --git a/src/Model/Tokens/Upload.hs b/src/Model/Tokens/Upload.hs index f94d0c9dc..199a08d6f 100644 --- a/src/Model/Tokens/Upload.hs +++ b/src/Model/Tokens/Upload.hs @@ -51,17 +51,17 @@ data UploadToken = UploadToken , uploadTokenStartsAt :: Maybe UTCTime , uploadTokenConfig :: FileField FileReference , uploadTokenState :: Maybe UploadTokenState - } deriving (Eq, Ord, Show, Generic, Typeable) + } deriving (Eq, Ord, Show, Generic) data UploadTokenState = UploadTokenState { uploadTokenStateHashState :: UploadTokenStateHashState , uploadTokenStateManifest :: Seq FileContentChunkReference - } deriving (Eq, Ord, Show, Generic, Typeable) + } deriving (Eq, Ord, Show, Generic) data UploadTokenStateHashState = UploadTokenStateHashState { utsHashStateNonce :: SecretBox.Nonce , utsHashStateState :: ByteString - } deriving (Eq, Ord, Show, Generic, Typeable) + } deriving (Eq, Ord, Show, Generic) makeLenses_ ''UploadToken diff --git a/src/Model/Types/Apis.hs b/src/Model/Types/Apis.hs index f77e93508..52d220c44 100644 --- a/src/Model/Types/Apis.hs +++ b/src/Model/Types/Apis.hs @@ -24,7 +24,7 @@ import qualified Data.HashSet as HashSet data ExternalApiKind = EApiKindGradelistFormat - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, Hashable) nullaryPathPiece ''ExternalApiKind $ camelToPathPiece' 3 pathPieceJSON ''ExternalApiKind @@ -43,7 +43,7 @@ data ExternalApiConfig = EApiGradelistFormat { eapiGradelistFormats :: NonNull (HashSet GradelistFormatIdent) } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) instance ToJSON ExternalApiConfig where toJSON = genericToJSON externalApiConfigAesonOptions diff --git a/src/Model/Types/Avs.hs b/src/Model/Types/Avs.hs index 7781081d4..a836630f1 100644 --- a/src/Model/Types/Avs.hs +++ b/src/Model/Types/Avs.hs @@ -50,7 +50,7 @@ o .:?~ key = o .: key <|> maybe empty parseJSON go -- | `SloppyBool` successfully parses different variations of true/false newtype SloppyBool = SloppyBool { sloppyBool :: Bool } - deriving (Bounded, Enum, Eq, Ord, Generic, Typeable) + deriving (Bounded, Enum, Eq, Ord, Generic) -- Cannot tell difference between SloppyBool and Bool through Show and Read. A good or a bad idea? instance Show SloppyBool where @@ -82,7 +82,7 @@ instance FromJSON SloppyBool where ------------------- newtype AvsInternalPersonalNo = AvsInternalPersonalNo { avsInternalPersonalNo :: Text } -- ought to be all digits - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriving newtype (NFData, PathPiece, PersistField, PersistFieldSql, Csv.ToField, Csv.FromField) instance E.SqlString AvsInternalPersonalNo -- AvsInternalPersonalNo is an untagged Text with respect to FromJSON/ToJSON, as needed by AVS API @@ -139,7 +139,7 @@ instance {-# OVERLAPS #-} Canonical (Maybe AvsInternalPersonalNo) where -- and y is the 1 digit AvsVersionNo type AvsVersionNo = Text -- always 1 digit newtype AvsCardNo = AvsCardNo { avsCardNo :: Text } -- always 8 digits - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriving newtype (NFData, PathPiece, PersistField, PersistFieldSql, Csv.ToField, Csv.FromField) instance E.SqlString AvsCardNo -- AvsCardNo is an untagged Text with respect to FromJSON/ToJSON, as needed by AVS API @@ -156,7 +156,7 @@ instance Canonical AvsCardNo where data AvsFullCardNo = AvsFullCardNo { avsFullCardNo :: AvsCardNo, avsFullCardVersion :: AvsVersionNo } - deriving (Eq, Ord, Generic, Typeable) + deriving (Eq, Ord, Generic) tshowAvsFullCardNo :: AvsFullCardNo -> Text tshowAvsFullCardNo AvsFullCardNo{..} = avsCardNo avsFullCardNo <> Text.cons '.' avsFullCardVersion @@ -182,7 +182,7 @@ discernAvsCardPersonalNo _ = Nothing -- The AVS API requires PersonIds sometimes as as mere numbers `AvsPersonId` and sometimes as tagged objects `AvsObjPersonId` newtype AvsPersonId = AvsPersonId { avsPersonId :: Int } -- untagged Int - deriving (Eq, Ord, Generic, Typeable) + deriving (Eq, Ord, Generic) deriving newtype (NFData, PathPiece, PersistField, PersistFieldSql, Csv.ToField, Csv.FromField, Hashable, Binary) instance E.SqlString AvsPersonId -- As opposed to AvsObjPersonId, AvsPersonId is an untagged Int with respect to FromJSON/ToJSON, as needed by AVS API; @@ -203,7 +203,7 @@ avsPersonIdZero = AvsPersonId 0 -- this mus be zero acording to VSM specificatio newtype AvsObjPersonId = AvsObjPersonId -- tagged object { avsObjPersonID :: AvsPersonId } - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriveJSON defaultOptions { fieldLabelModifier = dropCamel 2 , omitNothingFields = True @@ -225,7 +225,7 @@ discernAvsIds someid = aux someid data AvsLicence = AvsNoLicence | AvsLicenceVorfeld | AvsLicenceRollfeld - deriving (Bounded, Enum, Eq, Ord, Read, Show, Generic, Typeable, Finite, Universe, NFData) + deriving (Bounded, Enum, Eq, Ord, Read, Show, Generic, Finite, Universe, NFData) instance ToJSON AvsLicence where -- toJSON al = Number $ fromEnum AvsLicence -- would do, but... @@ -265,7 +265,7 @@ licence2char AvsLicenceRollfeld = 'R' data AvsDataCardColor = AvsCardColorMisc Text | AvsCardColorGrün | AvsCardColorBlau | AvsCardColorRot | AvsCardColorGelb - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) instance ToJSON AvsDataCardColor where @@ -298,7 +298,7 @@ data AvsDataPersonCard = AvsDataPersonCard , avsDataCardNo :: AvsCardNo -- always 8 digits number, prefixed with 0 , avsDataVersionNo :: AvsVersionNo -- always 1 digit number } - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriving anyclass (NFData) {- Automatically derived Ord instance should prioritize avsDataValid and avsDataValidTo. Checked in test/Model.TypesSpec @@ -375,7 +375,7 @@ data AvsStatusPerson = AvsStatusPerson { avsStatusPersonID :: AvsPersonId , avsStatusPersonCardStatus :: Set AvsDataPersonCard -- only delivers non-Maybe fields, all Maybe-fields are Nothing } - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriveJSON defaultOptions { fieldLabelModifier = \case { "avsStatusPersonCardStatus" -> "personCardStatus"; others -> dropCamel 2 others } @@ -392,7 +392,7 @@ data AvsDataPerson = AvsDataPerson , avsPersonPersonID :: AvsPersonId -- Eindeutige PersonenID, wichtig für die Schnittstelle! , avsPersonPersonCards :: Set AvsDataPersonCard } - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) makeLenses_ ''AvsDataPerson @@ -434,7 +434,7 @@ data AvsPersonLicence = AvsPersonLicence { avsLicenceRampLicence :: AvsLicence , avsLicencePersonID :: AvsPersonId } - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriveJSON defaultOptions { fieldLabelModifier = dropCamel 2 , omitNothingFields = True @@ -454,7 +454,7 @@ data AvsLicenceResponse = AvsLicenceResponse , avsResponseSuccess :: SloppyBool , avsResponseMessage :: Text } - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriveJSON defaultOptions { fieldLabelModifier = dropCamel 2 , omitNothingFields = True @@ -468,7 +468,7 @@ deriveJSON defaultOptions --------------- newtype AvsResponseStatus = AvsResponseStatus (Set AvsStatusPerson) - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriveJSON defaultOptions { fieldLabelModifier = dropCamel 2 , omitNothingFields = True @@ -477,7 +477,7 @@ deriveJSON defaultOptions } ''AvsResponseStatus newtype AvsResponsePerson = AvsResponsePerson (Set AvsDataPerson) - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriveJSON defaultOptions { fieldLabelModifier = dropCamel 2 , omitNothingFields = True @@ -486,7 +486,7 @@ deriveJSON defaultOptions } ''AvsResponsePerson newtype AvsResponseGetLicences = AvsResponseGetLicences (Set AvsPersonLicence) - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriveJSON defaultOptions { fieldLabelModifier = dropCamel 2 , omitNothingFields = True @@ -499,7 +499,7 @@ data AvsResponseSetLicences = AvsResponseSetLicences (Set AvsLicenceResponse) { avsResponseSetLicencesStatus :: Text , avsResponseSetLicencesMessage :: Text } - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriveJSON defaultOptions { fieldLabelModifier = dropCamel 4 , omitNothingFields = True @@ -519,7 +519,7 @@ data AvsQueryPerson = AvsQueryPerson , avsPersonQueryLastName :: Maybe Text , avsPersonQueryInternalPersonalNo :: Maybe AvsInternalPersonalNo } - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) instance Default AvsQueryPerson where def = AvsQueryPerson Nothing Nothing Nothing Nothing Nothing @@ -532,13 +532,13 @@ deriveJSON defaultOptions } ''AvsQueryPerson newtype AvsQueryStatus = AvsQueryStatus (Set AvsPersonId) - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriveJSON defaultOptions ''AvsQueryStatus newtype AvsQueryGetLicences = AvsQueryGetLicences AvsObjPersonId -- this should have been a set, but the specification was implemented differently - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriveJSON defaultOptions ''AvsQueryGetLicences newtype AvsQuerySetLicences = AvsQuerySetLicences (Set AvsPersonLicence) - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriveJSON defaultOptions ''AvsQuerySetLicences diff --git a/src/Model/Types/Changelog.hs b/src/Model/Types/Changelog.hs index 2e10bad11..28693409d 100644 --- a/src/Model/Types/Changelog.hs +++ b/src/Model/Types/Changelog.hs @@ -38,7 +38,7 @@ pathPieceHttpApiData ''ChangelogItem data ChangelogItemKind = ChangelogItemFeature | ChangelogItemBugfix - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) makePrisms ''ChangelogItemKind diff --git a/src/Model/Types/Communication.hs b/src/Model/Types/Communication.hs index 656c8fc48..4fc22969a 100644 --- a/src/Model/Types/Communication.hs +++ b/src/Model/Types/Communication.hs @@ -16,7 +16,7 @@ data CommunicationContent = CommunicationContent { ccSubject :: Maybe Text , ccBody :: Html , ccAttachments :: Set FileReference - } deriving stock (Eq, Ord, Show, Read, Generic, Typeable) + } deriving stock (Eq, Ord, Show, Read, Generic) deriving anyclass (Hashable, NFData) deriveJSON defaultOptions diff --git a/src/Model/Types/Course.hs b/src/Model/Types/Course.hs index d3e2f703b..8b1837f9c 100644 --- a/src/Model/Types/Course.hs +++ b/src/Model/Types/Course.hs @@ -19,7 +19,7 @@ import Utils.Lens.TH data LecturerType = CourseLecturer | CourseAssistant | CourseAdministrator - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving (Universe, Finite, NFData) nullaryPathPiece ''LecturerType $ camelToPathPiece' 1 @@ -34,7 +34,7 @@ instance Hashable LecturerType data CourseParticipantState = CourseParticipantActive | CourseParticipantInactive { courseParticipantNoShow :: Bool } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData, Hashable) makePrisms ''CourseParticipantState diff --git a/src/Model/Types/Csv.hs b/src/Model/Types/Csv.hs index d8bf49c17..794bb0b8b 100644 --- a/src/Model/Types/Csv.hs +++ b/src/Model/Types/Csv.hs @@ -59,7 +59,7 @@ data CsvOptions , csvTimestamp :: Bool , csvExportLabel :: Maybe Text } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Hashable, NFData) data CsvFormatOptions @@ -71,7 +71,7 @@ data CsvFormatOptions , csvIncludeHeader :: Bool } | CsvXlsxFormatOptions - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Hashable, NFData) makeLenses_ ''CsvOptions @@ -90,7 +90,7 @@ instance Default CsvFormatOptions where data CsvPreset = CsvPresetRFC | CsvPresetXlsx | CsvPresetExcel - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance Universe CsvPreset instance Finite CsvPreset @@ -150,7 +150,7 @@ instance FromJSON CsvOptions where return CsvOptions{..} data CsvFormat = FormatCsv | FormatXlsx - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''CsvFormat $ camelToPathPiece' 1 diff --git a/src/Model/Types/DateTime.hs b/src/Model/Types/DateTime.hs index cd4034a29..a3ffb0ff6 100644 --- a/src/Model/Types/DateTime.hs +++ b/src/Model/Types/DateTime.hs @@ -37,10 +37,10 @@ import Data.Aeson.Types as Aeson -- Terms and anything loosely related to time newtype TermIdentifier = TermIdentifier { year :: Integer } -- ^ Using 'Integer' to model years is consistent with 'Data.Time.Calendar' - deriving (Show, Read, Eq, Ord, Generic, Typeable, Enum) + deriving (Show, Read, Eq, Ord, Generic, Enum) deriving newtype (Binary) -- , ISO8601, PersistField, PersistFieldSql) -- , ToJSON, FromJSON) deriving anyclass (NFData) - -- ought to be equivalent to deriving stock (Show, Read, Eq, Ord, Generic, Typeable, Enum, Binary, NFData) + -- ought to be equivalent to deriving stock (Show, Read, Eq, Ord, Generic, Enum, Binary, NFData) -- Note: Working Implementations for TermIdentifiers being single Days, half-years and quarters exits in git history @@ -142,7 +142,7 @@ pathPieceCsv ''TermIdentifier data TermDay = TermDayStart | TermDayEnd | TermDayLectureStart | TermDayLectureEnd - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) -- See Handler.Term.validateTerm for term specification @@ -165,7 +165,7 @@ data OccurrenceSchedule = ScheduleWeekly , scheduleStart :: TimeOfDay , scheduleEnd :: TimeOfDay } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) deriveJSON defaultOptions @@ -183,7 +183,7 @@ data OccurrenceException = ExceptOccur | ExceptNoOccur { exceptTime :: LocalTime } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) deriveJSON defaultOptions @@ -196,7 +196,7 @@ data Occurrences = Occurrences { occurrencesScheduled :: Set OccurrenceSchedule , occurrencesExceptions :: Set OccurrenceException } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) deriveJSON defaultOptions diff --git a/src/Model/Types/Exam.hs b/src/Model/Types/Exam.hs index 6cee74d54..986aa3871 100644 --- a/src/Model/Types/Exam.hs +++ b/src/Model/Types/Exam.hs @@ -81,7 +81,7 @@ import Model.Types.Security data ExamResult' res = ExamAttended { examResult :: res } | ExamNoShow | ExamVoided - deriving (Show, Read, Eq, Ord, Functor, Generic, Typeable) + deriving (Show, Read, Eq, Ord, Functor, Generic) deriving anyclass (NFData) deriveJSON defaultOptions { constructorTagModifier = camelToPathPiece' 1 @@ -160,7 +160,7 @@ data ExamBonusRule = ExamBonusManual , bonusOnlyPassed :: Bool , bonusRound :: Points } - deriving (Show, Read, Eq, Ord, Generic, Typeable) + deriving (Show, Read, Eq, Ord, Generic) deriving anyclass (NFData) deriveJSON defaultOptions { fieldLabelModifier = camelToPathPiece' 1 @@ -177,7 +177,7 @@ data ExamOccurrenceRule = ExamRoomManual | ExamRoomSurname | ExamRoomMatriculation | ExamRoomRandom - deriving (Show, Read, Eq, Ord, Enum, Bounded, Generic, Typeable) + deriving (Show, Read, Eq, Ord, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, NFData) deriveJSON defaultOptions { fieldLabelModifier = camelToPathPiece' 1 @@ -201,7 +201,7 @@ data ExamOccurrenceMappingDescription = ExamOccurrenceMappingRange { eaomrStart, eaomrEnd :: [CI Char] } | ExamOccurrenceMappingSpecial { eaomrSpecial :: [CI Char] } | ExamOccurrenceMappingRandom - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) deriveJSON defaultOptions { fieldLabelModifier = camelToPathPiece' 1 @@ -215,7 +215,7 @@ data ExamOccurrenceMapping roomId = ExamOccurrenceMapping { examOccurrenceMappingRule :: ExamOccurrenceRule , examOccurrenceMappingMapping :: Map roomId (Set ExamOccurrenceMappingDescription) } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) instance ToJSONKey roomId => ToJSON (ExamOccurrenceMapping roomId) where toJSON = genericToJSON defaultOptions @@ -278,7 +278,7 @@ data ExamGrade | Grade17 | Grade13 | Grade10 - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, NFData) numberGrade :: Prism' Rational ExamGrade @@ -342,7 +342,7 @@ instance Binary ExamGrade newtype ExamGradeDefCenter = ExamGradeDefCenter { examGradeDefCenter :: Maybe ExamGrade } - deriving (Eq, Read, Show, Generic, Typeable) + deriving (Eq, Read, Show, Generic) instance Ord ExamGradeDefCenter where ExamGradeDefCenter Nothing <= ExamGradeDefCenter (Just g) = Grade23 <= g @@ -354,7 +354,7 @@ data ExamGradingRule = ExamGradingKey { examGradingKey :: [Points] -- ^ @[n1, n2, n3, ..., n11]@ means @0 <= p < n1 -> p ~= 5@, @n1 <= p < n2 -> p ~ 4@, @n2 <= p < n3 -> p ~ 3.7@, ..., @n10 <= p -> p ~ 1.0@ } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) deriveJSON defaultOptions { fieldLabelModifier = camelToPathPiece' 2 @@ -368,7 +368,7 @@ derivePersistFieldJSON ''ExamGradingRule newtype ExamPassed = ExamPassed { examPassed :: Bool } - deriving (Read, Show, Generic, Typeable) + deriving (Read, Show, Generic) deriving newtype (Eq, Ord, Enum, Bounded, PersistField) deriving anyclass (NFData) @@ -415,7 +415,7 @@ data ExamGradingMode = ExamGradingPass | ExamGradingGrades | ExamGradingMixed - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, NFData) nullaryPathPiece ''ExamGradingMode $ camelToPathPiece' 2 @@ -432,7 +432,7 @@ hasExamGradingGrades _ = True newtype ExamPartNumber = ExamPartNumber { examPartNumberFragments :: [Either (CI Text) Natural] } - deriving (Eq, Ord, Generic, Typeable) + deriving (Eq, Ord, Generic) deriving anyclass (NFData) _ExamPartNumber :: Iso' ExamPartNumber (CI Text) @@ -489,13 +489,13 @@ instance Enum ExamPartNumber where data ExamAids = ExamAidsPreset { examAidsPreset :: ExamAidsPreset } | ExamAidsCustom { examAidsCustom :: StoredMarkup } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) data ExamAidsPreset = ExamOpenBook | ExamClosedBook - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, NFData) deriveJSON defaultOptions @@ -511,13 +511,13 @@ pathPieceJSON ''ExamAidsPreset data ExamOnline = ExamOnlinePreset { examOnlinePreset :: ExamOnlinePreset } | ExamOnlineCustom { examOnlineCustom :: StoredMarkup } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) data ExamOnlinePreset = ExamOnline | ExamOffline - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, NFData) deriveJSON defaultOptions @@ -533,13 +533,13 @@ pathPieceJSON ''ExamOnlinePreset data ExamSynchronicity = ExamSynchronicityPreset { examSynchronicityPreset :: ExamSynchronicityPreset } | ExamSynchronicityCustom { examSynchronicityCustom :: StoredMarkup } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) data ExamSynchronicityPreset = ExamSynchronous | ExamAsynchronous - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, NFData) deriveJSON defaultOptions @@ -555,7 +555,7 @@ pathPieceJSON ''ExamSynchronicityPreset data ExamRequiredEquipment = ExamRequiredEquipmentPreset { examRequiredEquipmentPreset :: ExamRequiredEquipmentPreset } | ExamRequiredEquipmentCustom { examRequiredEquipmentCustom :: StoredMarkup } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) data ExamRequiredEquipmentPreset @@ -566,7 +566,7 @@ data ExamRequiredEquipmentPreset | ExamRequiredEquipmentCalculatorPaperPen | ExamRequiredEquipmentWebcamMicrophoneInternet | ExamRequiredEquipmentMicrophoneInternet - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, NFData) deriveJSON defaultOptions @@ -586,7 +586,7 @@ data ExamMode = ExamMode , examSynchronicity :: Maybe ExamSynchronicity , examRequiredEquipment :: Maybe ExamRequiredEquipment } - deriving (Generic, Typeable) + deriving (Generic) deriving anyclass (NFData) deriveJSON defaultOptions { fieldLabelModifier = camelToPathPiece' 1 @@ -599,7 +599,7 @@ data ExamModePredicate | ExamModePredOnline ExamOnlinePreset | ExamModePredSynchronicity ExamSynchronicityPreset | ExamModePredRequiredEquipment ExamRequiredEquipmentPreset - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) deriveJSON defaultOptions { constructorTagModifier = camelToPathPiece' 3 @@ -609,7 +609,7 @@ derivePathPiece ''ExamModePredicate (camelToPathPiece' 3) "--" deriveFinite ''ExamModePredicate newtype ExamModeDNF = ExamModeDNF { examModeDNF :: PredDNF ExamModePredicate } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving newtype (ToJSON, FromJSON, PathPiece) deriving anyclass (NFData) @@ -619,7 +619,7 @@ derivePersistFieldJSON ''ExamModeDNF data ExamCloseMode = ExamCloseSeparate | ExamCloseOnFinished { examCloseOnFinishedHidden :: Bool } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Binary, NFData) deriveFinite ''ExamCloseMode finitePathPiece ''ExamCloseMode ["separate", "on-finished", "on-finished-hidden"] diff --git a/src/Model/Types/File.hs b/src/Model/Types/File.hs index 5f7acecc5..db9b7b56e 100644 --- a/src/Model/Types/File.hs +++ b/src/Model/Types/File.hs @@ -65,7 +65,7 @@ import qualified Data.Text as Text newtype FileContentChunkReference = FileContentChunkReference (Digest SHA3_512) - deriving (Eq, Ord, Read, Show, Lift, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Lift, Generic) deriving newtype ( PersistField , PathPiece, ToHttpApiData, FromHttpApiData, ToJSON, FromJSON , Hashable, NFData @@ -86,7 +86,7 @@ minioFileChunkReference = prism' toObjectName fromObjectName chunkPrefix = "chunk." newtype FileContentReference = FileContentReference (Digest SHA3_512) - deriving (Eq, Ord, Read, Show, Lift, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Lift, Generic) deriving newtype ( PersistField , PathPiece, ToHttpApiData, FromHttpApiData, ToJSON, FromJSON , Hashable, NFData @@ -117,7 +117,7 @@ data File m = File { fileTitle :: FilePath , fileContent :: Maybe (ConduitT () ByteString m ()) , fileModified :: UTCTime - } deriving (Generic, Typeable) + } deriving (Generic) makeLenses_ ''File @@ -186,7 +186,7 @@ data FileReference = FileReference { fileReferenceTitle :: FilePath , fileReferenceContent :: Maybe FileContentReference , fileReferenceModified :: UTCTime - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Hashable, Binary, NFData) makeLenses_ ''FileReference @@ -208,23 +208,23 @@ instance HasFileReference Void where instance HasFileReference FileReference where data FileReferenceResidual FileReference = FileReferenceResidual - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, NFData) -- newtype FileReferenceTitleMap FileReference add = FileReferenceFileReferenceTitleMap { unFileReferenceFileReferenceTitleMap :: Map FilePath (FileReferenceTitleMapElem FileReference add) } - -- deriving (Eq, Ord, Read, Show, Generic, Typeable) + -- deriving (Eq, Ord, Read, Show, Generic) -- deriving newtype (Semigroup, Monoid) -- data FileReferenceTitleMapElem FileReference add = FileReferenceFileReferenceTitleMapElem -- { fRefTitleMapContent :: FileContentReference -- , fRefTitleMapModified :: UTCTime -- , fRefTitleMapAdditional :: add - -- } deriving (Eq, Ord, Read, Show, Generic, Typeable) + -- } deriving (Eq, Ord, Read, Show, Generic) _FileReference = iso (, FileReferenceResidual) $ view _1 -- _FileReferenceTitleMapElem = iso (\FileReferenceFileReferenceTitleMapElem{..} -> (fRefTitleMapContent, fRefTitleMapModified, FileReferenceResidual, fRefTitleMapAdditional)) (\(fRefTitleMapContent, fRefTitleMapModified, FileReferenceResidual, fRefTitleMapAdditional) -> FileReferenceFileReferenceTitleMapElem{..}) instance HasFileReference PureFile where newtype FileReferenceResidual PureFile = PureFileResidual { unPureFileResidual :: Maybe ByteString } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) _FileReference = iso toFileReference fromFileReference @@ -243,7 +243,7 @@ instance HasFileReference PureFile where instance (HasFileReference a, HasFileReference b) => HasFileReference (Either a b) where newtype FileReferenceResidual (Either a b) = FileReferenceResidualEither { unFileReferenceResidualEither :: Either (FileReferenceResidual a) (FileReferenceResidual b) } - deriving (Generic, Typeable) + deriving (Generic) _FileReference = iso doSplit doJoin where doSplit (Right r) = over _2 (FileReferenceResidualEither . Right) $ r ^. _FileReference @@ -256,7 +256,7 @@ instance HasFileReference record => HasFileReference (Entity record) where { fileReferenceResidualEntityKey :: Key record , fileReferenceResidualEntityResidual :: FileReferenceResidual record } - deriving (Generic, Typeable) + deriving (Generic) _FileReference = iso doSplit doJoin where doSplit Entity{..} = (fRef, FileReferenceResidualEntity entityKey res) @@ -273,7 +273,7 @@ data family FileReferenceTitleMap :: Type -> Type -> Type newtype instance FileReferenceTitleMap FileReference add = FileReferenceFileReferenceTitleMap { unFileReferenceFileReferenceTitleMap :: Map FilePath (FileReferenceFileReferenceTitleMapElem add) } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving newtype (Semigroup, Monoid) deriving anyclass (NFData) data FileReferenceFileReferenceTitleMapElem add = FileReferenceFileReferenceTitleMapElem @@ -281,7 +281,7 @@ data FileReferenceFileReferenceTitleMapElem add = FileReferenceFileReferenceTitl , fRefTitleMapModified :: UTCTime , fRefTitleMapAdditional :: add } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) makePrisms ''FileReferenceFileReferenceTitleMapElem @@ -301,7 +301,7 @@ data FileFieldUserOption a = FileFieldUserOption { fieldOptionForce :: Bool , fieldOptionDefault :: a } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) deriveJSON defaultOptions @@ -317,7 +317,7 @@ data FileField fileid = FileField , fieldAdditionalFiles :: FileReferenceTitleMap fileid (FileFieldUserOption Bool) , fieldAllEmptyOk :: Bool } - deriving (Generic, Typeable) + deriving (Generic) deriving instance Eq (FileReferenceTitleMap fileid (FileFieldUserOption Bool)) => Eq (FileField fileid) deriving instance Ord (FileReferenceTitleMap fileid (FileFieldUserOption Bool)) => Ord (FileField fileid) deriving instance Read (FileReferenceTitleMap fileid (FileFieldUserOption Bool)) => Read (FileField fileid) diff --git a/src/Model/Types/Health.hs b/src/Model/Types/Health.hs index 410e36b48..a1f49fad2 100644 --- a/src/Model/Types/Health.hs +++ b/src/Model/Types/Health.hs @@ -21,7 +21,7 @@ data HealthCheck | HealthCheckWidgetMemcached | HealthCheckActiveJobExecutors | HealthCheckDoesFlush - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance Universe HealthCheck instance Finite HealthCheck instance Hashable HealthCheck @@ -49,7 +49,7 @@ data HealthReport | HealthActiveJobExecutors { healthActiveJobExecutors :: Maybe Rational } -- ^ Proportion of job executors (excluding the one running the healthcheck) responding within a timeout | HealthDoesFlush { healthFlushOverdue :: Maybe Rational } - deriving (Eq, Ord, Read, Show, Data, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Data, Generic) instance NFData HealthReport @@ -77,7 +77,7 @@ classifyHealthReport HealthDoesFlush{} = HealthCheckDoesFlush -- Currently all consumers of this type check for @(== HealthSuccess)@; this -- needs to be adjusted on a case-by-case basis if new constructors are added data HealthStatus = HealthFailure | HealthSuccess - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance Universe HealthStatus instance Finite HealthStatus diff --git a/src/Model/Types/Languages.hs b/src/Model/Types/Languages.hs index ceba8e264..774dc97db 100644 --- a/src/Model/Types/Languages.hs +++ b/src/Model/Types/Languages.hs @@ -17,7 +17,7 @@ import Control.Lens.TH (makeWrapped) newtype Languages = Languages { getLanguages :: [Lang] } - deriving (Eq, Ord, Show, Read, Generic, Typeable) + deriving (Eq, Ord, Show, Read, Generic) deriving newtype (FromJSON, ToJSON, IsList) instance Default Languages where diff --git a/src/Model/Types/Lms.hs b/src/Model/Types/Lms.hs index 59c1a6547..f9495c4cb 100644 --- a/src/Model/Types/Lms.hs +++ b/src/Model/Types/Lms.hs @@ -19,7 +19,7 @@ import Data.Time.Format.ISO8601 (iso8601ParseM) import Utils.Lens.TH newtype LmsIdent = LmsIdent { getLmsIdent :: Text } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving newtype (NFData, PathPiece, PersistField, PersistFieldSql, Csv.ToField, Csv.FromField) instance E.SqlString LmsIdent makeLenses_ ''LmsIdent @@ -34,7 +34,7 @@ deriveJSON defaultOptions -- ...also see similar type QualificationBlocked data LmsStatus = LmsBlocked { lmsStatusDay :: Day } | LmsSuccess { lmsStatusDay :: Day } - deriving (Eq, Read, Show, Generic, Typeable, NFData) + deriving (Eq, Read, Show, Generic, NFData) instance Ord LmsStatus where compare a b @@ -68,7 +68,7 @@ instance Csv.ToField LmsStatus where data QualificationBlocked = QualificationBlocked { qualificationBlockedDay :: Day , qualificationBlockedReason :: Text } - deriving (Eq, Ord, Read, Show, Generic, Typeable, NFData) + deriving (Eq, Ord, Read, Show, Generic, NFData) deriveJSON defaultOptions { tagSingleConstructors = False @@ -86,7 +86,7 @@ instance Csv.ToField QualificationBlocked where -- | LMS interface requires Bool to be encoded by 0 or 1 only newtype LmsBool = LmsBool { lms2bool :: Bool } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) _lmsBool :: Iso' Bool LmsBool _lmsBool = iso LmsBool lms2bool @@ -103,7 +103,7 @@ instance Csv.FromField LmsBool where -- | LMS interface requires day format not compliant with iso8601 newtype LmsDay = LmsDay { lms2day :: Day } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) _lmsDay :: Iso' Day LmsDay _lmsDay = iso LmsDay lms2day diff --git a/src/Model/Types/Mail.hs b/src/Model/Types/Mail.hs index 82e57eba7..c64b71bf1 100644 --- a/src/Model/Types/Mail.hs +++ b/src/Model/Types/Mail.hs @@ -61,7 +61,7 @@ data NotificationTrigger | NTExamOfficeExamResultsChanged | NTCourseRegistered | NTQualification - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, Hashable, NFData) nullaryPathPiece ''NotificationTrigger $ camelToPathPiece' 1 @@ -70,7 +70,7 @@ pathPieceJSONKey ''NotificationTrigger newtype NotificationSettings = NotificationSettings { notificationAllowed :: NotificationTrigger -> Bool } - deriving (Generic, Typeable) + deriving (Generic) deriving newtype (Eq, Ord, Read, Show) deriving anyclass (NFData) @@ -95,7 +95,7 @@ derivePersistFieldJSON ''NotificationSettings newtype BounceSecret = BounceSecret (Digest (SHAKE128 64)) - deriving (Eq, Ord, Read, Show, Lift, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Lift, Generic) deriving newtype ( PersistField , Hashable, NFData , ByteArrayAccess @@ -109,14 +109,14 @@ instance PathPiece BounceSecret where fromPathPiece = fmap BounceSecret . digestFromByteString <=< either (const Nothing) Just . decodeBase32Unpadded . encodeUtf8 newtype MailContent = MailContent [Alternatives] - deriving (Eq, Show, Generic, Typeable) + deriving (Eq, Show, Generic) deriving newtype (ToJSON, FromJSON) deriving anyclass (Binary, NFData) derivePersistFieldJSON ''MailContent newtype MailContentReference = MailContentReference (Digest SHA3_512) - deriving (Eq, Ord, Read, Show, Lift, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Lift, Generic) deriving newtype ( PersistField , PathPiece, ToHttpApiData, FromHttpApiData, ToJSON, FromJSON , Hashable, NFData diff --git a/src/Model/Types/Markup.hs b/src/Model/Types/Markup.hs index b279b6682..c5555ceba 100644 --- a/src/Model/Types/Markup.hs +++ b/src/Model/Types/Markup.hs @@ -37,7 +37,7 @@ data MarkupFormat = MarkupMarkdown | MarkupHtml | MarkupPlaintext - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite, Binary, Hashable, NFData) nullaryPathPiece ''MarkupFormat $ camelToPathPiece' 1 pathPieceJSON ''MarkupFormat @@ -47,7 +47,7 @@ data StoredMarkup = StoredMarkup , markupInput :: LT.Text , markupOutput :: Html } - deriving (Read, Show, Generic, Typeable) + deriving (Read, Show, Generic) deriving anyclass (Binary, Hashable, NFData) htmlToStoredMarkup :: Html -> StoredMarkup diff --git a/src/Model/Types/Misc.hs b/src/Model/Types/Misc.hs index a666e1b94..d686c8e0a 100644 --- a/src/Model/Types/Misc.hs +++ b/src/Model/Types/Misc.hs @@ -63,7 +63,7 @@ data FavouriteReason | FavouriteParticipant | FavouriteManual | FavouriteCurrent - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, NFData) deriveJSON defaultOptions { constructorTagModifier = camelToPathPiece' 1 @@ -78,7 +78,7 @@ data Sex | SexMale | SexFemale | SexNotApplicable - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, NFData) deriveJSON defaultOptions { constructorTagModifier = camelToPathPiece' 1 @@ -129,7 +129,7 @@ instance Csv.FromField Sex where data TokenBucketIdent = TokenBucketInjectFiles | TokenBucketInjectFilesCount | TokenBucketPruneFiles | TokenBucketRechunkFiles - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, Hashable, NFData) nullaryPathPiece ''TokenBucketIdent $ camelToPathPiece' 2 diff --git a/src/Model/Types/Room.hs b/src/Model/Types/Room.hs index 047874241..0db43e887 100644 --- a/src/Model/Types/Room.hs +++ b/src/Model/Types/Room.hs @@ -19,7 +19,7 @@ data RoomReference { roomRefLink :: URI , roomRefInstructions :: Maybe StoredMarkup } - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) deriving anyclass (NFData) deriveJSON defaultOptions @@ -34,7 +34,7 @@ instance IsString RoomReference where data RoomReference' = RoomReferenceSimple' | RoomReferenceLink' - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''RoomReference' $ camelToPathPiece' 2 . over unpacked (dropSuffix "'") diff --git a/src/Model/Types/School.hs b/src/Model/Types/School.hs index 061ec006f..6e7cc4c15 100644 --- a/src/Model/Types/School.hs +++ b/src/Model/Types/School.hs @@ -22,7 +22,7 @@ data SchoolFunction | SchoolLecturer | SchoolEvaluation | SchoolExamOffice - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, Hashable, NFData) nullaryPathPiece ''SchoolFunction $ camelToPathPiece' 1 @@ -35,7 +35,7 @@ data SchoolAuthorshipStatementMode = SchoolAuthorshipStatementModeNone | SchoolAuthorshipStatementModeOptional | SchoolAuthorshipStatementModeRequired - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite, NFData) finitePathPiece ''SchoolAuthorshipStatementMode [ "no-statement", "optional", "required" ] -- avoid @none@ since it does not play nice with yesod-form (`selectField` etc.) @@ -46,7 +46,7 @@ pathPieceBinary ''SchoolAuthorshipStatementMode pathPieceHttpApiData ''SchoolAuthorshipStatementMode newtype AuthorshipStatementReference = AuthorshipStatementReference (Digest SHA3_512) - deriving (Eq, Ord, Read, Show, Lift, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Lift, Generic) deriving newtype ( PersistField , PathPiece, ToHttpApiData, FromHttpApiData, ToJSON, FromJSON , Hashable, NFData diff --git a/src/Model/Types/Security.hs b/src/Model/Types/Security.hs index d457db132..dbea81892 100644 --- a/src/Model/Types/Security.hs +++ b/src/Model/Types/Security.hs @@ -116,7 +116,7 @@ data AuthTag -- sortiert nach gewünschter Reihenfolge auf /authpreds, d.h. Prä | AuthDevelopment | AuthSupervisor | AuthFree - deriving (Eq, Ord, Enum, Bounded, Read, Show, Data, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Data, Generic) deriving anyclass (Universe, Finite, Hashable, NFData) nullaryPathPiece ''AuthTag $ camelToPathPiece' 1 @@ -180,7 +180,7 @@ _ReducedActiveAuthTags = iso toReducedActiveAuthTags fromReducedActiveAuthTags data PredLiteral a = PLVariable { plVar :: a } | PLNegated { plVar :: a } - deriving (Eq, Ord, Read, Show, Data, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Data, Generic) deriving anyclass (Hashable, Binary, NFData) makeLenses_ ''PredLiteral @@ -201,7 +201,7 @@ instance PathPiece a => PathPiece (PredLiteral a) where newtype PredDNF a = PredDNF { dnfTerms :: Set (NonNull (Set (PredLiteral a))) } - deriving (Eq, Ord, Read, Show, Data, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Data, Generic) deriving anyclass (Binary, Hashable, NFData) makeLenses_ ''PredDNF @@ -293,7 +293,7 @@ data UserGroupName | UserGroupExternalApis | UserGroupCrontab | UserGroupCustom { userGroupCustomName :: CI Text } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Hashable, NFData) instance PathPiece UserGroupName where diff --git a/src/Model/Types/Sheet.hs b/src/Model/Types/Sheet.hs index ee73b02d5..5760233eb 100644 --- a/src/Model/Types/Sheet.hs +++ b/src/Model/Types/Sheet.hs @@ -173,7 +173,7 @@ data SheetGroup = Arbitrary { maxParticipants :: Natural } | RegisteredGroups | NoGroups - deriving (Show, Read, Eq, Generic, Typeable) + deriving (Show, Read, Eq, Generic) deriving anyclass (NFData) deriveJSON defaultOptions ''SheetGroup derivePersistFieldJSON ''SheetGroup @@ -207,7 +207,7 @@ data UploadSpecificFile = UploadSpecificFile , specificFileEmptyOk :: Bool , specificFileMaxSize :: Maybe Natural } - deriving (Show, Read, Eq, Ord, Generic, Typeable) + deriving (Show, Read, Eq, Ord, Generic) deriving anyclass (NFData) instance ToJSON UploadSpecificFile where @@ -237,7 +237,7 @@ data UploadMode = NoUpload | UploadSpecific { uploadSpecificFiles :: NonNull (Set UploadSpecificFile) } - deriving (Show, Read, Eq, Ord, Generic, Typeable) + deriving (Show, Read, Eq, Ord, Generic) deriving anyclass (NFData) defaultExtensionRestriction :: Maybe (NonNull (Set Extension)) @@ -274,7 +274,7 @@ derivePersistFieldJSON ''UploadMode data UploadModeDescr = UploadModeAny | UploadModeSpecific | UploadModeNone - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance Universe UploadModeDescr instance Finite UploadModeDescr @@ -293,7 +293,7 @@ data SubmissionMode = SubmissionMode { submissionModeCorrector :: Bool , submissionModeUser :: Maybe UploadMode } - deriving (Show, Read, Eq, Ord, Generic, Typeable) + deriving (Show, Read, Eq, Ord, Generic) deriving anyclass (NFData) deriveJSON defaultOptions @@ -305,7 +305,7 @@ data SubmissionModeDescr = SubmissionModeCorrector | SubmissionModeUser | SubmissionModeBoth | SubmissionModeNone - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance Universe SubmissionModeDescr instance Finite SubmissionModeDescr @@ -416,7 +416,7 @@ data SheetAuthorshipStatementMode = SheetAuthorshipStatementModeDisabled | SheetAuthorshipStatementModeExam | SheetAuthorshipStatementModeEnabled - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, NFData) nullaryPathPiece ''SheetAuthorshipStatementMode $ camelToPathPiece' 4 diff --git a/src/Model/Types/Submission.hs b/src/Model/Types/Submission.hs index bdb785f1f..02dc9b313 100644 --- a/src/Model/Types/Submission.hs +++ b/src/Model/Types/Submission.hs @@ -150,7 +150,7 @@ data AuthorshipStatementSubmissionState = ASMissing | ASOldStatement | ASExists - deriving (Eq, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) deriving stock instance Ord AuthorshipStatementSubmissionState -- Larger roughly encodes better; summaries are taken with max diff --git a/src/Model/Types/Upload.hs b/src/Model/Types/Upload.hs index 4a3789e62..1a1221a9d 100644 --- a/src/Model/Types/Upload.hs +++ b/src/Model/Types/Upload.hs @@ -14,7 +14,7 @@ import System.IO.Unsafe newtype UploadNonce = UploadNonce Text - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving newtype (ToJSON, FromJSON, ToJSONKey, FromJSONKey, PathPiece) makeWrapped ''UploadNonce diff --git a/src/Model/Types/User.hs b/src/Model/Types/User.hs index ee7fd4a20..64cb539d9 100644 --- a/src/Model/Types/User.hs +++ b/src/Model/Types/User.hs @@ -16,7 +16,7 @@ data SystemFunction | SystemFaculty | SystemStudent | SystemPrinter - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, Hashable, NFData) nullaryPathPiece ''SystemFunction $ camelToPathPiece' 1 diff --git a/src/Network/Mail/Mime/Instances.hs b/src/Network/Mail/Mime/Instances.hs index fbc411dab..fe195fd37 100644 --- a/src/Network/Mail/Mime/Instances.hs +++ b/src/Network/Mail/Mime/Instances.hs @@ -58,7 +58,7 @@ instance Csv.DefaultOrdered Address where newtype MailHeaders = MailHeaders Headers - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData) instance ToJSON MailHeaders where diff --git a/src/ServantApi/ExternalApis/Type.hs b/src/ServantApi/ExternalApis/Type.hs index 4f7cc99ef..4d412190d 100644 --- a/src/ServantApi/ExternalApis/Type.hs +++ b/src/ServantApi/ExternalApis/Type.hs @@ -57,7 +57,7 @@ data ExternalApiCreationRequest = ExternalApiCreationRequest { eacrPublicKeys :: JwkSet , eacrBaseUrl :: BaseUrl , eacrConfig :: ExternalApiConfig - } deriving (Eq, Show, Generic, Typeable) + } deriving (Eq, Show, Generic) instance ToJSON ExternalApiCreationRequest where toJSON = genericToJSON externalApiCreationRequestAesonOptions @@ -70,7 +70,7 @@ instance ToSample ExternalApiCreationRequest data ExternalApiCreationResponse = ExternalApiCreationResponse { eacrId :: CryptoUUIDExternalApi , eacrInfo :: ExternalApiInfo - } deriving (Eq, Show, Generic, Typeable) + } deriving (Eq, Show, Generic) instance ToJSON ExternalApiCreationResponse where toJSON = genericToJSON externalApiCreationResponseAesonOptions @@ -86,7 +86,7 @@ instance ToSample ExternalApiCreationResponse where data ExternalApiCreationRestrictions = ExternalApiCreationRestrictions { eacrIdent :: Maybe UUID , eacrApiKinds :: NonNull (HashSet ExternalApiKind) - } deriving (Eq, Show, Generic, Typeable) + } deriving (Eq, Show, Generic) instance ToJSON ExternalApiCreationRestrictions where toJSON = genericToJSON externalApiCreationRestrictionsAesonOptions instance FromJSON ExternalApiCreationRestrictions where @@ -98,7 +98,7 @@ instance ToSample ExternalApiCreationRestrictions data ExternalApiPongResponse = ExternalApiPongResponse { eaprLastAlive :: UTCTime - } deriving (Eq, Show, Generic, Typeable) + } deriving (Eq, Show, Generic) instance ToJSON ExternalApiPongResponse where toJSON = genericToJSON externalApiPongResponseAesonOptions instance FromJSON ExternalApiPongResponse where @@ -109,7 +109,7 @@ instance ToSample ExternalApiPongResponse newtype ExternalApisList = ExternalApisList (HashMap CryptoUUIDExternalApi ExternalApiInfo) - deriving (Eq, Show, Generic, Typeable) + deriving (Eq, Show, Generic) deriving newtype (ToJSON, FromJSON, ToSchema) instance ToSample ExternalApisList where @@ -127,7 +127,7 @@ data ExternalApiInfo = ExternalApiInfo , eaiBaseUrl :: BaseUrl , eaiLastAlive :: UTCTime , eaiConfig :: ExternalApiConfig - } deriving (Eq, Show, Generic, Typeable) + } deriving (Eq, Show, Generic) instance ToJSON ExternalApiInfo where toJSON ExternalApiInfo{..} = object $ maybe id ((:) . ("ident" .=)) eaiIdent diff --git a/src/Settings.hs b/src/Settings.hs index 3d7ab8d08..d32833521 100644 --- a/src/Settings.hs +++ b/src/Settings.hs @@ -256,11 +256,11 @@ data JobMode = JobsLocal { jobsAcceptOffload :: Bool } { jobsAcceptOffload :: Bool , jobsWriteFakeLastExec :: Bool } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Hashable) data ApprootScope = ApprootUserGenerated | ApprootDefault - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite, Hashable) @@ -389,7 +389,7 @@ data TokenBucketConf = TokenBucketConf { tokenBucketDepth :: Word64 , tokenBucketInvRate :: NominalDiffTime , tokenBucketInitialValue :: Int64 - } deriving (Eq, Ord, Show, Generic, Typeable) + } deriving (Eq, Ord, Show, Generic) data VerpMode = VerpNone | Verp { verpPrefix :: Text, verpSeparator :: Char } @@ -398,19 +398,19 @@ data VerpMode = VerpNone data ARCConf w = ARCConf { arccMaximumGhost :: Int , arccMaximumWeight :: w - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) data PrewarmCacheConf = PrewarmCacheConf { precMaximumWeight :: Int , precStart, precEnd, precInhibit :: NominalDiffTime -- ^ Prewarming cache starts at @t - precStart@ and should be finished by @t - precEnd@; injecting from minio to database is inhibited from @t - precStart@ until @t - precStart + precInhibit@ , precSteps :: Natural , precMaxSpeedup :: Rational - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) data SettingBotMitigation = SettingBotMitigationOnlyLoggedInTableSorting | SettingBotMitigationUnauthorizedFormHoneypots - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) data LegalExternal = LegalExternal @@ -420,7 +420,7 @@ data LegalExternal = LegalExternal , externalTermsOfUse :: Text , externalPayments :: Text } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) makeLenses_ ''LegalExternal diff --git a/src/Settings/Cluster.hs b/src/Settings/Cluster.hs index fae6f42b3..eda47c076 100644 --- a/src/Settings/Cluster.hs +++ b/src/Settings/Cluster.hs @@ -57,7 +57,7 @@ data ClusterSettingsKey | ClusterVerpSecret | ClusterAuthKey | ClusterPersonalisedSheetFilesSeedKey - deriving (Eq, Ord, Enum, Bounded, Show, Read, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Show, Read, Generic) deriving anyclass (Universe, Finite, NFData) nullaryPathPiece ''ClusterSettingsKey $ camelToPathPiece' 1 diff --git a/src/Settings/Cluster/Volatile.hs b/src/Settings/Cluster/Volatile.hs index 6e1ea7263..de7a1db44 100644 --- a/src/Settings/Cluster/Volatile.hs +++ b/src/Settings/Cluster/Volatile.hs @@ -34,7 +34,7 @@ import Data.Proxy data VolatileClusterSettingsKey = ClusterVolatileQuickActionsEnabled - deriving (Eq, Ord, Enum, Bounded, Show, Read, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Show, Read, Generic) deriving anyclass (Hashable, Universe, Finite, NFData) nullaryPathPiece ''VolatileClusterSettingsKey $ camelToPathPiece' 2 diff --git a/src/Settings/Cookies.hs b/src/Settings/Cookies.hs index a28a2f0d5..88302c379 100644 --- a/src/Settings/Cookies.hs +++ b/src/Settings/Cookies.hs @@ -36,7 +36,7 @@ data CookieSettings = CookieSettings , cookieSameSite :: Maybe SameSiteOption , cookieHttpOnly , cookieSecure :: Maybe Bool - } deriving (Eq, Show, Generic, Typeable) + } deriving (Eq, Show, Generic) deriving anyclass (Hashable) instance FromJSON SameSiteOption where diff --git a/src/Settings/WellKnownFiles/TH.hs b/src/Settings/WellKnownFiles/TH.hs index 36a5faabb..3844bf664 100644 --- a/src/Settings/WellKnownFiles/TH.hs +++ b/src/Settings/WellKnownFiles/TH.hs @@ -131,7 +131,7 @@ mkWellKnown defLang wellKnownBase wellKnownLinks = do [ normalC (mkName $ fNameManip fName) [] | fName <- Set.toList fileNames ] - (pure $ derivClause Nothing [[t|Eq|], [t|Ord|], [t|Bounded|], [t|Enum|], [t|Read|], [t|Show|], [t|Generic|], [t|Typeable|]]) + (pure $ derivClause Nothing [[t|Eq|], [t|Ord|], [t|Bounded|], [t|Enum|], [t|Read|], [t|Show|], [t|Generic|]]) wellKnownFileNameMapSig = sigD nwellKnownFileNames [t|HashMap [Text] $(conT nWellKnownFileName)|] diff --git a/src/Utils.hs b/src/Utils.hs index 418178de7..48a067438 100644 --- a/src/Utils.hs +++ b/src/Utils.hs @@ -183,7 +183,7 @@ guardAuthResult (Unauthorized t) = permissionDenied t guardAuthResult Authorized = return () data UnsupportedAuthPredicate tag route = UnsupportedAuthPredicate tag route - deriving (Eq, Ord, Typeable, Show) + deriving (Eq, Ord, Show) instance (Show tag, Typeable tag, Show route, Typeable route) => Exception (UnsupportedAuthPredicate tag route) unsupportedAuthPredicate :: ExpQ @@ -202,7 +202,7 @@ maybeAttribute a c (Just v) = [(a,c v)] newtype PrettyValue = PrettyValue { unPrettyValue :: Value } - deriving (Eq, Read, Show, Generic, Typeable, Data, TH.Lift) + deriving (Eq, Read, Show, Generic, Data, TH.Lift) deriving newtype (Hashable, IsString, FromJSON, ToJSON, NFData) instance ToContent PrettyValue where @@ -217,7 +217,7 @@ toPrettyJSON = PrettyValue . toJSON newtype YamlValue = YamlValue { unYamlValue :: Value } - deriving (Eq, Read, Show, Generic, Typeable, Data, TH.Lift) + deriving (Eq, Read, Show, Generic, Data, TH.Lift) deriving newtype (Hashable, IsString, FromJSON, ToJSON, NFData) instance ToContent YamlValue where @@ -1421,7 +1421,7 @@ waiCustomHeader ident payload = (CI.mk . encodeUtf8 $ toPathPiece ident, toHeade ------------------ data ContentDisposition = ContentInline | ContentAttachment - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance Universe ContentDisposition instance Finite ContentDisposition nullaryPathPiece ''ContentDisposition $ camelToPathPiece' 1 @@ -1451,7 +1451,7 @@ setCSPSandbox = replaceOrAddHeader "Content-Security-Policy" "sandbox;" ------------------ data SecretBoxEncoding = SecretBoxShort | SecretBoxPretty - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe SecretBoxEncoding instance Finite SecretBoxEncoding @@ -1490,7 +1490,7 @@ data EncodedSecretBoxException | EncodedSecretBoxCouldNotDecodeNonce | EncodedSecretBoxCouldNotOpenSecretBox | EncodedSecretBoxCouldNotDecodePlaintext !String - deriving (Eq, Ord, Show, Read, Generic, Typeable) + deriving (Eq, Ord, Show, Read, Generic) instance Exception EncodedSecretBoxException encodedSecretBoxOpen' :: (FromJSON a, MonadError EncodedSecretBoxException m) @@ -1550,7 +1550,7 @@ data EncodedAuthException | EncodedAuthCouldNotDecodeAuthenticator | EncodedAuthInvalidAuthenticator | EncodedAuthCouldNotDecodePlaintext !String - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Exception) encodedAuthVerify' :: (FromJSON a, MonadError EncodedAuthException m) @@ -1766,7 +1766,7 @@ mpreviews a f = hoistMaybe =<< previews a f ------------- newtype MergeHashMap k v = MergeHashMap { unMergeHashMap :: HashMap k v } - deriving (Show, Generic, Typeable, Data) + deriving (Show, Generic, Data) deriving newtype ( Eq, Ord, Hashable , Functor, Foldable, NFData , ToJSON @@ -1820,7 +1820,7 @@ instance (Eq k, Hashable k, FromJSON v, FromJSONKey k, Semigroup v) => FromJSON newtype MergeMap k v = MergeMap { unMergeMap :: Map k v } - deriving (Show, Generic, Typeable, Data) + deriving (Show, Generic, Data) deriving newtype ( Eq, Ord , Functor, Foldable, NFData , ToJSON diff --git a/src/Utils/ARC.hs b/src/Utils/ARC.hs index 22712a9c6..c8086c8f1 100644 --- a/src/Utils/ARC.hs +++ b/src/Utils/ARC.hs @@ -53,7 +53,7 @@ instance Show NFDynamic where newtype ARCTick = ARCTick { _getARCTick :: Word64 } - deriving (Eq, Ord, Show, Typeable) + deriving (Eq, Ord, Show) deriving newtype (NFData) makeLenses ''ARCTick @@ -267,7 +267,7 @@ insertARC k newVal = (runIdentity .) . arcAlterF k (const $ pure newVal) newtype ARCHandle k w v = ARCHandle { _getARCHandle :: IORef (ARC k w v, ARCTick) } - deriving (Eq, Typeable) + deriving (Eq) type DynARCHandle k w = ARCHandle (SomeTypeRep, k) w NFDynamic diff --git a/src/Utils/Cookies/Registered.hs b/src/Utils/Cookies/Registered.hs index 5e36df4b0..f95bcd448 100644 --- a/src/Utils/Cookies/Registered.hs +++ b/src/Utils/Cookies/Registered.hs @@ -36,7 +36,7 @@ import Data.Monoid (Last(..)) data RegisteredCookie = CookieSession | CookieXSRFToken | CookieLang | CookieSystemMessageState | CookieActiveAuthTags - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite, Hashable) nullaryPathPiece ''RegisteredCookie $ toUpper . camelToPathPiece' 1 @@ -63,7 +63,7 @@ _CookieEncoded = prism' cEncode cDecode = b64Prefix <> Text.decodeUtf8 (Base64.encode $ Text.encodeUtf8 t) newtype RegisteredCookieCurrentValue = RegisteredCookieCurrentValue { getRegisteredCookieCurrentValue :: Maybe Text } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) -- Primitive diff --git a/src/Utils/Csv.hs b/src/Utils/Csv.hs index 048670f5d..fd9bc310d 100644 --- a/src/Utils/Csv.hs +++ b/src/Utils/Csv.hs @@ -58,7 +58,6 @@ import Data.Char (ord) import Control.Monad.Fail -deriving instance Typeable CsvParseError instance Exception CsvParseError @@ -103,7 +102,7 @@ lsfHeaderTranslate = HashMap.fromList . over (traverse . _1) lsfHeaderTranslate' data CsvRendered = CsvRendered { csvRenderedHeader :: Header , csvRenderedData :: [NamedRecord] - } deriving (Eq, Read, Show, Generic, Typeable) + } deriving (Eq, Read, Show, Generic) toCsvRendered :: forall mono. ( ToNamedRecord (Element mono) @@ -135,7 +134,7 @@ csvRenderedToXlsx sheetName CsvRendered{..} = def & Xlsx.atSheet sheetName ?~ (d newtype CsvSemicolonList a = CsvSemicolonList { unCsvSemicolonList :: [a] } - deriving stock (Read, Show, Generic, Typeable) + deriving stock (Read, Show, Generic) deriving newtype (Eq, Ord) instance ToField a => ToField (CsvSemicolonList a) where diff --git a/src/Utils/DateTime.hs b/src/Utils/DateTime.hs index 456bf9d0f..ca48f6b2c 100644 --- a/src/Utils/DateTime.hs +++ b/src/Utils/DateTime.hs @@ -108,7 +108,7 @@ instance HasLocalTime TimeOfDay where toLocalTime = LocalTime systemEpochDay newtype DateTimeFormat = DateTimeFormat { unDateTimeFormat :: String } - deriving (Eq, Ord, Read, Show, Data, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Data, Generic) deriving newtype (ToJSON, FromJSON, PersistField, IsString) deriving anyclass (NFData) @@ -118,7 +118,7 @@ instance PersistFieldSql DateTimeFormat where instance Hashable DateTimeFormat data SelDateTimeFormat = SelFormatDate | SelFormatTime | SelFormatDateTime - deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Generic) deriving anyclass (Universe, Finite, Hashable, NFData) nullaryPathPiece ''SelDateTimeFormat $ camelToPathPiece' 2 diff --git a/src/Utils/Failover.hs b/src/Utils/Failover.hs index 699d89520..26b695471 100644 --- a/src/Utils/Failover.hs +++ b/src/Utils/Failover.hs @@ -62,11 +62,11 @@ data FailoverMode = FailoverUnlimited | FailoverLimited Natural | FailoverNone - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data FailoverException = FailoverNoItemsAvailable - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Exception) failoverLabels :: MonadIO m => Failover a -> m [Text] diff --git a/src/Utils/Form.hs b/src/Utils/Form.hs index 6e7c5c8bb..ade2a0b6a 100644 --- a/src/Utils/Form.hs +++ b/src/Utils/Form.hs @@ -372,11 +372,11 @@ data ButtonMessage = MsgAmbiguousButtons | MsgWrongButtonValue | MsgMultipleButtonValues | MsgBtnFormOutdated - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) -- | Default button for submitting. Required in Foundation for Login, other Buttons defined in Handler.Utils.Form data ButtonSubmit = BtnSubmit - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe ButtonSubmit instance Finite ButtonSubmit @@ -796,7 +796,7 @@ daysField = convertField fromDays toDays fractionalField data SecretJSONFieldException = SecretJSONFieldDecryptFailure - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) instance Exception SecretJSONFieldException secretJsonField' :: ( ToJSON a, FromJSON a @@ -990,7 +990,7 @@ radioGroupField optMsg mkOpts = Field{..} |] data UrlFieldMessage = UrlFieldCouldNotParseAbsolute - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) urlField' :: ( Monad m @@ -1021,7 +1021,7 @@ urlFieldText = urlField' (pack . ($ mempty) . uriToString id) id ----------- data FormSubmitType = FormNoSubmit | FormSubmit | FormDualSubmit | FormAutoSubmit - deriving (Eq, Ord, Enum, Bounded, Read, Show, Typeable, Generic) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe FormSubmitType instance Finite FormSubmitType @@ -1033,7 +1033,7 @@ data FormSettings site = forall p. PathPiece p => FormSettings , formAttrs :: [(Text, Text)] , formSubmit :: FormSubmitType , formAnchor :: Maybe p - } deriving (Typeable) + } instance Default (FormSettings site) where def = FormSettings @@ -1064,7 +1064,7 @@ data FormLayout = FormStandard | FormLogin -- ^ Like `FormStandard` but without | FormDBTableFilter | FormDBTablePagesize | FormDBTableCsvImport | FormDBTableCsvExport | FormWorkflowDataset | FormVertical - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) data AFormMessage = MsgAFormFieldRequiredTip @@ -1074,7 +1074,7 @@ data AFormMessage = MsgAFormFieldRequiredTip | MsgAFormHoneypotName | MsgAFormHoneypotNameTip | MsgAFormHoneypotNamePlaceholder | MsgAFormHoneypotComment | MsgAFormHoneypotCommentPlaceholder | MsgAFormHoneypotFilled - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) _HoneypotFieldId :: Prism' Text () _HoneypotFieldId = only $ tshow '_HoneypotFieldId diff --git a/src/Utils/Frontend/I18n.hs b/src/Utils/Frontend/I18n.hs index 4b2f4e52f..38b401b7e 100644 --- a/src/Utils/Frontend/I18n.hs +++ b/src/Utils/Frontend/I18n.hs @@ -34,7 +34,7 @@ data FrontendMessage = MsgFilesSelected | MsgAsyncFormFailure | MsgFileTooLarge | MsgFileTooLargeMultiple - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) instance Universe FrontendMessage instance Finite FrontendMessage instance Hashable FrontendMessage diff --git a/src/Utils/Frontend/Notification.hs b/src/Utils/Frontend/Notification.hs index 9e0a05436..13b2629ba 100644 --- a/src/Utils/Frontend/Notification.hs +++ b/src/Utils/Frontend/Notification.hs @@ -21,7 +21,7 @@ import Control.Lens.Extras (is) data NotificationType = NotificationNarrow | NotificationBroad - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) makePrisms ''NotificationType diff --git a/src/Utils/Holidays.hs b/src/Utils/Holidays.hs index 999b5c37d..649d0f16c 100644 --- a/src/Utils/Holidays.hs +++ b/src/Utils/Holidays.hs @@ -30,7 +30,7 @@ import Data.Time.Calendar.Easter (gregorianEaster) -- | Some areas / companies within Germany. -- | The datatype is not yet complete. data Feiertagsgebiet = Deutschland | Hessen | Bayern | Munich | Fraport - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) -- | List the bank holidays for the given year >= 1995, in ascending order. diff --git a/src/Utils/HttpConditional.hs b/src/Utils/HttpConditional.hs index d01d704c0..07fa398db 100644 --- a/src/Utils/HttpConditional.hs +++ b/src/Utils/HttpConditional.hs @@ -77,7 +77,7 @@ parseUrlPiece' p = first pack . A.parseOnly (p <* A.endOfInput) newtype ByteRangesSpecifier = ByteRangesSpecifier (NonNull (Set ByteRangeSpecification)) - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) data ByteRangeSpecification = ByteRangeSpecification { byteRangeSpecFirstPosition :: Word64 @@ -86,7 +86,7 @@ data ByteRangeSpecification | ByteRangeSuffixSpecification { byteRangeSpecSuffixLength :: Word64 } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance FromHttpApiData ByteRangesSpecifier where parseUrlPiece = parseUrlPiece' parser @@ -110,12 +110,12 @@ data ByteContentRangeSpecification = ByteContentRangeSpecification { byteRangeResponse :: Maybe ByteRangeResponseSpecification , byteRangeInstanceLength :: Maybe Word64 - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) data ByteRangeResponseSpecification = ByteRangeResponseSpecification { byteRangeResponseSpecFirstPosition , byteRangeResponseSpecLastPosition :: Word64 - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) instance ToHttpApiData ByteContentRangeSpecification where toUrlPiece ByteContentRangeSpecification{..} = maybe "*" encByteRangeResponse byteRangeResponse <> "/" <> maybe "*" encByteRangeInstanceLength byteRangeInstanceLength @@ -143,7 +143,7 @@ instance IsRangeUnit ByteRangesSpecifier ByteContentRangeSpecification where data ETag = WeakETag { unETag :: Text } | StrongETag { unETag :: Text } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) parseETag :: A.Parser ETag parseETag = do @@ -173,10 +173,10 @@ data RepresentationConditionalInformation = RepresentationConditionalInformation , representationLastModified :: Maybe UTCTime , representationExists :: Bool , requestedActionAlreadySucceeded :: Maybe Status - } deriving (Eq, Ord, Show, Generic, Typeable) + } deriving (Eq, Ord, Show, Generic) newtype ETagMatch = ETagMatch (Set ETag) - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving newtype (Semigroup, Monoid) instance FromHttpApiData ETagMatch where @@ -192,13 +192,13 @@ parseHTTPTime = do maybe (fail "Could not parse time specification") return . parseTimeM True defaultTimeLocale "%a, %d %b %Y %X %Z" $ unpack inpT newtype ModifiedMatch = ModifiedMatch UTCTime - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance FromHttpApiData ModifiedMatch where parseUrlPiece = parseUrlPiece' $ ModifiedMatch <$> parseHTTPTime data IfRange = IfRangeETag ETag | IfRangeModified UTCTime - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance FromHttpApiData IfRange where parseUrlPiece = parseUrlPiece' parseIfRange @@ -207,7 +207,7 @@ instance FromHttpApiData IfRange where parseIfRangeModified = IfRangeModified <$> parseHTTPTime newtype RangeRequest req = RangeRequest { unRangeRequest :: req } - deriving (Generic, Typeable) + deriving (Generic) deriving newtype (Eq, Ord, Read, Show) instance IsRangeUnit req resp => FromHttpApiData (RangeRequest req) where @@ -220,14 +220,14 @@ instance IsRangeUnit req resp => FromHttpApiData (RangeRequest req) where either (fail . unpack) (return . RangeRequest) $ parseUrlPiece t newtype RangeResponse resp = RangeResponse resp - deriving (Generic, Typeable) + deriving (Generic) deriving newtype (Eq, Ord, Read, Show) instance IsRangeUnit req resp => ToHttpApiData (RangeResponse resp) where toUrlPiece (RangeResponse r) = rangeUnit (Proxy @req) (Proxy @resp) <> " " <> toUrlPiece r newtype MultipartBoundary = MultipartBoundary ByteString - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance ToHttpApiData MultipartBoundary where toUrlPiece (MultipartBoundary bs) = decodeUtf8 $ Base64.encodeUnpadded bs diff --git a/src/Utils/I18n.hs b/src/Utils/I18n.hs index 4f45f0a29..fcc9b288f 100644 --- a/src/Utils/I18n.hs +++ b/src/Utils/I18n.hs @@ -60,7 +60,7 @@ data I18n a = I18n { i18nFallback :: a , i18nFallbackLang :: Maybe Lang , i18nTranslations :: Map Lang a - } deriving (Eq, Ord, Read, Show, Functor, Foldable, Traversable, Data, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Functor, Foldable, Traversable, Data, Generic) deriving anyclass (MonoFunctor, MonoFoldable, MonoTraversable, Binary, NFData) type instance Element (I18n a) = a diff --git a/src/Utils/Icon.hs b/src/Utils/Icon.hs index b32b4b38c..23cd8d29f 100644 --- a/src/Utils/Icon.hs +++ b/src/Utils/Icon.hs @@ -105,7 +105,7 @@ data Icon | IconLetter | IconAt | IconSupervisor - deriving (Eq, Ord, Enum, Bounded, Show, Read, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Show, Read, Generic) deriving anyclass (Universe, Finite, NFData) iconText :: Icon -> Text diff --git a/src/Utils/LRU.hs b/src/Utils/LRU.hs index a9467673c..8b8daa079 100644 --- a/src/Utils/LRU.hs +++ b/src/Utils/LRU.hs @@ -25,7 +25,7 @@ import Control.Lens newtype LRUTick = LRUTick { _getLRUTick :: Word64 } - deriving (Eq, Ord, Show, Typeable) + deriving (Eq, Ord, Show) deriving newtype (NFData) makeLenses ''LRUTick @@ -149,7 +149,7 @@ timeoutLRU t oldLRU@LRU{..} = oldLRU evictedWeight = sumOf (folded . _3 . _2) evicted newtype LRUHandle k t w v = LRUHandle { _getLRUHandle :: IORef (LRU k t w v, LRUTick) } - deriving (Eq, Typeable) + deriving (Eq) initLRUHandle :: forall k t w v m. ( MonadIO m diff --git a/src/Utils/Message.hs b/src/Utils/Message.hs index e8b7294cb..2c895f52b 100644 --- a/src/Utils/Message.hs +++ b/src/Utils/Message.hs @@ -34,7 +34,7 @@ import Text.HTML.SanitizeXSS (sanitizeBalance) data MessageStatus = Error | Warning | Info | Success | Nonactive - deriving (Eq, Ord, Enum, Bounded, Show, Read, Lift, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Show, Read, Lift, Generic) deriving anyclass (Universe, Finite, NFData) instance Default MessageStatus where @@ -48,7 +48,7 @@ nullaryPathPiece ''MessageStatus camelToPathPiece derivePersistField "MessageStatus" newtype UnknownMessageStatus = UnknownMessageStatus Text -- kann das weg? - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance Exception UnknownMessageStatus diff --git a/src/Utils/Metrics.hs b/src/Utils/Metrics.hs index 22ca1f111..e1f07dfc4 100644 --- a/src/Utils/Metrics.hs +++ b/src/Utils/Metrics.hs @@ -277,7 +277,7 @@ relabel l s (SampleGroup i t ss) = SampleGroup i t . flip map ss $ \(Sample k lb data ARCMetrics = ARCMetrics data ARCLabel = ARCFileSource | ARCMemcachedLocal - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''ARCLabel $ camelToPathPiece' 1 @@ -312,7 +312,7 @@ arcMetrics lbl ah = Metric $ return (ARCMetrics, collectARCMetrics) data LRUMetrics = LRUMetrics data LRULabel = LRUFileSourcePrewarm - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''LRULabel $ camelToPathPiece' 1 @@ -364,7 +364,7 @@ injectInhibitMetrics tvar = Metric $ return (InjectInhibitMetrics, collectInject data PoolMetrics = PoolMetrics data PoolLabel = PoolDatabaseConnections - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''PoolLabel $ camelToPathPiece' 1 @@ -411,7 +411,7 @@ databaseConnDuration = unsafeRegister . vector "label" $ histogram info buckets data DBConnUseState = DBConnUseState { dbConnUseStart :: !TimeSpec , dbConnUseLabel :: !CallStack - } deriving (Show, Typeable) + } deriving (Show) onUseDBConn :: (MonadIO m, MonadLogger m) => CallStack -> a -> m DBConnUseState onUseDBConn dbConnUseLabel _ = do @@ -430,7 +430,7 @@ onReleaseDBConn DBConnUseState{..} _ = liftIO $ do withLabel databaseConnDuration lbl $ flip observe diff data AuthTagEvalOutcome = OutcomeAuthorized | OutcomeUnauthorized | OutcomeAuthenticationRequired | OutcomeException - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving (Universe, Finite) nullaryPathPiece ''AuthTagEvalOutcome $ camelToPathPiece' 1 @@ -536,7 +536,7 @@ data LoginOutcome | LoginInvalidCredentials | LoginADInvalidCredentials | LoginError - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''LoginOutcome $ camelToPathPiece' 1 @@ -551,7 +551,7 @@ registerJobHeldLocksCount :: MonadIO m => TVar (Set QueuedJobId) -> m () registerJobHeldLocksCount = liftIO . void . register . jobHeldLocksCount data FileChunkStorage = StorageMinio | StorageDB | StorageARC | StoragePrewarm - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''FileChunkStorage $ camelToPathPiece' 1 diff --git a/src/Utils/NTop.hs b/src/Utils/NTop.hs index 9105d6fd8..9d65f5093 100644 --- a/src/Utils/NTop.hs +++ b/src/Utils/NTop.hs @@ -10,7 +10,7 @@ import ClassyPrelude -- | treat Nothing as Top for Ord (Maybe a); default implementation treats Nothing as bottom newtype NTop a = NTop { nBot :: a } - deriving (Read, Show, Generic, Typeable) + deriving (Read, Show, Generic) deriving newtype (Eq) instance Ord a => Ord (NTop (Maybe a)) where diff --git a/src/Utils/Pool.hs b/src/Utils/Pool.hs index ffa536fd0..7b025f8af 100644 --- a/src/Utils/Pool.hs +++ b/src/Utils/Pool.hs @@ -45,7 +45,7 @@ import Utils.NTop data PoolResourceIdent' c = PoolResourceIdent Int c - deriving (Eq, Ord, Show, Typeable) + deriving (Eq, Ord, Show) data Pool' m c' c a = Pool diff --git a/src/Utils/Postgresql.hs b/src/Utils/Postgresql.hs index c27df3731..2d9d87544 100644 --- a/src/Utils/Postgresql.hs +++ b/src/Utils/Postgresql.hs @@ -23,7 +23,7 @@ import UnliftIO.Exception (bracket) data PostgresqlChannel = ChannelJobOffload | ChannelMemcachedLocalInvalidation - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''PostgresqlChannel $ camelToPathPiece' 1 diff --git a/src/Utils/Route.hs b/src/Utils/Route.hs index bee617d51..8c73c232f 100644 --- a/src/Utils/Route.hs +++ b/src/Utils/Route.hs @@ -44,8 +44,7 @@ instance (HasRoute site a, PathPiece b) => HasRoute site (Fragment a b) where fragRoute :: forall a1 a2 b'. Lens (Fragment a1 b') (Fragment a2 b') a1 a2 fragRoute = lens (\(a :#: _) -> a) (\(_ :#: f) a' -> a' :#: f) -data SomeRoute site = forall url. HasRoute site url => SomeRoute url - deriving (Typeable) +data SomeRoute site = forall url. HasRoute site url => SomeRoute url instance RedirectUrl site (SomeRoute site) where toTextUrl (SomeRoute url) = toTextUrl url diff --git a/src/Utils/Session.hs b/src/Utils/Session.hs index 80bd1c3ad..ef104b29c 100644 --- a/src/Utils/Session.hs +++ b/src/Utils/Session.hs @@ -20,7 +20,7 @@ data SessionKey = SessionActiveAuthTags | SessionInactiveAuthTags | SessionLang | SessionError | SessionFiles - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite) nullaryPathPiece ''SessionKey $ camelToPathPiece' 1 diff --git a/src/Utils/Sql.hs b/src/Utils/Sql.hs index 4730844c0..9e14da4e8 100644 --- a/src/Utils/Sql.hs +++ b/src/Utils/Sql.hs @@ -52,7 +52,7 @@ fromExceptionWrapped _ = Nothing data SerializableMode = Serializable | SerializableReadOnly | SerializableReadOnlyDeferrable - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) deriving anyclass (Universe, Finite) setSerializable :: forall m a. (MonadLogger m, MonadMask m, MonadIO m, ReadLogSettings (SqlPersistT m)) => SqlPersistT m a -> SqlPersistT m a diff --git a/src/Utils/SystemMessage.hs b/src/Utils/SystemMessage.hs index c870eb21c..5473d0182 100644 --- a/src/Utils/SystemMessage.hs +++ b/src/Utils/SystemMessage.hs @@ -39,7 +39,7 @@ data UserSystemMessageState = UserSystemMessageState { userSystemMessageShown , userSystemMessageHidden , userSystemMessageUnhidden :: Maybe UTCTime - } deriving (Eq, Ord, Read, Show, Generic, Typeable) + } deriving (Eq, Ord, Read, Show, Generic) deriveJSON defaultOptions { fieldLabelModifier = camelToPathPiece' 3 diff --git a/src/Utils/TH.hs b/src/Utils/TH.hs index b06caf7a2..189d78b45 100644 --- a/src/Utils/TH.hs +++ b/src/Utils/TH.hs @@ -223,7 +223,7 @@ mkI18nWidgetEnum (splitCamel -> namebase) basename = do , conT ''Enum , conT ''Bounded , conT ''Generic - , conT ''Typeable + -- , conT ''Typeable ] , derivClause (Just AnyclassStrategy) [ conT ''Universe diff --git a/src/Utils/Tokens.hs b/src/Utils/Tokens.hs index 2a3c6b771..e66de2cd1 100644 --- a/src/Utils/Tokens.hs +++ b/src/Utils/Tokens.hs @@ -109,7 +109,7 @@ data BearerTokenException | BearerTokenUnsecured -- ^ `Jwt` is insufficiently secured (unsigned and not encrypted) | BearerTokenInvalidFormat String -- ^ Content of the `Jwt` could not be parsed as a `BearerToken` | BearerTokenExpired | BearerTokenNotStarted | BearerTokenWrongAudience - deriving (Eq, Show, Generic, Typeable) + deriving (Eq, Show, Generic) deriving anyclass (Exception) decodeBearer :: forall site m. @@ -183,7 +183,7 @@ data UploadTokenException | UploadTokenUnsecured -- ^ `Jwt` is insufficiently secured (unsigned and not encrypted) | UploadTokenInvalidFormat String -- ^ Content of the `Jwt` could not be parsed as a `UploadToken` | UploadTokenExpired | UploadTokenNotStarted | UploadTokenWrongAudience - deriving (Eq, Show, Generic, Typeable) + deriving (Eq, Show, Generic) deriving anyclass (Exception) decodeUploadToken :: forall m. diff --git a/src/Utils/Users.hs b/src/Utils/Users.hs index 2629aaba5..5c83567e7 100644 --- a/src/Utils/Users.hs +++ b/src/Utils/Users.hs @@ -13,7 +13,7 @@ module Utils.Users import Import data AuthenticationKind = AuthKindLDAP | AuthKindPWHash | AuthKindNoLogin - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable, Universe, Finite) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Universe, Finite) --instance Universe AuthenticationKind --instance Finite AuthenticationKind embedRenderMessage ''UniWorX ''AuthenticationKind id diff --git a/src/Utils/VolatileClusterSettings.hs b/src/Utils/VolatileClusterSettings.hs index aebe76d04..dc3f48889 100644 --- a/src/Utils/VolatileClusterSettings.hs +++ b/src/Utils/VolatileClusterSettings.hs @@ -19,7 +19,7 @@ import qualified Data.Aeson.Types as Aeson data VolatileClusterSettingException = VolatileClusterSettingExceptionNoParse - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Exception) diff --git a/src/Web/ServerSession/Backend/Persistent/Memcached.hs b/src/Web/ServerSession/Backend/Persistent/Memcached.hs index 24791802a..7c090772e 100644 --- a/src/Web/ServerSession/Backend/Persistent/Memcached.hs +++ b/src/Web/ServerSession/Backend/Persistent/Memcached.hs @@ -65,14 +65,14 @@ data MemcachedSqlStorageException | MemcachedSqlStorageAEADCouldNotDecodeNonce | MemcachedSqlStorageAEADCouldNotOpenAEAD | MemcachedSqlStorageAEADCouldDecodeMemcachedSqlSession - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance Exception MemcachedSqlStorageException data MemcachedSqlSession sess = MemcachedSqlSession { mcdSqlSessionAuthId :: Maybe AuthId , mcdSqlSessionData :: Decomposed sess , mcdSqlSessionCreatedAt, mcdSqlSessionAccessedAt :: UTCTime - } deriving (Generic, Typeable) + } deriving (Generic) deriving instance Eq (Decomposed sess) => Eq (MemcachedSqlSession sess) deriving instance Ord (Decomposed sess) => Ord (MemcachedSqlSession sess) deriving instance Read (Decomposed sess) => Read (MemcachedSqlSession sess) diff --git a/src/Web/ServerSession/Frontend/Yesod/Jwt.hs b/src/Web/ServerSession/Frontend/Yesod/Jwt.hs index c1ce107c2..fb4dd49b5 100644 --- a/src/Web/ServerSession/Frontend/Yesod/Jwt.hs +++ b/src/Web/ServerSession/Frontend/Yesod/Jwt.hs @@ -59,7 +59,7 @@ data ServerSessionJwtException | SessionTokenUnsecured | SessionTokenInvalidFormat String | SessionTokenExpired | SessionTokenNotStarted | SessionTokenWrongAudience - deriving (Eq, Show, Generic, Typeable) + deriving (Eq, Show, Generic) instance Exception ServerSessionJwtException diff --git a/src/Yesod/Servant.hs b/src/Yesod/Servant.hs index 06a9c5e4b..1c08c46fc 100644 --- a/src/Yesod/Servant.hs +++ b/src/Yesod/Servant.hs @@ -244,7 +244,7 @@ instance (HasRoute sub, KnownNat major, KnownNat minor, KnownNat patch) => HasRo data ServantApi (proxy :: k) = ServantApi - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (Hashable) getServantApi :: forall master proxy. master -> ServantApi proxy @@ -425,7 +425,7 @@ class HasServantHandlerContext site where getSCtxRequest :: ServantHandlerContextFor site -> Request newtype ServantHandlerFor site a = ServantHandlerFor { unServantHandlerFor :: ServantHandlerContextFor site -> Handler a } - deriving (Generic, Typeable) + deriving (Generic) deriving (Monad, Functor, Applicative, MonadIO, MonadThrow, MonadCatch, MonadMask, MonadBase IO, MonadBaseControl IO, MonadError ServerError) via (ReaderT (ServantHandlerContextFor site) Handler) instance MonadUnliftIO (ServantHandlerFor site) where @@ -545,7 +545,7 @@ instance (ServantLog site, HasServantHandlerContext site) => MonadLoggerIO (Serv newtype PathPieceHttpApiData a = PathPieceHttpApiData { unPathPieceHttpApiData :: a } - deriving (Eq, Ord, Read, Show, Generic, Typeable, Data) + deriving (Eq, Ord, Read, Show, Generic, Data) deriving newtype (PathPiece, ToParamSchema) instance PathPiece a => FromHttpApiData (PathPieceHttpApiData a) where parseUrlPiece = maybe (Left "Could not convert from HttpApiData via PathPiece") Right . fromPathPiece diff --git a/test/Handler/Utils/ZipSpec.hs b/test/Handler/Utils/ZipSpec.hs index 85a4eb8ad..f275d4218 100644 --- a/test/Handler/Utils/ZipSpec.hs +++ b/test/Handler/Utils/ZipSpec.hs @@ -25,13 +25,13 @@ import Data.Universe data ZipConsumptionStrategy = ZipConsumeInterleaved | ZipConsumeBuffered - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite) data ZipProductionStrategy = ZipProduceInterleaved | ZipProduceBuffered - deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic) deriving anyclass (Universe, Finite) diff --git a/test/PandocSpec.hs b/test/PandocSpec.hs index 649d86313..c18e0ce2a 100644 --- a/test/PandocSpec.hs +++ b/test/PandocSpec.hs @@ -19,10 +19,10 @@ import Text.Pandoc.Arbitrary () -- Instance Arbitrary Meta is somewhat useless, as it always generates the same 3 keys. newtype ArbitraryMeta = ArbitraryMeta { unArbitraryMeta :: Meta } - deriving newtype (Eq, Ord, Semigroup, Monoid, Show, Read, Typeable) + deriving newtype (Eq, Ord, Semigroup, Monoid, Show, Read) newtype ArbitraryPandoc = ArbitraryPandoc { unArbitraryPandoc :: Pandoc } - deriving newtype (Eq, Ord, Show, Read, Typeable) + deriving newtype (Eq, Ord, Show, Read) newtype ArbitraryMapText a = ArbitraryMapText { unArbitraryMapText :: [(Text, a)] } diff --git a/test/TestImport.hs b/test/TestImport.hs index dfea29294..4024d876f 100644 --- a/test/TestImport.hs +++ b/test/TestImport.hs @@ -171,13 +171,13 @@ lawsCheckHspec p = parallel . describe (show $ typeRep p) . mapM_ (checkHspec . newtype ServantExample a = ServantExample { unServantExample :: ReaderT ServantExampleEnv (ExceptT ClientError Wai.Session) a - } deriving stock (Generic, Typeable) + } deriving stock (Generic) deriving newtype (Functor, Applicative, Monad, MonadIO, MonadReader ServantExampleEnv, MonadError ClientError, MonadThrow, MonadCatch, MonadState Wai.ClientState) data ServantExampleEnv = ServantExampleEnv { yseBaseUrl :: BaseUrl , yseMakeClientRequest :: BaseUrl -> Servant.Request -> IO Wai.Request - } deriving (Generic, Typeable) + } deriving (Generic) runServantExample :: (Route (ServantApi proxy) -> Route UniWorX) -> ServantExample a -> YesodExample UniWorX a runServantExample apiR (ServantExample act) = do diff --git a/translate.hs b/translate.hs index 8b60e3e39..ef8cdb0e1 100755 --- a/translate.hs +++ b/translate.hs @@ -48,7 +48,7 @@ import Data.Foldable import Data.Data (Data) import GHC.Generics (Generic) -import Data.Typeable (Typeable) +-- import Data.Typeable (Typeable) import System.FilePath hiding (combine) import System.Directory @@ -78,7 +78,7 @@ data Translate , i18nRequiredLangs :: [String] , i18nSourceLangs :: [String] } - deriving (Eq, Ord, Read, Show, Generic, Typeable, Data) + deriving (Eq, Ord, Read, Show, Generic, Data) $(cmdArgsQuote [d| messages = TranslateMsgs