Skip to content

Commit b5398d0

Browse files
StevenXLdterei
authored andcommitted
Fix weeder.
We need a `weeder.toml` configuration file.
1 parent 8c0929a commit b5398d0

File tree

3 files changed

+10
-17
lines changed

3 files changed

+10
-17
lines changed

Database/Memcache/SASL.hs

+1-17
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import Database.Memcache.Types
2525

2626
import Control.Exception (throwIO)
2727
import Control.Monad
28-
import Data.ByteString.Char8 as B8 (ByteString, pack, singleton)
28+
import Data.ByteString.Char8 as B8 (pack, singleton)
2929

3030
-- | Perform SASL authentication with the server.
3131
authenticate :: Socket -> Authentication -> IO ()
@@ -49,19 +49,3 @@ saslAuthPlain s u p = do
4949
case resStatus r of
5050
NoError -> return ()
5151
rs -> throwIO $ OpError rs
52-
53-
-- | List available SASL authentication methods. We could call this but as we
54-
-- only support PLAIN as does the Memcached server, we simply assume PLAIN
55-
-- authentication is supprted and try that.
56-
saslListMechs :: Socket -> IO B8.ByteString
57-
{-# INLINE saslListMechs #-}
58-
saslListMechs s = do
59-
let msg = emptyReq { reqOp = ReqSASLList }
60-
send s msg
61-
r <- recv s
62-
v <- case resOp r of
63-
ResSASLList v -> return v
64-
_ -> throwIO $ wrongOp r "SASL_LIST"
65-
case resStatus r of
66-
NoError -> return v
67-
rs -> throwIO $ OpError rs

stack.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
resolver: lts-22.14
2+
3+
ghc-options:
4+
"$locals": >-
5+
-fwrite-ide-info

weeder.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
roots = ["Main.main", "^Paths_weeder.*", "^Paths_.*", "^Database.Memcache.Client.*"]
2+
3+
type-class-roots = true
4+
5+
unused-types = false

0 commit comments

Comments
 (0)