
#15708: Cross-module SPECIALZE pragmas aren't typechecked in -O0 -------------------------------------+------------------------------------- Reporter: regnat | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.6.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC accepts | Unknown/Multiple invalid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by regnat):
without -O we just treat SPECIALISE pragmas as comments.
That seems not to be exactly the case in practice: if the SPECIALISE pragma is in the same module as the definition then I get an error. Regardless of that, I find this a bit surprising: I would have expected that as much as possible whether a program is valid or not doesn't depend on the optimization level (which obviously isn't possible to guaranty in the general case because of things like the RULE pragma, but as you mentioned this doesn't cost much to check). Or do I overlook another good reason for not typechecking these pragmas? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15708#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler