diff options
Diffstat (limited to 'examples/dhtd.hs')
-rw-r--r-- | examples/dhtd.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs index ea2b3459..9966fb32 100644 --- a/examples/dhtd.hs +++ b/examples/dhtd.hs | |||
@@ -164,6 +164,7 @@ loadNodes netname = do | |||
164 | >>= maybe (ioError $ userError "Nothing") return | 164 | >>= maybe (ioError $ userError "Nothing") return |
165 | either (const $ fallbackLoad fname) return attempt | 165 | either (const $ fallbackLoad fname) return attempt |
166 | 166 | ||
167 | fallbackLoad :: FromJSON t => FilePath -> IO [t] | ||
167 | fallbackLoad fname = do | 168 | fallbackLoad fname = do |
168 | attempt <- tryIOError $ do | 169 | attempt <- tryIOError $ do |
169 | J.decode <$> L.readFile fname | 170 | J.decode <$> L.readFile fname |