@@ -78,6 +78,11 @@ flag examples
78 manual: True
78 manual: True
79 default: False
79 default: False
82+ description: Include examples that use SDL dependency
82 hs-source-dirs: src
87 hs-source-dirs: src
83 other-modules: Streamly.Core
88 other-modules: Streamly.Core
@@ -88,12 +93,15 @@ library
88 , Streamly.Tutorial
93 , Streamly.Tutorial
89 , Streamly
94 , Streamly
91− if flag(examples)
96+ if flag(examples) || flag(examples-sdl)
92− exposed-modules: Streamly.Examples.SearchEngineQuery
97+ exposed-modules: Streamly.Examples
98+ , Streamly.Examples.SearchEngineQuery
93 , Streamly.Examples.ListDirRecursive
99 , Streamly.Examples.ListDirRecursive
94 , Streamly.Examples.MergeSortedStreams
100 , Streamly.Examples.MergeSortedStreams
95 , Streamly.Examples.AcidRainGame
101 , Streamly.Examples.AcidRainGame
103+ if flag(examples-sdl)
96− , Streamly.Examples.CirclingSquare
104+ exposed-modules: Streamly.Examples.CirclingSquare
98 default-language: Haskell2010
106 default-language: Haskell2010
99 ghc-options: -Wall
107 ghc-options: -Wall
@@ -111,6 +119,8 @@ library
111 -Wredundant-constraints
119 -Wredundant-constraints
112 -Wnoncanonical-monad-instances
120 -Wnoncanonical-monad-instances
113 -Wnoncanonical-monadfail-instances
121 -Wnoncanonical-monadfail-instances
122+ if flag(examples-sdl)
123+ cpp-options: -DEXAMPLES_SDL
115 build-depends: base >= 4.8 && < 5
125 build-depends: base >= 4.8 && < 5
116 , atomic-primops >= 0.8 && < 0.9
126 , atomic-primops >= 0.8 && < 0.9
@@ -128,12 +138,15 @@ library
128 build-depends:
138 build-depends:
129 semigroups >= 0.18 && < 0.19
139 semigroups >= 0.18 && < 0.19
131− if flag(examples)
141+ if flag(examples) || flag(examples-sdl)
132 build-Depends:
142 build-Depends:
133 http-conduit
143 http-conduit
134 , path-io
144 , path-io
147+ if flag(examples-sdl)
136− , SDL >= 0.6.5 && < 0.7
149+ SDL >= 0.6.5 && < 0.7
138test-suite test
151test-suite test
139 type: exitcode-stdio-1.0
152 type: exitcode-stdio-1.0