haskell-hvr / hslogger

Logging framework for Haskell
https://hackage.haskell.org/package/hslogger
BSD 3-Clause "New" or "Revised" License
64 stars 36 forks source link

Non-exhaustive pattern match warning in `src/System/Log/Handler/Syslog.hs` #65

Open sjakobi opened 2 years ago

sjakobi commented 2 years ago

With -Wall I get:

src/System/Log/Handler/Syslog.hs:266:19: warning: [-Wincomplete-patterns]
    Pattern match(es) are non-exhaustive
    In a case alternative:
        Patterns not matched:
            network-3.1.2.5:Network.Socket.Types.SocketType
            (Foreign.C.Types.CInt (GHC.Int.I32# _))
    |
266 |           sent <- case sock_type sh of
    |                   ^^^^^^^^^^^^^^^^^^^^...

https://github.com/haskell-hvr/hslogger/blob/4c3ca34ea91fc00774a505d8d2a2aca8ece7a76c/src/System/Log/Handler/Syslog.hs#L263-L269

Compare https://hackage.haskell.org/package/network-3.1.2.5/docs/Network-Socket.html#t:SocketType.

If this lack of coverage is unproblematic, it would be nice if there was at least a comment that explains the issue,