Closed yutasth closed 8 years ago
It is intended to use the IsString
instance, as mentioned in the docs. The constructors are not exposed to allow us to modify the representation in the future.
but the data constructors are not exported in Data.Streaming.Network. I had to import Data.Streaming.Network.Internal. Is this intended?
I'll repeat what I said: you're supposed to use the IsString
instance, not the constructors directly. The constructors may change in the future. The docs give examples of doing this, e.g. "*4"
means "all IPv4 addresses."
I import fromString from Data.String and write "serverSetting 80 (fromString "*")" and it works. Thanks for your kindness.
You can just turn on the OverloadedStrings language extension, e.g.:
{-# LANGUAGE OverloadedStrings #-}
On Thu, Oct 13, 2016 at 3:17 PM, yutasth notifications@github.com wrote:
I import fromString from Data.String and write "serverSetting 80 (fromString "*")" and it works. Thanks for your kindness.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fpco/streaming-commons/issues/35#issuecomment-253496842, or mute the thread https://github.com/notifications/unsubscribe-auth/AADBB8w1egIJaMkUobeHqojjLfFL-eSPks5qziFygaJpZM4KVz7r .
I didn't know that extention. Thanks a lot again!
The function serverSetting in Data.Conduit.Network requires a Data.Streaming.Network.HostPreference as an argument, but thd I had to import