INLINEing top-level patterns causes ghc to emit 'arity missing' traces
When an INLINE pragma is specified on a pattern, ghc-7.6.1 shows some internal trace messages.
module Foo where
{-# INLINE widths #-}
widths :: [Int]
widthMonth, widthYear :: Int
widths@[widthMonth, widthYear] = [1,2]
~/Downloads$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.1
~/Downloads$ ghc Foo.hs -O
[1 of 1] Compiling Foo ( Foo.hs, Foo.o )
makeCorePair: arity missing widths{v aeJ} [lid]
I'm not certain that specifying an INLINE pragma in this context even makes sense, in which case perhaps a more useful warning could be produced.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | jwlato@gmail.com |
| Operating system | |
| Architecture |