[Haskell-cafe] ANNOUNCE: haskell-src-exts 1.14.0

2013-08-20 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.14.0! * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts * git repo: https://github.com/haskell-suite/haskell-src-extshttp://code.haskell.org/haskell-src-exts

Re: [Haskell-cafe] [Haskell] ANNOUNCE: haskell-src-exts 1.14.0

2013-08-20 Thread Niklas Broberg
Hi Niklas, 1) My most desired feature would be a syntax tree that does not pluck pluck comments out and make me treat them separately. It looks much easier to me to have a fully descriptive tree and (filter . concatMap) / traverse them out in some way than getting a list of comments and having

Re: [Haskell-cafe] ANNOUNCE: haskell-src-exts 1.14.0

2013-08-20 Thread Niklas Broberg
a file based on its LANGUAGE pragmas? Last I checked e.g. HSP simply enabled all extensions when parsing, which can cause code to be parsed incorrectly in some cases. On Tue, Aug 20, 2013 at 10:15 AM, Niklas Broberg niklas.brob...@gmail.com wrote: Fellow Haskelleers, I'm pleased

Re: [Haskell-cafe] ANNOUNCE: haskell-src-exts 1.14.0

2013-08-20 Thread Niklas Broberg
The first primary reason is technical: haskell-src-exts 1.14 revamps the Extension datatype, among other things to allow turning extensions on and off (similar to what Cabal allows). We also introduce the concept of a Language, separate from a set of extensions. This is the only

Re: [Haskell-cafe] Retrieving Haddock comments with haskell-src-exts

2013-08-16 Thread Niklas Broberg
...@fuuzetsu.co.ukwrote: On 14/08/13 19:02, Niklas Broberg wrote: Hi Mateusz, haskell-src-exts is not haddock-aware I'm afraid, so I don't have any real solution for you. The one you mention, i.e. going through the whole parse result and stiching things together manually seems like the best

Re: [Haskell-cafe] Retrieving Haddock comments with haskell-src-exts

2013-08-14 Thread Niklas Broberg
Hi Mateusz, haskell-src-exts is not haddock-aware I'm afraid, so I don't have any real solution for you. The one you mention, i.e. going through the whole parse result and stiching things together manually seems like the best bet if you want to use haskell-src-exts throughout. In the longer run,

[Haskell-cafe] ANNOUNCE: haskell-src-exts 1.13.5

2012-09-07 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.13.5! * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts * Darcs repo: http://code.haskell.org/haskell-src-exts There are two primary reasons for this

Re: [Haskell-cafe] Cabal install fails due to recent HUnit

2012-07-30 Thread Niklas Broberg
On Wed, Jul 25, 2012 at 12:22 PM, Ross Paterson r...@soi.city.ac.uk wrote: As I understand it, the plan is to modify the following packages in hackage in-situ to remove the test sections (which contain the troublesome conditionals): HUnit-1.2.5.0 bloomfilter-1.2.6.10 codemonitor-0.1

[Haskell-cafe] ANNOUNCE: haskell-src-exts 1.13.3

2012-05-10 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.13.3! * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts * Darcs repo: http://code.haskell.org/haskell-src-exts This release attempts to fix a bunch of

Re: [Haskell-cafe] Haskell source AST zipper with state

2012-05-03 Thread Niklas Broberg
On Thu, May 3, 2012 at 2:52 AM, Andrew Seniuk ras...@gmail.com wrote: Note that the Annotated version of the HSE parser/AST will probably not provide enough generality for the sorts of attributes you want to store (it's for source locations, unless something changed in the most recent

[Haskell-cafe] ANNOUNCE: hsx-0.10.1, hjscript-0.6.0, hsp-0.7.0

2012-04-23 Thread Niklas Broberg
Hi all, I'm pleased to announce the release of the latest versions of the libraries in the Haskell Server Pages suite. Haskell Server Pages enables literal XML syntax to be used mixed with Haskell code (like e.g. PHP), in a sane way (unlike said PHP). In principle the functionality could be used

[Haskell-cafe] No email verification token from trac.haskell.org

2012-04-23 Thread Niklas Broberg
Hi all, I have problems with my trac for haskell-src-exts. When I log in, I am asked to verify my email address, but no verification token is ever sent to my email address. And before I verify my address, I'm not allowed to do anything on the trac. Help? :-) /Niklas

Re: [Haskell-cafe] No email verification token from trac.haskell.org

2012-04-23 Thread Niklas Broberg
On Mon, Apr 23, 2012 at 5:13 PM, Johan Tibell johan.tib...@gmail.comwrote: On Mon, Apr 23, 2012 at 7:42 AM, Niklas Broberg niklas.brob...@gmail.com wrote: I have problems with my trac for haskell-src-exts. When I log in, I am asked to verify my email address, but no verification token

[Haskell-cafe] ANNOUNCE: haskell-src-exts-1.13.2

2012-04-18 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.13.2! * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts * Darcs repo: http://code.haskell.org/haskell-src-exts This release contains only a few small tweaks

[Haskell-cafe] GSoC project idea: haskell-type-exts

2012-03-28 Thread Niklas Broberg
(Niklas Broberg) am more than willing to mentor this project. == Further reading: == [1] S. Peyton Jones, D. Vytiniotis, S. Weirich, and M. Shields. Practical type inference for arbitrary-rank types. [2] D. Vytiniotis, S. Peyton Jones, T. Schrijvers, M. Sulzmann. OutsideIn(X) – Modular type inference

[Haskell-cafe] ANNOUNCE: haskell-src-exts-1.13.0

2012-03-28 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.13.0! * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts * Darcs repo: http://code.haskell.org/haskell-src-exts It's been a *very short* while since the last

[Haskell-cafe] ANNOUNCE: haskell-src-exts-1.12.0

2012-03-27 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.12.0! * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts * Darcs repo: http://code.haskell.org/haskell-src-exts It's been a long while since the last update

Re: [Haskell-cafe] generating parens for pretty-printing code in haskell-src-exts

2012-01-21 Thread Niklas Broberg
Hi Conal, On Sun, Jan 15, 2012 at 6:45 AM, Conal Elliott co...@conal.net wrote: I'm using haskell-src-exts together with SYB for a code-rewriting project, and I'm having difficulty with parenthesization. I naïvely expected that parentheses would be absent from the abstract syntax, being

Re: [Haskell-cafe] Type checker for haskell-src-exts (was: Typechecking Using GHC API)

2011-12-16 Thread Niklas Broberg
On Thu, Dec 15, 2011 at 5:33 PM, Sean Leather leat...@cs.uu.nl wrote: On Thu, Dec 15, 2011 at 11:07, Niklas Broberg wrote: Envisioned: The function you ask for can definitely be written for haskell-src-exts, which I know you are currently using. I just need to complete my type checker

Re: [Haskell-cafe] Type checker for haskell-src-exts (was: Typechecking Using GHC API)

2011-12-16 Thread Niklas Broberg
On Thu, Dec 15, 2011 at 6:24 PM, Thomas Schilling nomin...@googlemail.comwrote: What exactly are the hopes for such a type checker? I can understand it being interesting as a research project, but as a realistic tools there are two huge issues: 1. It's going to take a LOT of time to reach

Re: [Haskell-cafe] Typechecking Using GHC API

2011-12-15 Thread Niklas Broberg
Currently: Your only option is to use GHC API if you want type checking. I can't help you with that, sorry. Envisioned: The function you ask for can definitely be written for haskell-src-exts, which I know you are currently using. I just need to complete my type checker for haskell-src-exts

Re: [Haskell-cafe] haskell-src-exts should depend on happy

2011-08-28 Thread Niklas Broberg
On Thu, Aug 25, 2011 at 6:17 PM, Brent Yorgey byor...@seas.upenn.eduwrote: On Thu, Aug 25, 2011 at 04:47:30PM +0100, Ozgur Akgun wrote: Hi, cabal installing haskell-src-exts fails, because of an unlisted dependency to the happy executable. It does list a dependency on happy:

[Haskell-cafe] ANNOUNCE: haskell-src-exts 1.11.1

2011-05-25 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.11.1! * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts * Darcs repo: http://code.haskell.org/haskell-src-exts This major release fixes some long-standing

Re: [Haskell-cafe] Cabal upload failure

2011-05-25 Thread Niklas Broberg
Yep, works fine now, thanks! /Niklas On Tue, May 24, 2011 at 2:52 PM, Ross Paterson r...@soi.city.ac.uk wrote: Version skew problem -- I hope it's fixed now. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] code review?

2011-05-25 Thread Niklas Broberg
On Tue, May 24, 2011 at 7:18 PM, Neil Mitchell ndmitch...@gmail.com wrote: Before doing a code review I always demand that the author runs over the code with HLint (http://community.haskell.org/~ndm/hlint) - they Very good point. In fact you just inspired me to finally download it and

[Haskell-cafe] Hackage internal server error

2011-05-24 Thread Niklas Broberg
nibro@nibro-laptop:~/src/haskell-src-exts$ cabal sdist Building source dist for haskell-src-exts-1.11.1... Preprocessing library haskell-src-exts-1.11.1... Source tarball created: dist/haskell-src-exts-1.11.1.tar.gz nibro@nibro-laptop:~/src/haskell-src-exts$ cabal upload

Re: [Haskell-cafe] Cabal upload failure

2011-05-24 Thread Niklas Broberg
On 24 May 2011 19:48, Emil Axelsson e...@chalmers.se wrote: Hello! I'm trying to upload a new version of syntactic, but Hackage gives the error: 500 Internal Server Error stdin: hWaitForInput: invalid argument (Invalid or incomplete multibyte or wide character) In fact, I get the same

Re: [Haskell-cafe] Wanted: composoable parsers from haskell-src-exts

2011-03-17 Thread Niklas Broberg
I already export a partial parser for top-of-file pragmas, I see. What I don't see is how such a parser would return the rest of input. Hmm. I see. And I see that you are correct in not seeing it, since it appears it cannot be done with Happy, which I believed. It would then be down to the

Re: [Haskell-cafe] Wanted: composoable parsers from haskell-src-exts

2011-03-15 Thread Niklas Broberg
Hi Johannes, The answer is: A) You can't, the way haskell-src-exts is built. You need to specify the %partial directives in the happy grammar, so without editing haskell-src-exts there's no way you could tack on partiality to the existing parsing primitives. B) It's a great feature request (to

[Haskell-cafe] trac.haskell.org problem

2011-02-27 Thread Niklas Broberg
, 2011 8:41 AM To: Niklas Broberg Subject: Re: Again a question about haskell-src-exts. On Feb 28, 2011, at 8:39 AM, Niklas Broberg wrote: I suppose I do - to the extend I can. What's the issue? :-) The system does not send out verification e-mails, so I can not really register completely

Re: [Haskell-cafe] Haskell for children? Any experience?

2011-01-27 Thread Niklas Broberg
Ye gods! A B D [1] language for kids? At least give them a fighting chance [2] at becoming future developers. Haskell's immutability is good for mathematics but doing anything else takes a great deal of up-front patience and perseverance, two very rare qualities in that demographic if my

[Haskell-cafe] ANNOUNCE: haskell-src-exts 1.10.1

2011-01-12 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.10.1! * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts * Darcs repo: http://code.haskell.org/haskell-src-exts Unless you are using the XmlSyntax extension,

[Haskell-cafe] Re: Add haskell-src as an official machine-readable component of the Haskell standard

2010-11-16 Thread Niklas Broberg
(Moving to Café) (Examples of controversies possible in haskell-src: we have the Hs prefix on constructors everywhere, we can't provide fixity information (and the haskell-src-exts implementation of this is unsatisfactory in several important ways) ... What ways?

[Haskell-cafe] Re: change in overlapping instance behavior between GHC 6.12 and GHC 7 causes compilation failure

2010-11-09 Thread Niklas Broberg
What changed between GHC 6.12 and GHC 7.0? Is there a some solution besides using IncoherentInstances in every module that imports XMLGenerator? I just want to point out that IncoherentInstances is NOT a solution. It would probably make the files compile, but not at all with the semantics we

[Haskell-cafe] ANN: language-java-0.1.0

2010-10-28 Thread Niklas Broberg
Hi café, I found myself in need of a source manipulation suite for Java code. A hackage search turned up nothing, so I wrote one: http://hackage.haskell.org/package/language-java I'm sure there are a number of bugs waiting to be discovered, my own testing hasn't been overly extensive. I'm

[Haskell-cafe] Re: ANN: language-java-0.1.0

2010-10-28 Thread Niklas Broberg
I'm sure there are a number of bugs waiting to be discovered, my own testing hasn't been overly extensive. I'm setting up a trac, will follow up with its location once it's up. http://trac.haskell.org/language-java Cheers, /Niklas ___ Haskell-Cafe

Re: [Haskell-cafe] Re: How to make cabal pass flags to happy?

2010-10-20 Thread Niklas Broberg
Thanks for the answers, all. :-) Since this doesn't seem to be the common knowledge I expected it to be, I'll try to work out how it's done properly and blog about it. And hopefully generate some much needed documentation for cabal along the way. What I want specifically is to have happy

[Haskell-cafe] Re: How to make cabal pass flags to happy?

2010-10-13 Thread Niklas Broberg
On Fri, Oct 8, 2010 at 4:55 PM, Niklas Broberg niklas.brob...@gmail.com wrote: Hi all, I want to do something I thought would be quite simple, but try as I might I can't find neither information nor examples on how to achieve it. What I want specifically is to have happy produce a GLR

[Haskell-cafe] How to make cabal pass flags to happy?

2010-10-08 Thread Niklas Broberg
Hi all, I want to do something I thought would be quite simple, but try as I might I can't find neither information nor examples on how to achieve it. What I want specifically is to have happy produce a GLR parser from my .ly file, and I want this to happen during 'cabal install'. Which in turn

Re: [Haskell-cafe] ANN: alex-meta-0.1.1 and happy-meta-0.1.1

2010-09-23 Thread Niklas Broberg
2010/9/22 Jonas Almström Duregård jonas.dureg...@chalmers.se: I'm pleased to announce alex-meta and happy-meta! These libraries provide quasi-quoter frontends and Template Haskell backends to the Alex lexer generator and the Happy parser generator respectively. Awesome! /Niklas

[Haskell-cafe] ANN: haskell-src-exts 1.9.0

2010-04-11 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.9.0! * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts * Darcs repo: http://code.haskell.org/haskell-src-exts 1.8.2 -- 1.9.0 === * OptionPragma

Re: [Haskell-cafe] haskell-src type inference algorithm?

2010-02-12 Thread Niklas Broberg
On Fri, Feb 12, 2010 at 10:14 AM, Lennart Augustsson lenn...@augustsson.net wrote: Well, something like such a tool exists, but I can't give it away. I know. :-) /Niklas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] haskell-src type inference algorithm?

2010-02-11 Thread Niklas Broberg
Anyone know of a type inference utility that can run right on haskell-src types? or one that could be easily adapted? This is very high on my wish-list for haskell-src-exts, and I'm hoping the stuff Lennart will contribute will go a long way towards making it feasible. I believe I can safely

Re: [Haskell-cafe] Anyone up for Google SoC 2010?

2010-02-05 Thread Niklas Broberg
On Fri, Feb 5, 2010 at 8:55 PM, Edward Kmett ekm...@gmail.com wrote: You can add me to the list of voices that were unwilling to use it before the summer-of-code project due to the random incompatibilities caused by the huge supply of extensions it supported out of the box, but who were happy

Re: [Haskell-cafe] Anyone up for Google SoC 2010?

2010-02-05 Thread Niklas Broberg
There may be an eternal discussion on it, but it seems pretty clear to me which side SoC comes down on: http://code.google.com/soc/ I'm really not sure what you're getting at. How do the points you list not relate to my project? And how does my analogy contradict any of those points? If the

[Haskell-cafe] ANN: haskell-src-exts-1.8.0

2010-01-31 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.8.0! * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts * Darcs repo: http://code.haskell.org/haskell-src-exts For users of hsx, the latest version 0.6.1

[Haskell-cafe] Re: ANN: haskell-src-exts-1.8.0

2010-01-31 Thread Niklas Broberg
1.7.2 -- 1.8.0 === ... and one more I forgot: Export 'knownExtensions' from .Extension. /Niklas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] ANN: haskell-src-exts 1.7.0

2010-01-15 Thread Niklas Broberg
Fellow Haskelleers, As I was asked to start spamming again, I'm hereby pleased to announce the release of haskell-src-exts-1.7.0! * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts * Darcs repo: http://code.haskell.org/haskell-src-exts

[Haskell-cafe] Haddock question: hiding internal instances

2010-01-15 Thread Niklas Broberg
Hi all, The question I have is this: How can I get Haddock to omit listing instances of package-internal data types for exported classes? Here's an example of what I mean: http://hackage.haskell.org/packages/archive/haskell-src-exts/1.6.0/doc/html/Language-Haskell-Exts-Pretty.html#t%3APretty

Re: [Haskell-cafe] Haddock question: hiding internal instances

2010-01-15 Thread Niklas Broberg
The question I have is this: How can I get Haddock to omit listing instances of package-internal data types for exported classes? You currently can't, unfortunately. See:  http://trac.haskell.org/haddock/ticket/37 Roger that, cc added. Cheers, /Niklas

Re: [Haskell-cafe] ANN: haskell-src-exts 1.7.0

2010-01-15 Thread Niklas Broberg
* UnicodeSyntax now works not only for identifiers, but also for does this mean that unicode identifiers are allowed only when UnicodeSyntax enabled? ghc allows them anyway Well spotted, that was poorly worded of me. haskell-src-exts works like GHC, allowing Unicode identifier always and

[Haskell-cafe] Re: ANN: haskell-src-exts 1.7.0

2010-01-15 Thread Niklas Broberg
* UnicodeSyntax now works not only for identifiers, but also for  -, - and =, as well as Arrows arrows and kind stars. (And  before you send me bug reports for this one, do check that your  version of readFile is Unicode aware, i.e. you use GHC 6.12  or the utf8-string version). ... and with

Re: [Haskell-cafe] Language simplicity

2010-01-14 Thread Niklas Broberg
Since you can define operators in Haskell, would it make sense to include '=', '--', ':', ',' etc. as reserved names since those can't be used as operator names? They are indeed reserved operators in the report. 11 of those: .. : :: = \ | - - @ ~ = To be fair, _ is also a reserved

Re: [Haskell-cafe] on Happstack - embedded HTML

2010-01-12 Thread Niklas Broberg
[1] http://www.cs.chalmers.se/~d00nibro/hsp/ Oops. Seeing this link was a rather painful reminder that I ought to update that page. Last update was 2005, HSP has evolved quite a lot since then... The best way to get info on HSP in its current state is probably to check out some of the stuff

Re: [Haskell-cafe] Language simplicity

2010-01-12 Thread Niklas Broberg
Haskell '98 apparently features 25 reserved words. (Not counting forall and mdo and so on, which AFAIK are not in Haskell '98.) 21 actually. case, class, data, default, deriving, do, else, if, import, in, infix, infixl, infixr, instance, let, module, newtype, of, then, type, where. There's also

Re: [Haskell-cafe] ANNOUNCE: SourceGraph-0.6.0.2

2010-01-10 Thread Niklas Broberg
On another note, anyone know why Niklas Broberg hasn't been making any release statements recently to say what the changes are, etc. for haskell-src-exts? Because it's been so many relatively small releases of late that I haven't wanted to spam the lists. :-) If you want to keep up to date

Re: [Haskell-cafe] ANN: Happstack 0.4.1

2009-12-19 Thread Niklas Broberg
  GHC 6.12 currently requires a minor patch to HJScript. Details here: HJScript-0.4.5 is now on hackage, fixing this problem. Thanks for the heads-up. Cheers, /Niklas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] haskell-src-exts Question

2009-11-13 Thread Niklas Broberg
Hi Dominic, On Fri, Nov 13, 2009 at 9:49 AM, Dominic Steinitz domi...@steinitz.org wrote: I would have expected the prettyprinter to produce this: pay tPD (a (length tOD + -1)) Do I have to write my own prettyprinter? Do I have to put in explicit parentheses? The latter seems unsatisfactory

Re: [Haskell-cafe] haskell-src-exts Question

2009-11-13 Thread Niklas Broberg
Surely you do want this. It's the biggest problem with the original haskell-src package, that it cannot print out any useful Haskell code obtained from the parser, because it forgets all the brackets. I should point out that haskell-src-exts already fixes this for code obtained from the

[Haskell-cafe] ANN: haskell-src-exts-1.3.0

2009-11-04 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.3.0! * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts * Darcs repo: http://code.haskell.org/haskell-src-exts Version 1.3.0 is a new major release, following

[Haskell-cafe] ANN: haskell-src-exts-1.2.0

2009-10-23 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.2.0! * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts * Darcs repo: http://code.haskell.org/haskell-src-exts Version 1.2.0 is a new major release, following

[Haskell-cafe] Re: ANN: haskell-src-exts-1.2.0

2009-10-23 Thread Niklas Broberg
* On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts Actually, it seems something went awry. I got a 500 Internal Server Error on my cabal upload, the package is there on hackage but it seems it was never added to the list of packages.

Re: [Haskell-cafe] pretty printing with comments

2009-10-22 Thread Niklas Broberg
I'll see when I can get to fixing it, hopefully it won't be long. Two fairly easy bugs to fix, darcs repo is updated. It's probably high time I did another release, stay tuned. I just can't believe I didn't have a single class declaration in my test suite to catch the first one! Or that no one

Re: [Haskell-cafe] pretty printing with comments

2009-10-20 Thread Niklas Broberg
Hi Pasqualino, I am looking at the haskell-src-ext library. It can parse files with comments and it can pretty print but, for what I can see it cannot do both :-)  (prettyPrint won't work on the structure returned by parseFileWithComments). What you want is exactPrint, defined in

Re: [Haskell-cafe] pretty printing with comments

2009-10-20 Thread Niklas Broberg
Hi again, However: - The source code produced was incorrect: class Dir d where was rewritten as: class Dir dwhere{ That's weird, I'll look into it, thanks. instance Dir Directory where  localDir (Local f) = return f type URL= String was rewritten as: instance Dir Directory

Re: [Haskell-cafe] pretty printing with comments

2009-10-20 Thread Niklas Broberg
instance Dir Directory where  localDir (Local f) = return f  typeURL= String Sorry, I don't see the difference between these two. Did you write the correct one twice by mistake? In case Pasqualino doesn't see your mail real soon... Maybe the difference is the missing space between type

Re: [Haskell-cafe] pretty printing with comments

2009-10-20 Thread Niklas Broberg
Hi again, I attach a source fragment and another file with the pretty printed output containing these three errors. Thanks, I've opened a ticket for this issue here: http://trac.haskell.org/haskell-src-exts/ticket/65 I'll see when I can get to fixing it, hopefully it won't be long. Cheers,

Re: [Haskell-cafe] Can type be changed along a = chain?

2009-10-12 Thread Niklas Broberg
On Mon, Oct 12, 2009 at 6:37 PM, michael rice nowg...@yahoo.com wrote: transform :: IO () transform = putStrLn What is your digit string? getLine = \str - return ('9':str) = \str - return (read str :: Int) = \i - putStrLn $ The number is ++ show i This

[Haskell-cafe] Need some help with Alex macros

2009-10-04 Thread Niklas Broberg
Hi all, I'm going crazy trying to get Alex to do what I want. I have the following regexp macros: @octEscape = [0123]? $octdig{1,2} @hexEscape = 'u' $hexdig{4} @charEscape = '\\' (@octEscape | @hexEscape | b | t | n | f | r | \ | \') and the following rules: \' (. # [\'\\] | @charEscape)

Re: [Haskell-cafe] Alex problem, help needed!!!!!!!!! ASAP :)

2009-10-03 Thread Niklas Broberg
$digit+ { \p s - TokenEntero p (read s) } \' [$alpha $digit \_]* \'    { \p s - TokenString p (read s)} [$digit]+\.[$digit]+ { \p s - TokenDouble p (read s) } $alpha [$alpha $digit \_]*{ \p s - TokenVar p (read s) } You are using

Re: [Haskell-cafe] Splitting data and function declarations over multiple files

2009-09-30 Thread Niklas Broberg
Hi Peter, sounds to me you want to have a look at Open Data Types and Open Functions by Andres Löh and Ralf Hinze: http://people.cs.uu.nl/andres/OpenDatatypes.pdf Cheers, /Niklas On Wed, Sep 30, 2009 at 5:54 PM, Peter Verswyvelen bugf...@gmail.com wrote: I guess this is related to the

[Haskell-cafe] ANN: haskell-src-exts-1.1.4

2009-09-03 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.1.4! * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via cabal: cabal install haskell-src-exts * Via darcs: darcs get http://code.haskell.org/haskell-src-exts * Report bugs:

Re: [Haskell-cafe] ANN: haskell-src-exts-1.1.4

2009-09-03 Thread Niklas Broberg
Roundtrip is an important milestone for automated refactoring tools. Nice work! Thanks a lot! Refactoring was indeed the 'killer app' in mind when writing the exact-printer. For instance I don't expect it to be hard to get HLint to apply suggestions automatically now, instead of just suggesting

Re: [Haskell-cafe] ANN: haskell-src-exts-1.1.3

2009-08-23 Thread Niklas Broberg
Oops, please consider this the announcement of the release of haskell-src-exts-1.1.3.1, since I stupidly forgot to add the new SrcLoc module to the list of exposed modules in cabal (why doesn't cabal warn about that? *grumble*). So those of you who already tried 1.1.3 it will have noticed that it

[Haskell-cafe] ANN: haskell-src-exts-1.1.3

2009-08-22 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.1.3. * On hackage: http://hackage.haskell.org/package/haskell-src-exts * Via darcs: darcs get http://code.haskell.org/haskell-src-exts * Report bugs: http://trac.haskell.org/haskell-src-exts haskell-src-exts is a

Re: [Haskell-cafe] haskell code pretty printer ?

2009-08-03 Thread Niklas Broberg
Hi Paul, is there a pretty printer for haskell code somewhere ? I've googled and caballisted for this without success. I've written some small script using Language.Haskell.Pretty and Language.Haskell.Parser but the result isn't that 'pretty'. I mean, it outputs readable code but

[Haskell-cafe] ANN: haskell-src-exts-1.1.0

2009-07-26 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to announce the release of haskell-src-exts-1.1.0, bringing you tuple sections, comments, and a few bug fixes. haskell-src-exts is a package for Haskell source code manipulation. In particular it defines an abstract syntax tree representation, and a parser and

Re: [Haskell-cafe] Re: ANN: haskell-src-exts-1.0.0

2009-06-23 Thread Niklas Broberg
Hi Maurício, How far is Unicode from beeing parsed? It doesn't seem to be a huge step (from my ill-informed viewpoint), and it would not let behind those who are happy to be able to declare names in their own native language. (Oh, and sorry for resorting to politically correct blackmail...)

Re: [Haskell-cafe] Type system trickery

2009-06-22 Thread Niklas Broberg
Not nearly as annoying as this:  data Foobar a where   Foo :: X - Y - Foobar NoZoo   Bar :: X - Y - Foobar NoZoo   Zoo :: Foobar NoZoo - Foobar Zoo For some reason, if I do this I get endless type check errors. I have to change the top two back to Foobar a before it will work. *sigh*

[Haskell-cafe] ANN: haskell-src-exts-1.0.0

2009-06-22 Thread Niklas Broberg
Fellow Haskelleers, It is with great pleasure I hereby announce the first stable release of the haskell-src-exts package, version 1.0.0! haskell-src-exts is a package for Haskell source code manipulation. In particular it defines an abstract syntax tree representation, and a parser and

Re: [Haskell-cafe] Type system trickery

2009-06-21 Thread Niklas Broberg
On Sun, Jun 21, 2009 at 9:24 PM, Andrew Coppinandrewcop...@btinternet.com wrote: I have a datatype with about a dozen constructors. I'd like to find a way to use the type system to prevent one of the constructors from being used in certain places. But I can't think of a way to do that.  data

Re: [Haskell-cafe] Type system trickery

2009-06-21 Thread Niklas Broberg
That's what GADTs are for: data Flag = HasZoo | NoZoo Eh, I wrote this a bit fast obviously (no dependent types here). Like Daniel Fischer wrote, these should rather be separate data types, i.e. data HasZoo data NoZoo The rest is still correct though. data Foobar a where  Foo :: Foobar a

[Haskell-cafe] Re: ANN: haskell-src-exts 1.0.0 rc1 (aka 0.5.2)

2009-06-21 Thread Niklas Broberg
Dear all, I'm pleased to announce to you haskell-src-exts-0.5.7, which is truly the first *real* release candidate for 1.0.0. By real, I mean that I could consider releasing it in this state. It is feature complete, fully documented, and has no remaining known bugs. But before I do, I'd like to

[Haskell-cafe] Re: ANN: haskell-src-exts 1.0.0 rc1 (aka 0.5.2)

2009-06-19 Thread Niklas Broberg
Hi all, Another day, another release candidate. Please see haskell-src-exts-0.5.5, 1.0.0 rc3. Thanks a lot to all reports, and please keep up the good work! Here we go again. Please have a look at haskell-src-exts-0.5.6, or 1.0.0 rc4. Thanks again for the reports, they're all truly

[Haskell-cafe] Re: ANN: haskell-src-exts 1.0.0 rc1 (aka 0.5.2)

2009-06-18 Thread Niklas Broberg
I have just uploaded haskell-src-exts-0.5.4 to hackage, which is 1.0.0 rc2. Thanks a lot to those who tested the previous version, and please continue to test and report! Another day, another release candidate. Please see haskell-src-exts-0.5.5, 1.0.0 rc3. Thanks a lot to all reports, and

[Haskell-cafe] Re: [Haskell] ANN: haskell-src-exts 1.0.0 rc1 (aka 0.5.2)

2009-06-17 Thread Niklas Broberg
Hi Sebastian, This script may even simplify testing of large code bases: Thanks a lot, very useful! I'll add that to the darcs repository if you don't mind. :-) Cheers, /Niklas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Re: ANN: haskell-src-exts 1.0.0 rc1 (aka 0.5.2)

2009-06-17 Thread Niklas Broberg
Hi all, This means I feel ready to take that scary leap that means to drop the safe 0.x version numbering (experimental) and finally make the first stable release, version 1.0.0. But before I take that leap I want the library to be thoroughly tested, so I can with confidence say that it

[Haskell-cafe] ANN: haskell-src-exts 1.0.0 rc1 (aka 0.5.2)

2009-06-16 Thread Niklas Broberg
Fellow Haskelleers, I'm pleased to report that I feel I have now completed the first milestone in my GSoC project for haskell-src-exts: Full Code Support. This means I feel ready to take that scary leap that means to drop the safe 0.x version numbering (experimental) and finally make the first

[Haskell-cafe] Re: ANN: haskell-src-exts 1.0.0 rc1 (aka 0.5.2)

2009-06-16 Thread Niklas Broberg
* Via cabal: cabal install haskell-src-exts Thanks a lot to Brian Lewis for catching the first bug - cabal install doesn't even work for 0.5.2! The problem is that the cabal test machinery can't find the Language.Haskell.Exts modules, unless haskell-src-exts is already installed first... At any

[Haskell-cafe] Re: FlexibleContexts and FlexibleInstances

2009-06-10 Thread Niklas Broberg
Hi Claus, What you describe is exactly how I would *want* things to work. It's nice to hear my wishes echoed from a user perspective. :-) On Wed, Jun 10, 2009 at 4:43 PM, Claus Reinkeclaus.rei...@talk21.com wrote: just a few comments from a user (who would really, really, like to be able to

[Haskell-cafe] FlexibleContexts and FlexibleInstances

2009-06-09 Thread Niklas Broberg
Dear all, This post is partly a gripe about how poor the formal documentation for various GHC extensions is, partly a gripe about how GHC blurs the lines between syntactic and type-level issues as well as between various extensions, and partly a gripe about how the Haskell 98 report is sometimes

[Haskell-cafe] Re: ANN: New repository and trac for haskell-src-exts

2009-05-26 Thread Niklas Broberg
Do you want people to cc bugs they want to vote for - like the GHC people do? Absolutely. Seeing the relative interest in various features would definitely be helpful in steering my (and others') efforts. /Niklas ___ Haskell-Cafe mailing list

[Haskell-cafe] ANN: New repository and trac for haskell-src-exts

2009-05-25 Thread Niklas Broberg
Hi all, In preparation for my GSoC project, I've set up some new infrastructure for the haskell-src-exts package. Instead of residing with the HSP packages, it's now old enough to be allowed to live on its own. The new repository is darcs get http://code.haskell.org/haskell-src-exts I've also

Re: [Haskell-cafe] types and braces

2009-04-15 Thread Niklas Broberg
Hi Conor, Conor McBride: The trouble is, the production I've added causes a reduce/reduce conflict in the grammar, but I don't get any more precise complaint than that. To get more precise complaints, you should give the -i flag to happy, that will cause happy to print the whole parser table

Re: [Haskell-cafe] Bug in HLint or haskell-src-exts?

2009-02-28 Thread Niklas Broberg
Hi Martin, both of your problems are due to known deficiencies in haskell-src-exts, and I'm working on solving them. The first comes from its subpar handling of newtype deriving for MPTCs, the second from a weird case where you (currently) need spaces around -, i.e. in your example write (x - y)

Re: [Haskell-cafe] ANN: HDBC v2.0 now available

2009-02-01 Thread Niklas Broberg
So in the next cabal-install release (which should be pretty soon now) configure will do the same thing and pick base 3 unless you specify build-depends base = 4. ... and so there will never be any incentive for these many packages to migrate to base-4, which also has consequences for packages

Re: [Haskell-cafe] ANN: HDBC v2.0 now available

2009-02-01 Thread Niklas Broberg
I really really think this is the wrong way to go. Occasional destruction is desperately needed for progress, else things will invariably stagnate. I disagree. Having everything fail (we measured it as ~90% of hackage) when people upgraded to ghc-6.10 would have been a disaster. Do you

Re: [Haskell-cafe] ANN: HDBC v2.0 now available

2009-01-30 Thread Niklas Broberg
Thanks for the hint for folks. Why would cabal-install select a different base than running Setup manually? Someone thought it was a good idea to make base-3 the preferred selection for cabal-install, to make the transition from base-3 to base-4 as smooth as possible. It may have worked for

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Niklas Broberg
I still think existential quantification is a step too far though. :-P Seriously, existential quantification is a REALLY simple concept, that you would learn week two (or maybe three) in any introductory course on logic. In fact, I would argue that far more people probably know what existential

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Niklas Broberg
On Sat, Jan 17, 2009 at 12:14 AM, Anton van Straaten an...@appsolutions.com wrote: I still think existential quantification is a step too far though. :-P Seriously, existential quantification is a REALLY simple concept, that you would learn week two (or maybe three) in any introductory course

  1   2   >