Forward compatibility (was Re: [Haskell-cafe] GHCi infers a
type but refuses it as type signature)
matthijs at stdin.nl
Tue Jun 23 05:26:01 EDT 2009
> > > Simple: the definition of MonadState uses those extensions.
> > [Snip question: Is this extension supported by all compilers]
> You should treat "all compilers" the same way as a universal quantifier in
> mathematics. It's not just all the compilers you know about, but all
> possible compilers. In which case the answer to your question is of course
I think the reasoninging here is the following: If MonadState is part of the
standard library and it needs this extension to work, then all compilers must
support this extension.
I'm not completely sure how "standard" the MonadState class is though. Also,
it might be that there could be implementations of MonadState that do not use
If the latter is not the case, so MonadState will always require this
extension, than it seems that using the extension in your code gives you the
same portability as using the MonadState class. Not using the extension to
improve your portability only makes sense if you also stop using the
MonadState class, right?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090623/af2cecef/attachment.bin
More information about the Haskell-Cafe