haskell - How to import specific PortNumber constructor -
simple question.
this compiles:
module example import network port :: portid port = portnumber 3001  and not:
module example import network (portid, portnumber) port :: portid port = portnumber 3001  ghc says:
example.hs:6:8: not in scope: data constructor `portnumber'  why?
it has be
import network (portid(portnumber))  as portnumber seems constructor of portid. other import imports of network , hence portnumber found.
Comments
Post a Comment