on master help sign in
Allow io-streams and include threepenny-gui
commit7d2ca476728de9a71f9f78efe031529b89b1af15 authorMichael Snoyman <michael@snoyman.com> dateTue 24 Dec 2013, 06:46 (13 years ago) parent53b1f3e
3 files changed+66−5
Stackage/Config.hs+1−5 patching/patches/io-streams-1.1.2.2.patch+47 patching/patches/threepenny-gui-0.4.0.1.patch+18
Stackage/Config.hs+1−5
@@ -151,6 +151,7 @@ defaultStablePackages ghcVer = unPackageMap $ execWriter $ do
151151 , "hxt hxt-relaxng dimensional"
152152 , "cairo diagrams-cairo"
153153 , "persistent-mongoDB"
154+ , "threepenny-gui"
154155 ]
155156 when (ghcVer < GhcMajorVersion 7 6) $ do
156157 addRange "FP Complete <michael@fpcomplete.com>" "hxt" "<= 9.3.0.1"
@@ -356,11 +357,6 @@ defaultStablePackages ghcVer = unPackageMap $ execWriter $ do
356357 -- Version 0.15.3 requires a newer template-haskell
357358 addRange "FP Complete <michael@fpcomplete.com>" "language-ecmascript" "< 0.15.3"
358359
359− -- io-streams depends on too new a network and too old a test-framework.
360− -- Therefore, don't use the new websockets which depends on it.
361− addRange "Michael Snoyman" "websockets" "< 0.8"
362− addRange "Michael Snoyman" "wai-websockets" "< 1.3.2"
363−
364360 -- unknown symbol `utf8_table4'
365361 addRange "Michael Snoyman" "regex-pcre-builtin" "< 0.94.4.6.8.31"
366362 where
patching/patches/io-streams-1.1.2.2.patchnew file+47
@@ -0,0 +1,47 @@
1+diff -ru orig/io-streams.cabal new/io-streams.cabal
2+--- orig/io-streams.cabal 2013-12-24 06:42:56.449491097 +0200
3++++ new/io-streams.cabal 2013-12-24 06:42:56.000000000 +0200
4+@@ -162,7 +162,7 @@
5+ attoparsec >= 0.10 && <0.11,
6+ blaze-builder >= 0.3.1 && <0.4,
7+ bytestring >= 0.9 && <0.11,
8+- network >= 2.4 && <2.5,
9++ network >= 2.3 && <2.5,
10+ primitive >= 0.2 && <0.6,
11+ process >= 1 && <1.3,
12+ text >= 0.10 && <1.1,
13+@@ -246,7 +246,7 @@
14+ directory >= 1.1 && <2,
15+ filepath >= 1.2 && <2,
16+ mtl >= 2 && <3,
17+- network >= 2.4 && <2.5,
18++ network >= 2.3 && <2.5,
19+ primitive >= 0.2 && <0.6,
20+ process >= 1 && <1.3,
21+ text >= 0.10 && <1.1,
22+diff -ru orig/test/System/IO/Streams/Tests/Network.hs new/test/System/IO/Streams/Tests/Network.hs
23+--- orig/test/System/IO/Streams/Tests/Network.hs 2013-12-24 06:42:56.441491095 +0200
24++++ new/test/System/IO/Streams/Tests/Network.hs 2013-12-24 06:42:56.000000000 +0200
25+@@ -44,18 +44,18 @@
26+ Streams.fromList ["", "ok"] >>= Streams.connectTo os
27+ N.shutdown sock N.ShutdownSend
28+ Streams.toList is >>= putMVar resultMVar
29+- N.close sock
30++ N.sClose sock
31+
32+ server mvar = do
33+ sock <- N.socket N.AF_INET N.Stream N.defaultProtocol
34+ addr <- N.inet_addr "127.0.0.1"
35+ let saddr = N.SockAddrInet N.aNY_PORT addr
36+- N.bind sock saddr
37++ N.bindSocket sock saddr
38+ N.listen sock 5
39+ port <- N.socketPort sock
40+ putMVar mvar port
41+ (csock, _) <- N.accept sock
42+ (is, os) <- Streams.socketToStreams csock
43+ Streams.toList is >>= flip Streams.writeList os
44+- N.close csock
45+- N.close sock
46++ N.sClose csock
47++ N.sClose sock
patching/patches/threepenny-gui-0.4.0.1.patchnew file+18
@@ -0,0 +1,18 @@
1+diff -ru orig/src/Graphics/UI/Threepenny/Internal/Types.hs new/src/Graphics/UI/Threepenny/Internal/Types.hs
2+--- orig/src/Graphics/UI/Threepenny/Internal/Types.hs 2013-12-24 06:45:49.129496370 +0200
3++++ new/src/Graphics/UI/Threepenny/Internal/Types.hs 2013-12-24 06:45:48.000000000 +0200
4+@@ -37,7 +37,13 @@
5+ newtype ElementId = ElementId BS.ByteString
6+ deriving (Data,Typeable,Show,Eq,Ord)
7+
8+-instance NFData ElementId where rnf (ElementId x) = rnf x
9++instance NFData ElementId where
10++ rnf (ElementId x) =
11++#if MIN_VERSION_bytestring(0, 10, 0)
12++ rnf x
13++#else
14++ BS.length x `seq` ()
15++#endif
16+
17+ type EventId = String
18+ type Handlers = Map EventId (E.Handler EventData)