Closed annacrombie closed 5 years ago
what's your network
library version ? recommended fix at the moment is to use stack
instead of cabal
which use overall package versions that works together
I hit this too using network-2.6.2.1
which is within the bounds specified by connection.cabal (>=2.6). Apparently the Read instance was first added in 2.6.3 series.
% cabal v2-repl
Build profile: -w ghc-8.6.4 -O1
In order, the following will be built (use -v for more details):
- connection-0.3.0 (first run)
Preprocessing library for connection-0.3.0..
GHCi, version 8.6.4: http://www.haskell.org/ghc/ :? for help
[1 of 2] Compiling Network.Connection.Types ( Network/Connection/Types.hs, interpreted )
[2 of 2] Compiling Network.Connection ( Network/Connection.hs, interpreted )
Network/Connection.hs:213:22: error:
* No instance for (Read PortNumber) arising from a use of `reads'
* In the expression: reads portS
In the expression:
case reads portS of
[(sPort, "")] -> Just (sHost, sPort)
_ -> Nothing
In a case alternative:
(sHost, ':' : portS)
-> case reads portS of
[(sPort, "")] -> Just (sHost, sPort)
_ -> Nothing
|
213 | case reads portS of
| ^^^^^^^^^^^
Failed, one module loaded.
*Network.Connection.Types> :info PortNumber
newtype PortNumber
= network-2.6.2.1:Network.Socket.Types.PortNum GHC.Word.Word16
-- Defined in `network-2.6.2.1:Network.Socket.Types'
instance Eq PortNumber
-- Defined in `network-2.6.2.1:Network.Socket.Types'
instance Ord PortNumber
-- Defined in `network-2.6.2.1:Network.Socket.Types'
instance Show PortNumber
-- Defined in `network-2.6.2.1:Network.Socket.Types'
instance Enum PortNumber
-- Defined in `network-2.6.2.1:Network.Socket.Types'
instance Num PortNumber
-- Defined in `network-2.6.2.1:Network.Socket.Types'
instance Real PortNumber
-- Defined in `network-2.6.2.1:Network.Socket.Types'
instance Integral PortNumber
-- Defined in `network-2.6.2.1:Network.Socket.Types'
*Network.Connection.Types>
Issue
When I try to compile connection (a dependency of xmobar, which is what I am trying to install), I get a compilation error.
Machine info
Build log
Steps to reproduce