Skip to content

Commit 70b2934

Browse files
authored
fix incomplete-uni-patterns warnings (#1176)
* fix `incomplete-uni-patterns` warning, ignore some others the `flake.nix` build fails on these warnings: #1154 * ignore `incomplete-uni-patterns` warning
1 parent 4670cdb commit 70b2934

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

exes/Main.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}
12
module Main where
23

34
import qualified Distribution.Server as Server

src/Distribution/Server/Features/AdminFrontend.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{-# OPTIONS_GHC -fno-warn-orphans #-}
2+
{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}
23
{-# LANGUAGE NamedFieldPuns, RecordWildCards #-}
34
module Distribution.Server.Features.AdminFrontend (
45
initAdminFrontendFeature
@@ -190,7 +191,8 @@ adminFrontendFeature _env templates
190191
ok $ toResponse $ template
191192
[ "resets" $= [ resetRequestToTemplate resetInfo uinfo
192193
| resetInfo@ResetInfo {resetUserId} <- allResetInfo
193-
, let Just uinfo = Users.lookupUserId resetUserId usersdb ]
194+
, let Just uinfo = Users.lookupUserId resetUserId usersdb
195+
]
194196
]
195197

196198
serveAdminLegacyGet :: DynamicPath -> ServerPartE Response
@@ -203,7 +205,8 @@ adminFrontendFeature _env templates
203205
ok $ toResponse $ template
204206
[ "accounts" $= [ accountBasicInfoToTemplate uid uinfo
205207
| uid <- legacyUsers
206-
, let Just uinfo = Users.lookupUserId uid usersdb ]
208+
, let Just uinfo = Users.lookupUserId uid usersdb
209+
]
207210
]
208211

209212
resetRequestToTemplate :: SignupResetInfo -> UserInfo -> TemplateVal

src/Distribution/Server/Features/UserSignup.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}
12
{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving,
23
TypeFamilies, TemplateHaskell,
34
RankNTypes, NamedFieldPuns, RecordWildCards, BangPatterns #-}

0 commit comments

Comments
 (0)