-
Notifications
You must be signed in to change notification settings - Fork 196
Open
Description
PatternSynonyms
solves the problem of closed sum types. However, it introduced a possible backward compatibility issue relating to Show
and Read
:
> import Network.Socket
> ReuseAddr
SockOpt {sockOptLevel = 65535, sockOptName = 4}
> show ReuseAddr
"SockOpt {sockOptLevel = 65535, sockOptName = 4}"
> read "ReuseAddr" :: SocketOption
<interactive>:4:1: error:
• No instance for (Read SocketOption) arising from a use of ‘read’
• In the expression: read "ReuseAddr" :: SocketOption
In an equation for ‘it’: it = read "ReuseAddr" :: SocketOption
It's easy to fix this issue by adding Read
and Show
instance by hand. I would like to discuss it's worth doing.
Relating to #459.
Cc: @vdukhovni, @eborden
Metadata
Metadata
Assignees
Labels
No labels