Skip to content

Commit

Permalink
Attempt to fix dodgy-imports warning
Browse files Browse the repository at this point in the history
`catch` was removed from `Prelude` in base-4.6.0.0, so hiding it
causes a warning in some environments.

    /home/travis/build/jgm/yst/Yst/CSV.hs:28:1: warning:
    [-Wdodgy-imports]
    Module ‘Prelude’ does not export ‘catch’

This currently causes Travis CI to fail:
https://travis-ci.org/jgm/yst/jobs/201667249
  • Loading branch information
jmitchell committed Feb 17, 2017
1 parent 7055c5e commit c2f9a52
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Yst/CSV.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,16 @@ import Text.CSV
-- Note: ghc >= 6.12 (base >=4.2) supports unicode through iconv
-- So we use System.IO.UTF8 only if we have an earlier version
#if MIN_VERSION_base(4,2,0)
#if !(MIN_VERSION_base(4,6,0))
import Prelude hiding (catch)
#endif
#else
import Prelude hiding (readFile, catch)
import Prelude hiding (
readFile
#if !(MIN_VERSION_base(4,6,0))
, catch
#endif
)
import System.IO.UTF8
#endif
import Control.Exception (catch, SomeException)
Expand Down

0 comments on commit c2f9a52

Please sign in to comment.