Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#9514 closed bug (duplicate)

Haddock panics when exporting a module with pattern synonyms

Reported by: Artyom.Kazak Owned by: cactus
Priority: normal Milestone:
Component: Compiler Version: 7.8.3
Keywords: haddock, PatternSynonyms Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

First of all: Haddock version: 2.14.3, GHC version: 7.8.3.

Create 2 files, PatSymDef.hs and PatSymUse.hs:

-- PatSymDef.hs

{-# Language PatternSynonyms #-}                                            
module PatSymDef where

pattern Pat = ()
-- PatSymUse.hs

{-# Language PatternSynonyms #-}
module PatSymUse (module PatSymDef) where

import PatSymDef

Run Haddock on them:

[yom@shiny tmp]$ haddock -h PatSymDef.hs PatSymUse.hs
Haddock coverage:
Warning: Not found in environment: PatSymDef.Pat
  50% (  1 /  2) in 'PatSymDef'
haddock: panic! (the 'impossible' happened)
  (GHC version 7.8.3 for x86_64-unknown-linux):
	mkUsage
<<details unavailable>>

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

And with -ddump-if-trace:

[yom@shiny tmp]$ haddock -h PatSymDef.hs PatSymUse.hs --optghc='-ddump-if-trace'
Haddock coverage:
Considering whether to load base:Prelude
Reading interface for base:Prelude;
    reason: Prelude is directly imported
readIFace /usr/lib/ghc-7.8.3/base-4.7.0.1/Prelude.hi
readIFace /usr/lib/ghc-7.8.3/base-4.7.0.1/Prelude.dyn_hi
updating EPS_
updating EPS_
Considering whether to load base:GHC.Base {- SYSTEM -}
Reading interface for base:GHC.Base;
    reason: Loading orphan modules (base:GHC.Base)
readIFace /usr/lib/ghc-7.8.3/base-4.7.0.1/GHC/Base.hi
readIFace /usr/lib/ghc-7.8.3/base-4.7.0.1/GHC/Base.dyn_hi
updating EPS_
Considering whether to load base:GHC.Float {- SYSTEM -}
Reading interface for base:GHC.Float;
    reason: Loading orphan modules (base:GHC.Float)
readIFace /usr/lib/ghc-7.8.3/base-4.7.0.1/GHC/Float.hi
readIFace /usr/lib/ghc-7.8.3/base-4.7.0.1/GHC/Float.dyn_hi
updating EPS_
Considering whether to load base:GHC.Real {- SYSTEM -}
Reading interface for base:GHC.Real;
    reason: Loading orphan modules (base:GHC.Real)
readIFace /usr/lib/ghc-7.8.3/base-4.7.0.1/GHC/Real.hi
readIFace /usr/lib/ghc-7.8.3/base-4.7.0.1/GHC/Real.dyn_hi
updating EPS_
loadHiBootInterface main:PatSymDef
Starting fork { Declaration for Monad
Loading decl for GHC.Base.Monad
updating EPS_
Considering whether to load ghc-prim:GHC.Prim {- SYSTEM -}
Reading interface for ghc-prim:GHC.Prim;
    reason: Need home interface for wired-in thing *
updating EPS_
Considering whether to load ghc-prim:GHC.Prim {- SYSTEM -}
tc-iface-class1 Monad
tc-iface-class2 Monad
tc-iface-class3 Monad
tc-iface-class4 Monad
buildClass
buildClass GHC.Base.Monad
} ending fork Declaration for Monad
Need decl for Control.Applicative.Applicative
Considering whether to load base:Control.Applicative {- SYSTEM -}
Reading interface for base:Control.Applicative;
    reason: Need decl for Control.Applicative.Applicative
readIFace /usr/lib/ghc-7.8.3/base-4.7.0.1/Control/Applicative.hi
readIFace /usr/lib/ghc-7.8.3/base-4.7.0.1/Control/Applicative.dyn_hi
updating EPS_
Starting fork { Declaration for Applicative
Loading decl for Control.Applicative.Applicative
updating EPS_
Considering whether to load ghc-prim:GHC.Prim {- SYSTEM -}
Considering whether to load ghc-prim:GHC.Prim {- SYSTEM -}
tc-iface-class1 Applicative
tc-iface-class2 Applicative
tc-iface-class3 Applicative
tc-iface-class4 Applicative
buildClass
buildClass Control.Applicative.Applicative
} ending fork Declaration for Applicative
Need decl for Control.Monad.MonadPlus
Considering whether to load base:Control.Monad {- SYSTEM -}
Reading interface for base:Control.Monad;
    reason: Need decl for Control.Monad.MonadPlus
readIFace /usr/lib/ghc-7.8.3/base-4.7.0.1/Control/Monad.hi
readIFace /usr/lib/ghc-7.8.3/base-4.7.0.1/Control/Monad.dyn_hi
updating EPS_
Starting fork { Declaration for MonadPlus
Loading decl for Control.Monad.MonadPlus
updating EPS_
Considering whether to load ghc-prim:GHC.Prim {- SYSTEM -}
Considering whether to load ghc-prim:GHC.Prim {- SYSTEM -}
tc-iface-class1 MonadPlus
tc-iface-class2 MonadPlus
tc-iface-class3 MonadPlus
tc-iface-class4 MonadPlus
buildClass
buildClass Control.Monad.MonadPlus
} ending fork Declaration for MonadPlus
Starting fork { Declaration for Alternative
Loading decl for Control.Applicative.Alternative
updating EPS_
Considering whether to load ghc-prim:GHC.Prim {- SYSTEM -}
Considering whether to load ghc-prim:GHC.Prim {- SYSTEM -}
tc-iface-class1 Alternative
tc-iface-class2 Alternative
tc-iface-class3 Alternative
tc-iface-class4 Alternative
buildClass
buildClass Control.Applicative.Alternative
} ending fork Declaration for Alternative

==================== Interface statistics ====================
Renamer stats: 7 interfaces read
               4 type/class/variable imported, out of 1234 read
               0 instance decls imported, out of 97 read
               0 rule decls imported, out of 53 read


Need decl for PatSymDef.Pat
Considering whether to load main:PatSymDef {- SYSTEM -}
Warning: Not found in environment: PatSymDef.Pat
  50% (  1 /  2) in 'PatSymDef'
Considering whether to load base:Prelude
Considering whether to load main:PatSymDef
updating EPS_
Considering whether to load base:GHC.Base {- SYSTEM -}
Considering whether to load base:GHC.Float {- SYSTEM -}
Considering whether to load base:GHC.Real {- SYSTEM -}
loadHiBootInterface main:PatSymUse
haddock: panic! (the 'impossible' happened)
  (GHC version 7.8.3 for x86_64-unknown-linux):
	mkUsage
<<details unavailable>>

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Change History (4)

comment:1 Changed 3 years ago by simonpj

Owner: set to cactus

comment:2 Changed 3 years ago by cactus

Keywords: pattern synonyms added

comment:3 Changed 3 years ago by cactus

Resolution: duplicate
Status: newclosed

Duplicate of #9417

Last edited 3 years ago by cactus (previous) (diff)

comment:4 Changed 2 years ago by cactus

Keywords: PatternSynonyms added; pattern synonyms removed
Note: See TracTickets for help on using tickets.