| What I'd really like is a command "specialize module Foo for type Bar",
| and moreover, this specialization should happen completely outside
| the text of module Foo. (Compare to an instanciation of a generic
| package in Ada.)
| 
| Are there any magic ghc options/perl scripts (ouch) that could help?

Alas, no.

- It's not clear just what "specialize module Foo for type Bar", might
mean... which polymorphic types are to be instantiated with Bar?

- GHC currently only knows the complete source text of a module when it's
compiling that module.


Something that might be possible (but we don't do) would be to
say

        ghc Foo.hs -specialise key Int

meaning specialise functions with the type variable "key" in their
type signature to "Int".

I don't think there's much technical problem here, but cross module stuff is
always a lot of work.  If anyone is inclined to give it a try, do start with
2.02 or later; the cross-module stuff is much better than in earlier
versions.

Simon

Reply via email to