[GHC] #16211: Recompiling results in a missing instance

GHC ghc-devs at haskell.org
Mon Jan 21 22:35:09 UTC 2019


#16211: Recompiling results in a missing instance
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.6.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  error/warning at compile-time      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I had a quick go to reproduce, but failed to install `monad-classes`, thus
 {{{
 /c/tmp/T16211$ cabal install monad-classes
 Warning: The package list for 'hackage.haskell.org' is 292 days old.
 Run 'cabal update' to get the latest list of available packages.
 Resolving dependencies...
 Downloading base-orphans-0.7...
 Downloading peano-0.1.0.1...
 Downloading reflection-2.1.3...
 Configuring base-orphans-0.7...
 Building base-orphans-0.7...
 Downloading transformers-compat-0.6.1.6...
 Configuring peano-0.1.0.1...
 Configuring reflection-2.1.3...
 Configuring transformers-compat-0.6.1.6...
 Installed base-orphans-0.7
 Building peano-0.1.0.1...
 Building reflection-2.1.3...
 Building transformers-compat-0.6.1.6...
 Installed peano-0.1.0.1
 Installed transformers-compat-0.6.1.6
 Downloading transformers-base-0.4.5.2...
 Downloading mmorph-1.1.2...
 Configuring mmorph-1.1.2...
 Installed reflection-2.1.3
 Configuring transformers-base-0.4.5.2...
 Building mmorph-1.1.2...
 Building transformers-base-0.4.5.2...
 Installed transformers-base-0.4.5.2
 Downloading monad-control-1.0.2.3...
 Configuring monad-control-1.0.2.3...
 Installed mmorph-1.1.2
 Building monad-control-1.0.2.3...
 Installed monad-control-1.0.2.3
 Downloading monad-classes-0.3.2.0...
 Configuring monad-classes-0.3.2.0...
 Building monad-classes-0.3.2.0...
 Failed to install monad-classes-0.3.2.0
 Build log ( C:\Users\simonpj\AppData\Roaming\cabal\logs\ghc-8.4.3\monad-
 classes-0.3.2.0-8KgSrx1uXAE2nRQBG2VUas.log ):
 Preprocessing library for monad-classes-0.3.2.0..
 Building library for monad-classes-0.3.2.0..
 [ 1 of 12] Compiling Control.Monad.Classes.Core (
 Control\Monad\Classes\Core.hs, dist\build\Control\Monad\Classes\Core.o )
 [ 2 of 12] Compiling Control.Monad.Classes.Effects (
 Control\Monad\Classes\Effects.hs,
 dist\build\Control\Monad\Classes\Effects.o )
 [ 3 of 12] Compiling Control.Monad.Classes.Except (
 Control\Monad\Classes\Except.hs, dist\build\Control\Monad\Classes\Except.o
 )
 [ 4 of 12] Compiling Control.Monad.Classes.Exec (
 Control\Monad\Classes\Exec.hs, dist\build\Control\Monad\Classes\Exec.o )
 [ 5 of 12] Compiling Control.Monad.Classes.Proxied (
 Control\Monad\Classes\Proxied.hs,
 dist\build\Control\Monad\Classes\Proxied.o )
 [ 6 of 12] Compiling Control.Monad.Classes.Reader (
 Control\Monad\Classes\Reader.hs, dist\build\Control\Monad\Classes\Reader.o
 )
 [ 7 of 12] Compiling Control.Monad.Classes.State (
 Control\Monad\Classes\State.hs, dist\build\Control\Monad\Classes\State.o )
 [ 8 of 12] Compiling Control.Monad.Classes.ReadState (
 Control\Monad\Classes\ReadState.hs,
 dist\build\Control\Monad\Classes\ReadState.o )

 Control\Monad\Classes\ReadState.hs:42:8: error:
     * Type indexes must match class instance head
       Expected: StT (ReadStateT x) <tv>
         Actual: StT (ReadStateT s) a
       where the `<tv>' arguments are type variables,
       distinct from each other and from the instance variables
     * In the type instance declaration for `StT'
       In the instance declaration for `MonadTransControl (ReadStateT x)'
    |
 42 |   type StT (ReadStateT s) a = StT IdentityT a
    |        ^^^
 cabal: Leaving directory 'C:\Users\simonpj\AppData\Local\Temp\cabal-
 tmp-19032\monad-classes-0.3.2.0'
 cabal.exe: Error: some packages failed to install:
 monad-classes-0.3.2.0-8KgSrx1uXAE2nRQBG2VUas failed during the building
 phase.
 The exception was:
 ExitFailure 1
 }}}
 This is with
 {{{
 /c/tmp$ ghc --version
 The Glorious Glasgow Haskell Compilation System, version 8.4.3
 /c/tmp$ cabal --version
 cabal-install version 2.2.0.0
 compiled using version 2.2.0.1 of the Cabal library
 }}}
 I have not investigated further, thus far.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16211#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list