[GHC] #4227: Allow SPECIALISE pragmas for functions defined in
another module
GHC
cvs-ghc at haskell.org
Wed Jul 28 12:19:25 EDT 2010
#4227: Allow SPECIALISE pragmas for functions defined in another module
---------------------------------+------------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.12.3
Keywords: | Difficulty:
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by sebf):
The motivation for this is [http://github.com/sebfisch/haskell-
regexp/blob/0.2.0.0/src/Text/RegExp/Matching.hs Matching.hs]. Currently it
has SPECIALIZE pragmas for Prelude types but more complex matching
policies like [http://github.com/sebfisch/haskell-
regexp/blob/0.2.0.0/src/Text/RegExp/Matching/Leftmost.hs Leftmost.hs] must
use unspecialized matching functions. Ideally, I would just write
{{{
{-# SPECIALIZE partialMatch :: RegExp c -> [(Int,c)] -> Leftmost #-}
{-# SPECIALIZE matchW :: RegW Leftmost c -> [(Int,c)] -> Leftmost #-}
}}}
into {{{Leftmost.hs}}} to specialize {{{partialMatch}}} and its overloaded
dependency {{{matchW}}}.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4227#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list