diff options
author | Andrew Cady <d@jerkface.net> | 2019-07-01 16:05:26 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2019-07-01 16:19:03 -0400 |
commit | 706acef0d7d674ad229e00fc844c8aaf836dec91 (patch) | |
tree | 92cf72ba7adae8ed148a74c63091cb5b427efd67 /examples/testTox.hs | |
parent | 287ecf2847ba695c7bebd0ad564ecad5fc046e78 (diff) |
update stackage to lts-13.26 and fix build
Diffstat (limited to 'examples/testTox.hs')
-rw-r--r-- | examples/testTox.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/testTox.hs b/examples/testTox.hs index e82ca2d3..67c4daef 100644 --- a/examples/testTox.hs +++ b/examples/testTox.hs | |||
@@ -34,7 +34,8 @@ import qualified Data.HashMap.Strict as HashMap | |||
34 | import qualified Data.Map.Strict as Map | 34 | import qualified Data.Map.Strict as Map |
35 | import Data.Time.Clock.POSIX | 35 | import Data.Time.Clock.POSIX |
36 | import System.Exit | 36 | import System.Exit |
37 | 37 | import Data.Dependent.Sum | |
38 | import Data.Tox.Msg | ||
38 | 39 | ||
39 | makeToxNode :: UDPTransport -> Maybe SecretKey | 40 | makeToxNode :: UDPTransport -> Maybe SecretKey |
40 | -> ( ContactInfo extra -> SockAddr -> Session -> IO () ) | 41 | -> ( ContactInfo extra -> SockAddr -> Session -> IO () ) |
@@ -46,6 +47,7 @@ makeToxNode udp sec onSessionF = do | |||
46 | onSessionF | 47 | onSessionF |
47 | sec | 48 | sec |
48 | udp | 49 | udp |
50 | (\_ _ -> return ()) | ||
49 | 51 | ||
50 | 52 | ||
51 | setToxID :: Tox () -> Maybe SecretKey -> IO () | 53 | setToxID :: Tox () -> Maybe SecretKey -> IO () |
@@ -161,7 +163,7 @@ main = do | |||
161 | case Map.lookup b_public mp_a of | 163 | case Map.lookup b_public mp_a of |
162 | Just [session] -> do | 164 | Just [session] -> do |
163 | dput XUnused "----------------- HOWDY ---------------" | 165 | dput XUnused "----------------- HOWDY ---------------" |
164 | sendMessage (sTransport session) () (UpToN MESSAGE "Howdy") | 166 | sendMessage (sTransport session) () (Pkt MESSAGE :=> "Howdy") |
165 | Just xs -> dput XUnused "Unexpectedly a has TOO MANY sesions for b" | 167 | Just xs -> dput XUnused "Unexpectedly a has TOO MANY sesions for b" |
166 | Nothing -> dput XUnused "Unexpectedly a has NO session for b" | 168 | Nothing -> dput XUnused "Unexpectedly a has NO session for b" |
167 | -- b says "Hey you!" | 169 | -- b says "Hey you!" |
@@ -169,7 +171,7 @@ main = do | |||
169 | case Map.lookup a_public mp_b of | 171 | case Map.lookup a_public mp_b of |
170 | Just [session] -> do | 172 | Just [session] -> do |
171 | dput XUnused "----------------- HEY YOU ---------------" | 173 | dput XUnused "----------------- HEY YOU ---------------" |
172 | sendMessage (sTransport session) () (UpToN MESSAGE "Hey you!") | 174 | sendMessage (sTransport session) () (Pkt MESSAGE :=> "Hey you!") |
173 | Just xs -> dput XUnused "Unexpectedly b has TOO MANY sesions for a" | 175 | Just xs -> dput XUnused "Unexpectedly b has TOO MANY sesions for a" |
174 | Nothing -> dput XUnused "Unexpectedly b has NO session for a" | 176 | Nothing -> dput XUnused "Unexpectedly b has NO session for a" |
175 | 177 | ||