Re: [Haskell-cafe] Re: ANNOUNCE: HaRe, the Haskell Refactorer 0.6

2010-06-30 Thread Chris BROWN
 
 
 The Annotated part of haskell-src-exts provides this I think:
 http://hackage.haskell.org/packages/archive/haskell-src-exts/1.9.0/doc/html/Language-Haskell-Exts-Annotated.html
 

Thanks, Ivan, I'll take a look at this. I wonder if would be possible to write 
a mapping for haskell-exts-annotated data types - programmatica data types. At 
the very least, HaRe would then be able to parse non Haskell 98. 

The problem, however, would be the generated refactored file: we currently use 
a combination of the transformed token stream and AST to build a refactored 
file. There may have to be some sort of mapping back to haskell-exts-annoted 
data type first, before generation begins.

Regards,
Chris.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: ANNOUNCE: HaRe, the Haskell Refactorer 0.6

2010-06-30 Thread Chris BROWN
 
 
 Doesn't that mean that hare requires also type information?
 Even though haskell-src-exts is impressive, I doubt it comes with a 
 typechecker for GHC Haskell.



HaRe does require a type checker, but we use hint for that, not Programmatica. 
So haskell-src-exts shouldn't interfere... but it would be nice to move over to 
a fully type-decorated AST, if possible.

Chris.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: ANNOUNCE: HaRe, the Haskell Refactorer 0.6

2010-06-29 Thread Ivan Lazar Miljenovic
Sebastian Fischer s...@informatik.uni-kiel.de writes:

 Hello Chris,

 Chris Brown wrote:

 we are pleased to announce the availability of HaRe 0.6

 Great, I want to try it!

 While skimming the installation instructions I wondered why I couldn't
 just do

 cabal install HaRe

 Are there any problems with putting HaRe on Hackage?

Just because they haven't is my guess.

I've tried playing with an older version of HaRe; it's build system is a
little weird but I'm sure it can be converted into a Cabal-compatible
format.  Part of the problem if memory serves is the use of embedded
libraries that aren't on Hackage either.

The other possible problem is the license; I'm not sure what license
HaRe is under.

 I will probably install HaRe anyway but I guess it would be easier if
 I could just use cabal-install.

Of course, it would also be nice if HaRe could parse more than just
Haskell98... :p (I know, I know, it isn't easy to change parsers, etc.).


 Thanks!
 Sebastian


 --
 Underestimating the novelty of the future is a time-honored tradition.
 (D.G.)



 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: ANNOUNCE: HaRe, the Haskell Refactorer 0.6

2010-06-29 Thread Chris BROWN
Hi Sebastian,

 Great, I want to try it!
 

Thanks for you interest!

 While skimming the installation instructions I wondered why I couldn't just do
 
 cabal install HaRe
 
 Are there any problems with putting HaRe on Hackage?
 

I've looked at this before and I must say it's certainly not trivial to do 
this. In the build of HaRe, we build a (modified) version of Programatica as a 
dependency to the refactoring engine. We also need to have vim and emacs 
scripts available to the user after the install. 

One approach would be to separate out the Programatica part of HaRe into a 
hare-utils package, and then build hare on top of that dependency.

If you have any advice or experience with using cabal or any tips on getting 
HaRe cabalised we'd love to hear from you.

Kindest regards,
Chris.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: ANNOUNCE: HaRe, the Haskell Refactorer 0.6

2010-06-29 Thread Chris BROWN
Hi Ivan,

 I've tried playing with an older version of HaRe; it's build system is a
 little weird but I'm sure it can be converted into a Cabal-compatible
 format.  Part of the problem if memory serves is the use of embedded
 libraries that aren't on Hackage either.
 

That's correct. HaRe builds on top of Strafunski and (a slightly modified) 
Programatica. It may be possible to wrap these up into a utils package for HaRe.

 
 Of course, it would also be nice if HaRe could parse more than just
 Haskell98... :p (I know, I know, it isn't easy to change parsers, etc.).
 

HaRe works over the full Haskell 98 standard. We certainly wish to move HaRe 
over to GHC Haskell in the future, and this is currently an ongoing effort: if 
you have any ideas on how to help us do this please contact us.

Kindest regards,
Chris

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: ANNOUNCE: HaRe, the Haskell Refactorer 0.6

2010-06-29 Thread Ivan Lazar Miljenovic
Chris BROWN chr...@cs.st-andrews.ac.uk writes:
 
 Of course, it would also be nice if HaRe could parse more than just
 Haskell98... :p (I know, I know, it isn't easy to change parsers,
 etc.).
 

 HaRe works over the full Haskell 98 standard. We certainly wish to
 move HaRe over to GHC Haskell in the future, and this is currently an
 ongoing effort: if you have any ideas on how to help us do this please
 contact us.

I talked with you and Simon Thompson about this at PEPM, and at the time
you said that haskell-src-exts didn't have what you needed for HaRe.
What exactly do you need in a parser for it to be suitable for HaRe?

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: ANNOUNCE: HaRe, the Haskell Refactorer 0.6

2010-06-29 Thread Chris BROWN

On 29 Jun 2010, at 15:55, Ivan Lazar Miljenovic wrote:

 Chris BROWN chr...@cs.st-andrews.ac.uk writes:
 
 Of course, it would also be nice if HaRe could parse more than just
 Haskell98... :p (I know, I know, it isn't easy to change parsers,
 etc.).
 
 
 HaRe works over the full Haskell 98 standard. We certainly wish to
 move HaRe over to GHC Haskell in the future, and this is currently an
 ongoing effort: if you have any ideas on how to help us do this please
 contact us.
 
 I talked with you and Simon Thompson about this at PEPM, and at the time
 you said that haskell-src-exts didn't have what you needed for HaRe.
 What exactly do you need in a parser for it to be suitable for HaRe?

We need static semantics, including location information and a preservation of 
comments. 



Chris.___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: ANNOUNCE: HaRe, the Haskell Refactorer 0.6

2010-06-29 Thread Ivan Lazar Miljenovic
Chris BROWN chr...@cs.st-andrews.ac.uk writes:

 On 29 Jun 2010, at 15:55, Ivan Lazar Miljenovic wrote:
 I talked with you and Simon Thompson about this at PEPM, and at the time
 you said that haskell-src-exts didn't have what you needed for HaRe.
 What exactly do you need in a parser for it to be suitable for HaRe?

 We need static semantics, including location information and a
 preservation of comments.

The Annotated part of haskell-src-exts provides this I think:
http://hackage.haskell.org/packages/archive/haskell-src-exts/1.9.0/doc/html/Language-Haskell-Exts-Annotated.html

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe