diff options
author | Joe Crayne <joe@jerkface.net> | 2020-01-05 20:03:18 -0500 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-05 21:44:36 -0500 |
commit | 62d31ca46fb3143af3004730195ff6554cf3fa40 (patch) | |
tree | a2882c330ba580ef57ecbf62b999ae87d377e35d /dht/examples | |
parent | 6047a311f270bbb0a176900d9b1fea5e6d9b96c1 (diff) |
Forward port to GHC 8.10.1-alpha2 (83edba07e4)
Diffstat (limited to 'dht/examples')
-rw-r--r-- | dht/examples/dht.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dht/examples/dht.hs b/dht/examples/dht.hs index 3e1b1656..6615477b 100644 --- a/dht/examples/dht.hs +++ b/dht/examples/dht.hs | |||
@@ -1,3 +1,4 @@ | |||
1 | {-# LANGUAGE CPP #-} | ||
1 | {-# LANGUAGE NondecreasingIndentation #-} | 2 | {-# LANGUAGE NondecreasingIndentation #-} |
2 | import Control.Applicative | 3 | import Control.Applicative |
3 | import Control.Monad | 4 | import Control.Monad |
@@ -13,6 +14,10 @@ import System.IO | |||
13 | import System.IO.Unsafe | 14 | import System.IO.Unsafe |
14 | import qualified Data.ByteString as B | 15 | import qualified Data.ByteString as B |
15 | 16 | ||
17 | #if MIN_VERSION_haskeline(0,8,0) | ||
18 | import Control.Exception (handle) | ||
19 | #endif | ||
20 | |||
16 | -- | Reads one character. If it is not a digit, | 21 | -- | Reads one character. If it is not a digit, |
17 | -- then it is discarded and 'Nothing' is returned. | 22 | -- then it is discarded and 'Nothing' is returned. |
18 | hReadDigit :: Handle -> IO (Maybe Char) | 23 | hReadDigit :: Handle -> IO (Maybe Char) |