Skip to content

Commit b533bce

Browse files
committed
Fix warning: -Wdeprecations
1 parent 8fd782a commit b533bce

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

cabal2nix/cabal2nix.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ library
5555
, Cabal >= 3.0
5656
, aeson > 1
5757
, ansi-terminal
58-
, ansi-wl-pprint
5958
, bytestring
6059
, containers >= 0.5.9
6160
, deepseq >= 1.4
@@ -69,6 +68,7 @@ library
6968
, lens
7069
, optparse-applicative
7170
, pretty >= 1.1.2
71+
, prettyprinter
7272
, process
7373
, split
7474
, text

cabal2nix/src/Cabal2nix.hs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import Options.Applicative
3838
import Paths_cabal2nix ( version )
3939
import System.Environment ( getArgs )
4040
import System.IO ( hFlush, stdout, stderr )
41-
import qualified Text.PrettyPrint.ANSI.Leijen as P2
41+
import qualified Prettyprinter as P2
4242
import Text.PrettyPrint.HughesPJClass ( Doc, Pretty(..), text, vcat, hcat, semi, render, prettyShow )
4343

4444
{-# ANN module ("HLint: ignore Use Just" :: String) #-}
@@ -148,16 +148,16 @@ pinfo = info
148148
( fullDesc
149149
<> header "cabal2nix converts Cabal files into build instructions for Nix."
150150
<> progDescDoc (Just (P2.vcat
151-
[ P2.text ""
152-
, P2.text "Recognized URI schemes:"
153-
, P2.text ""
154-
, P2.text " cabal://pkgname-pkgversion download the specified package from Hackage"
155-
, P2.text " cabal://pkgname download latest version of this package from Hackage"
156-
, P2.text " file:///local/path load the Cabal file from the local disk"
157-
, P2.text " /local/path abbreviated version of file URI"
158-
, P2.text " <git/svn/bzr/hg URL> download the source from the specified repository"
159-
, P2.text ""
160-
, P2.fillSep (map P2.text (words ( "If the URI refers to a cabal file, information for building the package "
151+
[ ""
152+
, "Recognized URI schemes:"
153+
, ""
154+
, " cabal://pkgname-pkgversion download the specified package from Hackage"
155+
, " cabal://pkgname download latest version of this package from Hackage"
156+
, " file:///local/path load the Cabal file from the local disk"
157+
, " /local/path abbreviated version of file URI"
158+
, " <git/svn/bzr/hg URL> download the source from the specified repository"
159+
, ""
160+
, P2.fillSep (map P2.pretty (words ( "If the URI refers to a cabal file, information for building the package "
161161
++ "will be retrieved from that file, but hackage will be used as a source "
162162
++ "for the derivation. Otherwise, the supplied URI will be used to as the "
163163
++ "source for the derivation and the information is taken from the cabal file "

hackage-db/src/Distribution/Hackage/DB/Utility.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Control.Exception
1313
import Data.Maybe
1414
import Data.Time.Clock
1515
import Data.Time.Clock.POSIX
16-
import Data.Time.Format
16+
import Data.Time.Format.ISO8601
1717
import Distribution.Parsec
1818

1919
parseText :: Parsec a => String -> String -> a
@@ -41,4 +41,4 @@ toEpochTime = floor . utcTimeToPOSIXSeconds
4141
-- 2018-12-21 13:17:40 UTC
4242

4343
parseIso8601 :: MonadFail m => String -> m UTCTime
44-
parseIso8601 = parseTimeM False defaultTimeLocale (iso8601DateFormat (Just "%H:%M:%SZ"))
44+
parseIso8601 = iso8601ParseM

0 commit comments

Comments
 (0)