简单的问题。
这编译:
module Example where
import Network
port :: PortID
port = PortNumber 3001
这不会:
module Example where
import Network (PortID, PortNumber)
port :: PortID
port = PortNumber 3001
GHC 说:
Example.hs:6:8: Not in scope: data constructor `PortNumber'
为什么?