Re: [Haskell-cafe] indentation with let and do

2013-10-03 Thread AlanKim Zimmerman
The first version has bar True and False all at the same indentation level. As such they are seen as standalone expressions, rather than being nested under the one introduced by bar. See http://en.wikibooks.org/wiki/Haskell/Indentation On Thu, Oct 3, 2013 at 8:31 PM, Corentin Dupont

Re: [Haskell-cafe] GHC API question: Getting access to cpp processed source

2013-09-11 Thread AlanKim Zimmerman
Thanks for the reference, but GHC already invokes the CPP. I think I am going to have to invoke a load of the module with ghc flags set to keep the output of the CPP phase, and then re-invoke it on that output to get the tokens. My question is more whether this CPP output can be kept in the GHC

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread AlanKim Zimmerman
I think the normal motivation for cucumber syntax is that it is a way to communicate requirements with non-technical people. On Tue, Sep 10, 2013 at 11:48 AM, John Wiegley jo...@fpcomplete.com wrote: Niklas Hambüchen m...@nh2.me writes: Code written in cucumber syntax is concise and easy

[Haskell-cafe] GHC API question: Getting access to cpp processed source

2013-09-10 Thread AlanKim Zimmerman
Hi Cafe I have just discovered that GHC.getTokenStream fails if it is used on a module with CPP directives in it. This is reported in http://ghc.haskell.org/trac/ghc/ticket/8265 Is there an easy way to get access to the pre-processed source, without having to explicitly write it to an output

Re: [Haskell-cafe] ghc-mod v3.0.0

2013-09-06 Thread AlanKim Zimmerman
Is this backward compatible with older versions of Cabal? I am considering whether to migrate HaRe to use this, I would prefer not to have it then fail to work on older systems that are constrained not to be able to update Cabal. Alan On Fri, Sep 6, 2013 at 7:29 AM, Kazu Yamamoto k...@iij.ad.jp

Re: [Haskell-cafe] ghc-mod v3.0.0

2013-09-06 Thread AlanKim Zimmerman
Ok, thanks. On Fri, Sep 6, 2013 at 9:52 AM, Kazu Yamamoto k...@iij.ad.jp wrote: Alan, Is this backward compatible with older versions of Cabal? I am considering whether to migrate HaRe to use this, I would prefer not to have it then fail to work on older systems that are constrained

[Haskell-cafe] ANNOUNCE: Haskell Refactorer (HaRe) version 0.7.0.0

2013-09-04 Thread AlanKim Zimmerman
I am please to announce an alpha release of the Haskell Refactorer making use of the GHC API. It is a work in progress, but currently supports the following refactorings iftocase Convert an if expression to a case expression dupdef Duplicate a definition

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

2013-08-20 Thread AlanKim Zimmerman
This is not using haskell-src-exts, but the Haskell Refactorer has a structure to keep a parallel tree of tokens indexed by SrcSpan, which attempts to allocate comments to the appropriate point. See https://github.com/alanz/HaRe/blob/master/src/Language/Haskell/Refact/Utils/TokenUtils.hs. It does

Re: [Haskell-cafe] getting exported original names using the GHC API

2013-07-04 Thread AlanKim Zimmerman
If you use the ParsedSource representation, http://www.haskell.org/ghc/docs/latest/html/libraries/ghc-7.6.3/HsSyn.html#t:HsModule, the LIE entry still has a RdrName which is represented as (IEVar (Qual {ModuleName: L} {OccName: find})))]) On Thu, Jul 4, 2013 at 7:11 PM, Pasqualino

Re: [Haskell-cafe] ANNOUNCE: haskell-names-0.1

2013-06-23 Thread AlanKim Zimmerman
On Fri, Jun 21, 2013 at 9:05 AM, AlanKim Zimmerman alan.z...@gmail.comwrote: I have a feeling the work-in-progress Haskell Refactorer using the GHC API may be able to provide this information through its library interface. When I have some time over the weekend I will have a look. Alan

Re: [Haskell-cafe] ANNOUNCE: haskell-names-0.1

2013-06-21 Thread AlanKim Zimmerman
I have a feeling the work-in-progress Haskell Refactorer using the GHC API may be able to provide this information through its library interface. When I have some time over the weekend I will have a look. Alan On Fri, Jun 21, 2013 at 8:44 AM, Michael Sloan mgsl...@gmail.com wrote: Roman:

Re: [Haskell-cafe] Promoting Haskell via Youtube movies

2013-06-17 Thread AlanKim Zimmerman
This looks like quite a good series https://www.youtube.com/user/jekor On Mon, Jun 17, 2013 at 8:30 PM, Vo Minh Thu not...@gmail.com wrote: Certainly less entertaining but depending on your public, this one with FP Complete's Aaron Contorer can be valuable:

Re: [Haskell-cafe] Testing invasive proposals with Hackager

2013-06-13 Thread AlanKim Zimmerman
Roman Cheplyaka has written a tool called HasFix for updating source based on new versions of libraries. The presentation on it is here http://ro-che.info/docs/ and the code is at https://github.com/feuerbach/hasfix Perhaps it could be pressed into use for automatic update of historical code?

Re: [Haskell-cafe] voting sytem DSL

2013-06-05 Thread AlanKim Zimmerman
Have you looked at http://frictionfreedemocracy.org/ They are using https://github.com/agocorona/Workflow amongst other things to define election work flows. Alan On Jun 5, 2013 11:25 PM, Corentin Dupont corentin.dup...@gmail.com wrote: Hi haskellers! I am trying to make a DSL able to