On 3 May 2013 18:56, Ertugrul Söylemez <es@ertes.de> wrote:
I'll just pick a random example: Eq and Show are no longer superclassesAdrian May <adrian.alexander.may@gmail.com> wrote:
> > Changes already made in the base library or in one of the platform
> > libraries:
>
> So could you pick the most unassailable and tell me more about it
> please?
of Num. I'm the author of the Netwire library, a library for functional
reactive programming. Before that change you would write the following
code to express a clock that runs twice as fast as the real time clock
and oscillates up and down while gradually increasing:
liftA2 (\t o -> 2*t + sin o) time (integral_ 0 . v)
Thanks to the change you can now write it as:
2*time + sin (integral_ 0 . v)
I never doubted that people add new stuff for valid reasons. What I'm interested in is whether or not it could have been done without breaking anything. But having thought about it for a while, I'm tending to think that version controlling all the standard modules is the only general solution.
You'd have them all in a git ... ahem ... darcs repo which every dev would clone the entire history of. Something prominent in the project would say which version you want. (We could brainstorm about hierarchies of that but it probably wouldn't work anyway.) GHC would just switch its internals according to that number and fetch the right version of the module out of darcs as part of the compilation process.If you really wanted to protect people from future changes, you'd make it obligatory to tell ghc which version you want, but seeing as I seem to be more worried about this than anybody else around here, I might as well assume you'd default to the latest, but please, at least issue a warning so that people know this offbeat system even exists.
)I could have my project source in a completely different source control system cos this darcs interaction is internal to the compiler.This ain't gonna mean I don't have to maintain stuff, but having the choice about when to do so would be a great help.