[Haskell-cafe] resolving missing class instances @ compile time
Samuel Bronson
naesten at gmail.com
Thu May 12 16:23:21 EDT 2005
On 12/05/05, Greg Buchholz <haskell at sleepingsquirrel.org> wrote:
> Samuel Bronson wrote:
> > Aren't the warnings just about as usefull as failures? Anyway, you
> > could always use the -Werrror flag for ghc...
> >
> > In any case, I would not like to have to implement an entire typeclass
> > at once... it would interfere with incremental development.
>
> Hmm. I guess I'm doing a terrible job of asking my question. I
> don't want to implement the entire typeclass either. Just the part that
> my program actually uses. Why can't the fact that my program uses an
> unimplemented instance of a class be statically determined? Is there a
> theoretical reason it can't be done? Is it more convienient for
> compiler/specification writers this way? Is it just because that's the
> way its always been done?
After thinking about it for a while, I'm positive it would be a LOT of
work to get that to work in general, if it is even possible. Even
getting it to work in only specific, limited cases (such as within a
module) would probably not be easy, since it is such an indirect kind
of thing. It probably wouldn't be all that usefull anyway, either.
In general, though, I think they don't implement stuff like this
unless someone specifically wants to *use* it.
-- Sam
More information about the Haskell-Cafe
mailing list