[GHC] #13421: Confusing error when using BangPatterns without pragma

#13421: Confusing error when using BangPatterns without pragma -------------------------------------+------------------------------------- Reporter: schyler | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Poor/confusing Unknown/Multiple | error message Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- If you have something like this {{{ putTagType :: TagType -> Put putTagType !x = putWord8 $! fromIntegral $! fromEnum x {-# INLINE putTagType #-} }}} and forget to put the pragma for BangPatterns you get this: {{{ /Users/kvanb/git/mineserver/mineserver- nbt/src/Mineserver/NBT/TagType.hs:40:1: error: The type signature for ‘putTagType’ lacks an accompanying binding /Users/kvanb/git/mineserver/mineserver- nbt/src/Mineserver/NBT/TagType.hs:42:12: error: The INLINE pragma for ‘putTagType’ lacks an accompanying binding Warning: File listed in mineserver-nbt/mineserver-nbt.cabal file does not exist: README.md }}} which leaves you very confused thinking you made a typo. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13421 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13421: Confusing error when using BangPatterns without pragma -------------------------------------+------------------------------------- Reporter: schyler | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by schyler): Would be nice if it said something like "Perhaps you meant to use -XBangPatterns?" like it does for all the type-level errors where you forget to use the pragma. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13421#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC