on master help sign in
Merge pull request #220 from composewell/ghcjs-build

Conditionally compile network package for ghcjs.

commit6bde69894b00e4585973f3f0fa51b10b0877a04e authorHarendra Kumar <harendra.kumar@gmail.com> dateSun 28 Jul 2019, 17:27 (7 years ago) parent687fb9a330d904
1 file changed+8−4
streamly.cabal+8−4
streamly.cabal+8−4
@@ -221,9 +221,6 @@ library
221221 , Streamly.FileSystem.FD
222222 , Streamly.FileSystem.Handle
223223 , Streamly.FileSystem.File
224− , Streamly.Network.Socket
225− , Streamly.Network.Server
226− , Streamly.Network.Client
227224
228225 -- Time
229226 , Streamly.Time.Units
@@ -231,6 +228,11 @@ library
231228
232229 , Streamly.Tutorial
233230 , Streamly.Internal
231+ if !impl(ghcjs)
232+ exposed-modules:
233+ Streamly.Network.Socket
234+ , Streamly.Network.Server
235+ , Streamly.Network.Client
234236
235237 default-language: Haskell2010
236238 ghc-options: -Wall -fspec-constr-recursive=10
@@ -275,8 +277,10 @@ library
275277 , mtl >= 2.2 && < 3
276278 , transformers >= 0.4 && < 0.6
277279 , transformers-base >= 0.4 && < 0.5
278− , network >= 2.6 && < 4
279280
281+ if !impl(ghcjs)
282+ build-depends:
283+ network >= 2.6 && < 4
280284 if impl(ghc < 8.0)
281285 build-depends:
282286 semigroups >= 0.18 && < 0.19