#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
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs