ddssff / debian-haskell

Haskell library of datatypes related to Debian packaging
4 stars 5 forks source link

Build failure with GHC 8 #6

Closed snoyberg closed 5 years ago

snoyberg commented 8 years ago
> /tmp/stackage-build8$ stack unpack debian-3.89
Unpacked debian-3.89 to /tmp/stackage-build8/debian-3.89/
> /tmp/stackage-build8/debian-3.89$ runghc -clear-package-db -global-package-db -package-db=/home/stackage/work/builds/nightly/pkgdb Setup configure --package-db=clear --package-db=global --package-db=/home/stackage/work/builds/nightly/pkgdb --libdir=/home/stackage/work/builds/nightly/lib --bindir=/home/stackage/work/builds/nightly/bin --datadir=/home/stackage/work/builds/nightly/share --libexecdir=/home/stackage/work/builds/nightly/libexec --sysconfdir=/home/stackage/work/builds/nightly/etc --docdir=/home/stackage/work/builds/nightly/doc/debian-3.89 --htmldir=/home/stackage/work/builds/nightly/doc/debian-3.89 --haddockdir=/home/stackage/work/builds/nightly/doc/debian-3.89 --flags=
Configuring debian-3.89...
> /tmp/stackage-build8/debian-3.89$ runghc -clear-package-db -global-package-db -package-db=/home/stackage/work/builds/nightly/pkgdb Setup build
Building debian-3.89...
Preprocessing library debian-3.89...
[ 1 of 35] Compiling Debian.UTF8      ( Debian/UTF8.hs, dist/build/Debian/UTF8.o )
[ 2 of 35] Compiling Debian.Version.Internal ( Debian/Version/Internal.hs, dist/build/Debian/Version/Internal.o )
[ 3 of 35] Compiling Debian.Extra.Files ( Debian/Extra/Files.hs, dist/build/Debian/Extra/Files.o )
[ 4 of 35] Compiling Debian.Loc       ( Debian/Loc.hs, dist/build/Debian/Loc.o )
[ 5 of 35] Compiling Debian.Pretty    ( Debian/Pretty.hs, dist/build/Debian/Pretty.o )
[ 6 of 35] Compiling Debian.Version.Common ( Debian/Version/Common.hs, dist/build/Debian/Version/Common.o )
[ 7 of 35] Compiling Debian.Version.String ( Debian/Version/String.hs, dist/build/Debian/Version/String.o )
[ 8 of 35] Compiling Debian.Version.Text ( Debian/Version/Text.hs, dist/build/Debian/Version/Text.o )
[ 9 of 35] Compiling Debian.Arch      ( Debian/Arch.hs, dist/build/Debian/Arch.o )
[10 of 35] Compiling Debian.Time      ( Debian/Time.hs, dist/build/Debian/Time.o )

Debian/Time.hs:23:19: warning: [-Wdeprecations]
    In the use of ‘parseTime’
    (imported from Data.Time, but defined in time-1.6.0.1:Data.Time.Format.Parse):
    Deprecated: "use "parseTimeM True" instead"
[11 of 35] Compiling Debian.URI       ( Debian/URI.hs, dist/build/Debian/URI.o )
[12 of 35] Compiling Debian.Release   ( Debian/Release.hs, dist/build/Debian/Release.o )
[13 of 35] Compiling Debian.Sources   ( Debian/Sources.hs, dist/build/Debian/Sources.o )
[14 of 35] Compiling Debian.Control.Common ( Debian/Control/Common.hs, dist/build/Debian/Control/Common.o )

Debian/Control/Common.hs:75:1: warning: [-Wredundant-constraints]
    • Redundant constraint: ControlFunctions a
    • In the type signature for:
           protectFieldText' :: (StringLike a, ListLike a Char,
                                 ControlFunctions a) =>
                                a -> a

Debian/Control/Common.hs:158:1: warning: [-Wredundant-constraints]
    • Redundant constraint: Eq a
    • In the type signature for:
           raiseFields :: Eq a => (a -> Bool) -> Paragraph' a -> Paragraph' a
[15 of 35] Compiling Debian.Control.String ( Debian/Control/String.hs, dist/build/Debian/Control/String.o )
[16 of 35] Compiling Debian.Deb       ( Debian/Deb.hs, dist/build/Debian/Deb.o )
[17 of 35] Compiling Debian.Apt.Methods ( Debian/Apt/Methods.hs, dist/build/Debian/Apt/Methods.o )

Debian/Apt/Methods.hs:28:1: warning: [-Wdeprecations]
    Module ‘Control.Monad.Error’ is deprecated:
      Use Control.Monad.Except instead
[18 of 35] Compiling Debian.Version.ByteString ( Debian/Version/ByteString.hs, dist/build/Debian/Version/ByteString.o )
[19 of 35] Compiling Debian.Version   ( Debian/Version.hs, dist/build/Debian/Version.o )
[20 of 35] Compiling Debian.Changes   ( Debian/Changes.hs, dist/build/Debian/Changes.o )
[21 of 35] Compiling Debian.Relation.Common ( Debian/Relation/Common.hs, dist/build/Debian/Relation/Common.o )
[22 of 35] Compiling Debian.Relation.String ( Debian/Relation/String.hs, dist/build/Debian/Relation/String.o )
[23 of 35] Compiling Debian.Relation.Text ( Debian/Relation/Text.hs, dist/build/Debian/Relation/Text.o )
[24 of 35] Compiling Debian.Relation.ByteString ( Debian/Relation/ByteString.hs, dist/build/Debian/Relation/ByteString.o )
[25 of 35] Compiling Debian.Relation  ( Debian/Relation.hs, dist/build/Debian/Relation.o )
[26 of 35] Compiling Debian.Control.ByteString ( Debian/Control/ByteString.hs, dist/build/Debian/Control/ByteString.o )

Debian/Control/ByteString.hs:132:1: warning: [-Wredundant-constraints]
    • Redundant constraint: ControlFunctions a
    • In the type signature for:
           protectFieldText' :: (LL.StringLike a, LL.ListLike a Word8,
                                 ControlFunctions a) =>
                                a -> a

Debian/Control/ByteString.hs:138:7: warning: [-Wredundant-constraints]
    • Redundant constraint: LL.StringLike a
    • In the type signature for:
           dropWhileEnd :: (LL.StringLike a1, LL.ListLike a1 Word8) =>
                           (Word8 -> Bool) -> a1 -> a1
      In an equation for ‘protectFieldText'’:
          protectFieldText' s
            = case LL.lines s of {
                [] -> LL.empty
                (l : ls)
                  -> dropWhileEnd (isSpace . chr . fromIntegral)
                     $ LL.unlines $ l : map protect ls }
            where
                dropWhileEnd ::
                  (LL.StringLike a, LL.ListLike a Word8) => (Word8 -> Bool) -> a -> a
                dropWhileEnd func = LL.reverse . LL.dropWhile func . LL.reverse
                protect :: (LL.StringLike a, LL.ListLike a Word8) => a -> a
                protect l
                  = maybe
                      LL.empty
                      (\ c
                         -> if isHorizSpace c then l else LL.cons (ord' ' ' :: Word8) l)
                      (LL.find (const True :: Word8 -> Bool) l)
                ....

Debian/Control/ByteString.hs:140:7: warning: [-Wredundant-constraints]
    • Redundant constraint: LL.StringLike a
    • In the type signature for:
           protect :: (LL.StringLike a1, LL.ListLike a1 Word8) => a1 -> a1
      In an equation for ‘protectFieldText'’:
          protectFieldText' s
            = case LL.lines s of {
                [] -> LL.empty
                (l : ls)
                  -> dropWhileEnd (isSpace . chr . fromIntegral)
                     $ LL.unlines $ l : map protect ls }
            where
                dropWhileEnd ::
                  (LL.StringLike a, LL.ListLike a Word8) => (Word8 -> Bool) -> a -> a
                dropWhileEnd func = LL.reverse . LL.dropWhile func . LL.reverse
                protect :: (LL.StringLike a, LL.ListLike a Word8) => a -> a
                protect l
                  = maybe
                      LL.empty
                      (\ c
                         -> if isHorizSpace c then l else LL.cons (ord' ' ' :: Word8) l)
                      (LL.find (const True :: Word8 -> Bool) l)
                ....
[27 of 35] Compiling Debian.Control.Text ( Debian/Control/Text.hs, dist/build/Debian/Control/Text.o )

Debian/Control/Text.hs:32:1: warning: [-Wunused-imports]
    The qualified import of ‘T.reverse’
    from module ‘Data.Text’ is redundant
[28 of 35] Compiling Debian.Control.Policy ( Debian/Control/Policy.hs, dist/build/Debian/Control/Policy.o )

Debian/Control/Policy.hs:87:5: warning: [-Wunused-top-binds]
    Defined but not used: ‘control’
[29 of 35] Compiling Debian.Control   ( Debian/Control.hs, dist/build/Debian/Control.o )
[30 of 35] Compiling Debian.Apt.Index ( Debian/Apt/Index.hs, dist/build/Debian/Apt/Index.o )
[31 of 35] Compiling Debian.Report    ( Debian/Report.hs, dist/build/Debian/Report.o )
[32 of 35] Compiling Debian.GenBuildDeps ( Debian/GenBuildDeps.hs, dist/build/Debian/GenBuildDeps.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.0.1 for x86_64-unknown-linux):
    find_tycon
  Loc
  []

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
ddssff commented 8 years ago

Impossible!

RyanGlScott commented 8 years ago

This is the result of GHC Trac #12130 (a poor interaction between RecordWildCards and TemplateHaskell), which will be fixed in GHC 8.0.2. If you want to work around this in GHC 8.0.1, someone has posted a formula for a workaround here.

ddssff commented 5 years ago

Certain this is gone.