On Fri, 2013-05-03 at 10:40 -0700, Hilco Wijbenga wrote: > On 3 May 2013 09:44, Niklas Hambüchen <m...@nh2.me> wrote: > > While I certainly enjoy the discussion, how about addressing one of the > > original problems: > > > > On 02/05/13 13:27, Adrian May wrote: > >> I just tried to use Flippi. It broke because of the syntax change so I > >> tried WASH. I couldn't even install it because of the syntax change. > > > > I just fixed that in https://github.com/nh2/flippi (note that I have > > never seen this code before nor even known about it). > > > > https://github.com/nh2/flippi/commit/5e2fa93f82b4123d0d5b486209c3b722c4c1313d > > > > Had to delete 5 imports and convert one time value. > > > > Took me around 3 minutes. > > It seems fair to say that Haskell's designers lean more to evolution > than maintaining backward compatibility. This reminds me of "Go" (the > programming language). The approach chosen by Go's designers was to > create a tool (gofix) that would automatically fix one's code to > comply with the latest standard. See > [http://talks.golang.org/2012/splash.article#TOC_17.] (yes, include > that last period). > > Given the apparent simplicity of the changes needed to keep one's > Haskell code up to snuff and the strong typing inherent in Haskell > code, would it not be possible to create something similar? If there > is a tool that moves (most of) one's code from Haskell version n to > n+1 then making breaking changes would be even less of an issue. > > Just an idea, I have no clue about its feasibility...
I mentioned the same on #haskell today. Something like Coccinelle (http://coccinelle.lip6.fr) "semantic patches" could be really useful to automate (some) API & language changes. Somewhat like (but better than) the Python '2to3' tool. I think some message about a GSoC project regarding an AST-based refactoring tool was posted to this list. That might be a useful building block for such tool? Imagine one day whenever a new HP release is made, GitHub pull-requests are created automatically based on a automatically-generated patch verified through a compilation&test-cycle on TravisCI for GH-hosted packages published on Hackage. Nicolas _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe