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

2013-08-20 Thread Dag Odenhall
Wouldn't it be better to only enable Haskell2010 and XmlSyntax and then rely on LANGUAGE pragmas? I guess optimally we want to add support for -Xoptions to hsx2hs but in the mean time… BTW I think hsx2hs is in fact affected by these backwards-incompatible changes, and lacks an upper bound on its H

Re: [Haskell] 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] ANNOUNCE: haskell-src-exts 1.14.0

2013-08-20 Thread Niklas Broberg
HSE parses based on pragmas by default. This can be configured through the ParseMode [1]. But your question regards HSP, Haskell Server Pages, which indeed just enables most extensions by default. Right now there's no way to configure that, but it shouldn't be hard for a skilled programmer to fix.

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

2013-08-20 Thread Dag Odenhall
Good stuff! Is there any way, or plans for a way, to parse 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 wrote: > Fellow Hask

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

2013-08-20 Thread Niklas Hambüchen
On 20/08/13 18:19, Niklas Broberg wrote: > Sadly not - it's theoretically impossible. The fact that you can put > comments literally wherever, means that it's impossible to treat them as > nodes of the AST. E.g. > > f {- WHERE -} x = -- WOULD > -- THESE > do -- COMMENTS > a

Re: [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 havi

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

2013-08-20 Thread Niklas Hambüchen
Nice! I hope that haskell-suite will eventually become awesome and solve most of our automation-on-Haskell-code needs. Two questions: 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 f