Simplifying Core pretty-printing via GHC API?

2013-05-01 Thread Conal Elliott
I'm using the GHC API to compile Haskell source code to Core. I'd like to
pretty-print the result with the sort of simplifications I get with
-dsuppress-type-applications, -dsuppress-uniques, etc (used in combination
with -ddump-simpl on ghc's command line). How can I set these options via
the GHC API? Has the answer changed since 7.4.1 (which I'm currently using)?

Thanks.  - Conal
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Simplifying Core pretty-printing via GHC API?

2013-05-01 Thread Johan Tibell
On Wed, May 1, 2013 at 2:13 PM, Conal Elliott co...@conal.net wrote:

 I'm using the GHC API to compile Haskell source code to Core. I'd like to
 pretty-print the result with the sort of simplifications I get with
 -dsuppress-type-applications, -dsuppress-uniques, etc (used in combination
 with -ddump-simpl on ghc's command line). How can I set these options via
 the GHC API? Has the answer changed since 7.4.1 (which I'm currently using)?


I'd also be interested in the answer and whatever you're working on Conal.
I spend more time looking at core than I like and anything that can made
that time more efficient would be great.
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Simplifying Core pretty-printing via GHC API?

2013-05-01 Thread Conal Elliott
I think I found an answer: invoke
parseStaticFlagshttp://www.haskell.org/ghc/docs/7.4.1/html/libraries/ghc/GHC.html#v:parseStaticFlags,
passing in the flags specified as if on the ghc command line. For instance:

parseStaticFlags $ noLoc $ [-dsuppress-uniques,
-dsuppress-type-applications, -dsuppress-idinfo]

This call must be made before a compilation gets made. I'm (now) doing it
before calling runGhc for the first time.

Johan: I'm working toward making a GHC back-end that maps from Core to a
programmable logic architecture (similar to FPGA).

-- Conal



On Wed, May 1, 2013 at 3:59 PM, Johan Tibell johan.tib...@gmail.com wrote:

 On Wed, May 1, 2013 at 2:13 PM, Conal Elliott co...@conal.net wrote:

 I'm using the GHC API to compile Haskell source code to Core. I'd like to
 pretty-print the result with the sort of simplifications I get with
 -dsuppress-type-applications, -dsuppress-uniques, etc (used in combination
 with -ddump-simpl on ghc's command line). How can I set these options via
 the GHC API? Has the answer changed since 7.4.1 (which I'm currently using)?


 I'd also be interested in the answer and whatever you're working on Conal.
 I spend more time looking at core than I like and anything that can made
 that time more efficient would be great.


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


[Haskell] 2 PhD student and 2 Post-doc positions at Gothenburg University, in Language Technology / Formal Methods

2013-05-01 Thread Koen Claessen
(Please spread this to interested candidates, application deadline is May 13th.)

We warmly welcome applicants with a strong background in functional programming!



The Department of Computer Science and Engineering (CSE) at the
University of Gothenburg and Chalmers University of Technology
announces 2 PhD positions and 2 post-doc positions within the research
project

  Reliable Multilingual Digital Communication: Methods and Applications (REMU)

funded by the Swedish Research Council (Vetenskapsrådet).

The CSE Department provides a strong, international, and dynamic
research environment with about 70 faculty and 70 PhD students from
about 30 countries. The PhD positions are located jointly in two
research groups: Language Technology and Formal Methods. The PhD
supervisors will be professors from these groups: Aarne Ranta (REMU
principal scientist), Koen Claessen, and Gerardo Schneider.



Link to the PhD student positions:

http://www.gu.se/english/about_the_university/announcements-in-the-job-application-portal/?languageId=11contentId=-1disableRedirect=truereturnUrl=http%3A%2F%2Fwww.gu.se%2Fomuniversitetet%2Faktuellt%2Fledigaanstallningar%2F%3Fid%3D19144%26Dnr%3D537224%26Type%3DSid=19144Dnr=537224Type=S

Link to the post-doc positions:

http://www.gu.se/english/about_the_university/announcements-in-the-job-application-portal/?languageId=11contentId=-1disableRedirect=truereturnUrl=http%3A%2F%2Fwww.gu.se%2Fomuniversitetet%2Faktuellt%2Fledigaanstallningar%2F%3Fid%3D19144%26Dnr%3D537259%26Type%3DSid=19144Dnr=537259Type=S

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


[Haskell] Haskell 2014

2013-05-01 Thread Ian Lynagh

Dear Haskellers,

We are pleased to announce that the Haskell 2014 committee has now
formed, and we would be delighted to receive your proposals for changes
to the language. Please see
http://hackage.haskell.org/trac/haskell-prime/wiki/Process
for details on the proposal process.

The committee will meet 4 times a year, to consider proposals completed
before:
* 1st August
* 1st November
* 1st February
* 1st May
so if you have been meaning to put the finishing touches to a proposal,
then we would encourage you to do so by the end of July!

The source for the Haskell report will be updated as proposals are
accepted, but new versions of the standard will only be released once a
year, during January.

The Haskell 2014 committee is comprised of:

* Carlos Camarão
* Iavor Diatchki
* Ian Lynagh (chair)
* John Meacham
* Neil Mitchell
* Ganesh Sittampalam
* David Terei
* Bas van Dijk
* Henk-Jan van Tuyl


Thanks
Ian (Haskell 2014 committee chair)
-- 
Ian Lynagh, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com/


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


[Haskell] ANN: hledger 0.20

2013-05-01 Thread Simon Michael
I'm pleased to announce hledger and hledger-web 0.20!

hledger is a command-line tool and haskell library for tracking
financial transactions, which are stored in a human-readable plain
text format. In addition to reporting, it can also help you record new
transactions, or convert CSV data from your bank. Add-on packages
include hledger-web (providing a web interface), hledger-irr and 
hledger-interest.

hledger is inspired by and compatible with John Wiegley's Ledger. For
more, see http://hledger.org .

Install it:

# cabal update; cabal install hledger-web

For more installation help, see http://hledger.org/MANUAL.html#installing .
Or, sponsor a ready-to-run binary for your platform: 
http://hledger.org/DOWNLOAD.html .

Release notes (http://hledger.org/NEWS.html#hledger-0.20):

**Bugs fixed:**

 * balance: a 0.19 regression which showed wrong total balance with `--flat` 
has been fixed (#94)
 * register: when `--date2` is used, the register is now sorted by the 
secondary date
 * web: some missing static  template files have been added to the package, 
fixing cabal-dev and hackage builds (#97, #98)
 * web: some hardcoded static urls have been fixed
 * Dependencies and code have been updated to support the latest
   libraries and GHC versions.  For now, hledger requires GHC 7.2+
   and hledger-web requires GHC 7.4+.

**Journal reading:**

 - DOS-style line-endings are now also supported in journal and rules files.
 - `!` is now accepted in the status field as well as `*`, like ledger
 - The *actual date* and *effective date* terminology has changed to *primary 
date* and *secondary date*.
   Use `--date2` to select the secondary date for reports. (`--aux-date` or 
`--effective` are also accepted
   for ledger and backwards compatibility).
 - Per-posting dates are supported, using hledger tags or ledger's posting date 
syntax
 - Comment and tag handling has been improved

**CSV reading:**

 - CSV conversion rules have a simpler, more flexible 
[syntax](MANUAL.html#csv-files).
   Existing rules files will need to be updated manually:
   - the filename is now `FILE.csv.rules` instead of `FILE.rules`
   - `FIELD-field N` is now `FIELD %N+1` (or set them all at once with a 
`fields` rule)
   - `base-currency` is now `currency`
   - `base-account` is now `account1`
   - account-assigning rules:
 add `if` before the list of regexps,
 add indented `account2 ` before the account name
 - parenthesised amounts are parsed as negative

**Querying:**

 - Use `code:` to match the transaction code (check number) field
 - Use `amt:` followed by ``, `=` or `` and a number N to match
   amounts by magnitude. Eg `amt:0` or `amt:=100`. This works only
   with single-commodity amounts (multi-commodity amounts are
   always matched).
 - `tag:` can now match (exact, case sensitive) tag values. Eg `tag:TAG=REGEXP`.

**add comand:**

 - Transaction codes and comments (which may contain tags) can now be entered, 
following a date or amount respectively. (#45)
 - The current entry may be restarted by entering `` at any prompt. (#47)
 - Entries are displayed and confirmed before they are written to the journal.
 - Default values may be specified for the first entry by providing them as 
command line arguments.
 - Miscellaneous UI cleanups

**register command:**

 - The `--related`/`-r` flag shows the other postings in each transaction, like 
ledger.
 - The `--width`/`-w` option increases or sets the output width.

**web command:**

 - The web command now also starts a browser, and auto-exits when unused, by 
default (local ui mode).
   With `--server`, it keeps running and logs requests to the console (server 
mode).
 - Bootstrap is now used for styling and layout
 - A favicon is served
 - The search field is wider
 - yesod devel is now supported; it uses `$LEDGER_FILE` or `~/.hledger.journal`
 - the `blaze_html_0_5` build flag has been reversed and renamed to 
`blaze_html_0_4`

**Add-ons:**

 - The hledger-interest and hledger-irr commands have been released/updated.
 - hledger-chart and hledger-vty remain unmaintained and deprecated.

**Documentation and infrastructure:**

 - The hledger docs and website have been reorganised and updated
 - Manuals for past releases are provided as well as the latest dev version
 - hledger has moved from darcs and darcs hub to git and github (!)
 - The bug tracker has moved from google code to github
 - Feature requests and project planning are now managed on trello
 - A build bot builds against multiple GHC versions on each commit

Release contributors:

- Sascha Welter commissioned register enhancements (--related and --width)
- David Patrick contributed a bounty for add enhancements
- Joachim Breitner added support for ! in status field
- Xinruo Sun provided hledger-web build fixes
- Peter Simons provided hledger-web build fixes, and a build bot
- Marko Kocić provided hledger-web fixes


___
Haskell mailing list
Haskell@haskell.org

Re: Is it time to start deprecating FunDeps?

2013-05-01 Thread Martin Sulzmann
(1) There's a mechanical way to translate FD programs with
non-overlapping instances to TF (and of course vice versa). For
example, let's reconsider Oleg's example.

 {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE FlexibleContexts #-}

 class Sum x y z | x y - z, x z - y
 instance Sum Int Float Double

 class (SumF1 x y ~ z, SumF2 x z ~ y) = SumF x y z
 type family SumF1 x y
 type family SumF2 x z
 instance SumF Int Float Double
 type instance SumF1 Int Float = Double
 type instance SumF2 Int Double = Float

As we know, GHC's intermediate language only records TF type
improvement but not FD type improvement. Therefore,

 f :: SumF Int Float z = z - z
 f _ = (1.0 :: Double)


 {- fails to type check
 f2 :: Sum Int Float z = z - z
 f2 _ = (1.0 :: Double)
 -}

(2) There's an issue in case of overlapping instances as pointed out by Oleg.
 The source of the issue is that overlapping type class instances
are treated
 differently compared to overlapping type family instances. In principle,
 both formalisms (FD and TF) are equivalent in expressive power.

(3) As Edward points out, there are many good reasons why we want to keep FDs.
 Just compare the above FD program against its TF equivalent!

 I enjoy using both formalisms and would be unhappy if we'd get
rid of one of them :)

-Martin




On Tue, Apr 30, 2013 at 9:18 AM,  o...@okmij.org wrote:

 Anthony Clayden wrote:
 Better still, given that there is a mechanical way to convert FunDeps to
 equalities, we could start treating the FunDep on a class declaration as
 documentation, and validate that the instances observe the mechanical
 translation.

 I think this mechanical way is not complete. First of all, how do you
 mechanically convert something like

 class Sum x y z | x y - z, x z - y

 Second, in the presence of overlapping, the translation gives
 different results: compare the inferred types for t11 and t21. There
 is no type improvement in t21.
 (The code also exhibits the coherence problem for overlapping instances:
 the inferred type of t2 changes when we remove the last instance of
 C2, from Bool to [Char].)

 {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
 {-# LANGUAGE FlexibleInstances, TypeFamilies #-}
 {-# LANGUAGE NoMonomorphismRestriction #-}
 {-# LANGUAGE OverlappingInstances #-}

 module FD where

 class C1 a b | a - b where
   foo :: a - b

 instance C1 [a] [a] where
 foo = id

 instance C1 (Maybe a) (Maybe a) where
 foo = id

 {- -- correctly prohibited!
 instance x ~ Bool = C1 [Char]  x where
 foo = const True
 -}

 t1 = foo a
 t11 = \x - foo [x]
 -- t11 :: t - [t]

 -- Anthony Clayden's translation
 class C2 a b where
   foo2 :: a - b

 instance x ~ [a] = C2 [a]  x where
 foo2 = id

 instance x ~ (Maybe a) = C2 (Maybe a) x where
 foo2 = id


 instance x ~ Bool = C2 [Char]  x where
 foo2 = const True

 t2 = foo2 a
 t21 = \x - foo2 [x]
 -- t21 :: C2 [t] b = t - b


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

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


Re: Is it time to start deprecating FunDeps?

2013-05-01 Thread AntC
 AntC anthony_clayden@... writes:
 
  oleg at ... writes:
  
  I think this mechanical way is not complete.
 

On further thought/experiment, I rather think it is -- for one of your 
counter examples.

Firstly, I apologise to Oleg. I had mis-remembered his solution to the 
class Sum example ...
 
  
  class Sum x y z | x y - z, x z - y
  
  your own solution has a bunch of helper classes (each with one-
 directional FunDeps).

This Sum is actually a helper called Sum2 in the PeanoArithm module. 
Here's Oleg's full code (modulo alpha renaming):
{-
class Sum2 a b c | a b - c, a c - b
instance Sum2 Z b b
instance (Sum2 a' b c') = Sum2 (S a') b (S c')

-- note that in the FunDeps, var a is not a target
-- so the instances discriminate on var a
-}

And I must apologise to myself for doubting the mechanical translation in 
face of cyclical FunDeps. Here it is:

class Sum2 a b c -- | a b - c, a c - b
instance (b ~ c) = Sum2 Z b c
instance (c ~ (S c'), Sum2 a' b c') = Sum2 (S a') b c


 Your [Oleg's] solution has a single instance declared for the 
 Sum class, with three bare typevars. So it is valid by step 1. of the 
 rules I gave. (In your solution all the 'hard work' is done by the 
 helpers, which are constraints on that single instance.)
 

That much I had remembered correctly. So I don't need to change the Sum 
class (except to remove the FunDep):

class Sum a b c  -- | a b - c, a c - b, b c - a
instance (Sum2 a b c, Sum2 b a c) = Sum a b c

The tests from Oleg's code (ta1, ta2) infer the same types. Test ta3 fails 
to compile -- as it does for Oleg.

(My code does need UndecidableInstances, as does Oleg's.)





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


Re: Is it time to start deprecating FunDeps?

2013-05-01 Thread AntC
 Martin Sulzmann martin.sulzmann@... writes:
 
 (1) There's a mechanical way to translate FD programs with
 non-overlapping instances to TF (and of course vice versa).

Martin, no! no! no! You have completely mis-understood.

I do _not_ _not_ _not_ want to replace FD's with TF's.

I want to replace FD's with Equality Constraints. And that's exactly 
because I want to use overlapping.

(You've also failed to understand that the Sum example is for doing Peano 
Arith. See the solution I've just posted.)





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


Re: Is it time to start deprecating FunDeps?

2013-05-01 Thread Martin Sulzmann
Comments see below.

On Wed, May 1, 2013 at 11:13 AM, AntC anthony_clay...@clear.net.nz wrote:
 Martin Sulzmann martin.sulzmann@... writes:

 (1) There's a mechanical way to translate FD programs with
 non-overlapping instances to TF (and of course vice versa).

 Martin, no! no! no! You have completely mis-understood.

 I do _not_ _not_ _not_ want to replace FD's with TF's.

 I want to replace FD's with Equality Constraints.

Ok, that's the bit I've missed, but then I argue that you can't fully
encode FDs.

Consider again the 'Sum' example.

In the FD world:

Sum x y z1, Sum x y z2  == z1 ~ z2

enforced by

Sum x y z | x y - z

In my TF encoding, we find a similar derivation step

SumF1 x y ~ z1, SumF1 x y ~ z2 == z1 ~ z2

So, you're asking can we translate/express FDs using GHC intermediate language
with plain type equations only?

-Martin


 And that's exactly
 because I want to use overlapping.

 (You've also failed to understand that the Sum example is for doing Peano
 Arith. See the solution I've just posted.)





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

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


Haskell 2014

2013-05-01 Thread Ian Lynagh

Dear Haskellers,

We are pleased to announce that the Haskell 2014 committee has now
formed, and we would be delighted to receive your proposals for changes
to the language. Please see
http://hackage.haskell.org/trac/haskell-prime/wiki/Process
for details on the proposal process.

The committee will meet 4 times a year, to consider proposals completed
before:
* 1st August
* 1st November
* 1st February
* 1st May
so if you have been meaning to put the finishing touches to a proposal,
then we would encourage you to do so by the end of July!

The source for the Haskell report will be updated as proposals are
accepted, but new versions of the standard will only be released once a
year, during January.

The Haskell 2014 committee is comprised of:

* Carlos Camarão
* Iavor Diatchki
* Ian Lynagh (chair)
* John Meacham
* Neil Mitchell
* Ganesh Sittampalam
* David Terei
* Bas van Dijk
* Henk-Jan van Tuyl


Thanks
Ian (Haskell 2014 committee chair)
-- 
Ian Lynagh, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com/


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


Re: Is it time to start deprecating FunDeps?

2013-05-01 Thread AntC
 Martin Sulzmann martin.sulzmann@... writes:

  On Wed, May 1, 2013 at 11:13 AM, AntC anthony_clayden@... wrote:
 
  I want to replace FD's with Equality Constraints.
 
 Ok, that's the bit I've missed, but then I argue that you can't fully
 encode FDs.
 
 Consider again the 'Sum' example.
 
 In the FD world:
 
 Sum x y z1, Sum x y z2  == z1 ~ z2
 
 enforced by
 
 Sum x y z | x y - z

I'm still not sure you've 'got' it. The class has 2 FD's. Oleg put:
  
  class Sum x y z | x y - z, x z - y
  

 
 In my TF encoding, we find a similar derivation step
 
 SumF1 x y ~ z1, SumF1 x y ~ z2 == z1 ~ z2
 

But you haven't captured the FD from {result, arg1} - arg2.
In the TF example you first posted, you expressed that with an explicit 
equality constraint. (I won't repeat yours, because it wasn't to do with 
Peano Arith.)


 So, you're asking can we translate/express FDs using GHC intermediate 
 language with plain type equations only?

No, not asking, but stating; and not talking about the intermediate 
language, but the surface language.

Could I respectfully suggest you re-read the OP.




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


Re: [Haskell-cafe] remote-build-reporting: cabal phoning home?!

2013-05-01 Thread Scott Lawrence

Hello,

I think (and a quick reading of source seems to bear this out) that that only 
happens when you run cabal report. Which isn't quite undocumented - see 
cabal report --help.


On Wed, 1 May 2013, Ertugrul Söylemez wrote:


Hello there,

could somebody please shed some light on the following line that
appeared in my ~/.cabal/config?

   remote-build-reporting: anonymous

The option doesn't seem to be documented anywhere, and I'm very nervous
about undocumented remote reporting features.  I expect cabal-install
to communicate only to fetch the latest package index and to upload and
download packages, the former only when i actually use the upload
command.

If it performs any other communication, please tell me how to disable
it.  In that case I'd also be interested in an explanation for why this
was enabled in the first place.  I certainly didn't enable it myself,
because it would be a serious security breach in my case.

Thank you.


Greets,
Ertugrul

--
Not to be or to be and (not to be or to be and (not to be or to be and
(not to be or to be and ... that is the list monad.



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


[Haskell-cafe] What is the process for GSOC?

2013-05-01 Thread Dominic Steinitz
How is it decided which Haskell projects get chosen? Do we discuss them here 
and take a collective view?

Thanks, Dominic.

PS I should point out I have an interest in the proposal to port charts to use 
diagrams 
(http://www.google-melange.com/gsoc/proposal/review/google/gsoc2013/jbracker/1) 
i.e. I'd really like this as a user.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] a bug of 32bit ghc on mac ?

2013-05-01 Thread Bob Hutchison
I compiled and ran it a few hundred times in a script with no failures. I've 
got the same version of GHC on OS X 10.8.3.

BTW, it's not just Yesod that has that bug you mentioned in the 64-bit version.

Cheers,
Bob


On 2013-04-30, at 11:37 PM, Sray s...@live.com wrote:

 hi all
 
 it seems i have met some bug on a MAC 32bit GHC version 7.4.2 
 
 to make long stroy short,  my code is about parse a json file using aeson
 here is my code
 http://pastebin.com/0VcVhdvX
 
 and here is test data
 http://pastebin.com/PvtSvst5
 
 and test steps
 save the code , and name it a.hs (or what you want)
 save the test data ,name it a.json (do not change its name)
 $ ghc a.hs -o a
 $ ./a
 
 
 what i get from the output is fail
 and when i run the command below for a few times
 $ runghc a.hs
 i even got some ok and some fail mixed together 
 
 
 but i copy the code and compile it on my linux, everything goes fine, the 
 output is OK
 i have run uninstall-hs and install a 64bit ghc, also goes fine
 
 i delete one line randomly chosen from my test data , got an ok
 roll back ,delete another line, also an ok...
 
 I just want to make sure is this my bug or a bug of ghc
 
 p.s. the reason using 32bit ghc is yesod, which has met another bug on 64bit 
 mac ghc :(
 
 thanks
 sray
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

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


Re: [Haskell-cafe] What is the process for GSOC?

2013-05-01 Thread Alp Mestanogullari
No, if the process is the same this year as the previous one, all potential
mentors and haskell.org gsoc admins (I think) get to vote on each
submission, giving it a score, and then the best N proposals get chosen.


On Wed, May 1, 2013 at 10:34 AM, Dominic Steinitz domi...@steinitz.orgwrote:

 How is it decided which Haskell projects get chosen? Do we discuss them
 here and take a collective view?

 Thanks, Dominic.

 PS I should point out I have an interest in the proposal to port charts to
 use diagrams (
 http://www.google-melange.com/gsoc/proposal/review/google/gsoc2013/jbracker/1)
 i.e. I'd really like this as a user.
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




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


[Haskell-cafe] ANN: hledger 0.20

2013-05-01 Thread Simon Michael
I'm pleased to announce hledger and hledger-web 0.20!

hledger is a command-line tool and haskell library for tracking
financial transactions, which are stored in a human-readable plain
text format. In addition to reporting, it can also help you record new
transactions, or convert CSV data from your bank. Add-on packages
include hledger-web (providing a web interface), hledger-irr and 
hledger-interest.

hledger is inspired by and compatible with John Wiegley's Ledger. For
more, see http://hledger.org .

Install it:

# cabal update; cabal install hledger-web

For more installation help, see http://hledger.org/MANUAL.html#installing .
Or, sponsor a ready-to-run binary for your platform: 
http://hledger.org/DOWNLOAD.html .

Release notes (http://hledger.org/NEWS.html#hledger-0.20):

**Bugs fixed:**

 * balance: a 0.19 regression which showed wrong total balance with `--flat` 
has been fixed (#94)
 * register: when `--date2` is used, the register is now sorted by the 
secondary date
 * web: some missing static  template files have been added to the package, 
fixing cabal-dev and hackage builds (#97, #98)
 * web: some hardcoded static urls have been fixed
 * Dependencies and code have been updated to support the latest
   libraries and GHC versions.  For now, hledger requires GHC 7.2+
   and hledger-web requires GHC 7.4+.

**Journal reading:**

 - DOS-style line-endings are now also supported in journal and rules files.
 - `!` is now accepted in the status field as well as `*`, like ledger
 - The *actual date* and *effective date* terminology has changed to *primary 
date* and *secondary date*.
   Use `--date2` to select the secondary date for reports. (`--aux-date` or 
`--effective` are also accepted
   for ledger and backwards compatibility).
 - Per-posting dates are supported, using hledger tags or ledger's posting date 
syntax
 - Comment and tag handling has been improved

**CSV reading:**

 - CSV conversion rules have a simpler, more flexible 
[syntax](MANUAL.html#csv-files).
   Existing rules files will need to be updated manually:
   - the filename is now `FILE.csv.rules` instead of `FILE.rules`
   - `FIELD-field N` is now `FIELD %N+1` (or set them all at once with a 
`fields` rule)
   - `base-currency` is now `currency`
   - `base-account` is now `account1`
   - account-assigning rules:
 add `if` before the list of regexps,
 add indented `account2 ` before the account name
 - parenthesised amounts are parsed as negative

**Querying:**

 - Use `code:` to match the transaction code (check number) field
 - Use `amt:` followed by ``, `=` or `` and a number N to match
   amounts by magnitude. Eg `amt:0` or `amt:=100`. This works only
   with single-commodity amounts (multi-commodity amounts are
   always matched).
 - `tag:` can now match (exact, case sensitive) tag values. Eg `tag:TAG=REGEXP`.

**add comand:**

 - Transaction codes and comments (which may contain tags) can now be entered, 
following a date or amount respectively. (#45)
 - The current entry may be restarted by entering `` at any prompt. (#47)
 - Entries are displayed and confirmed before they are written to the journal.
 - Default values may be specified for the first entry by providing them as 
command line arguments.
 - Miscellaneous UI cleanups

**register command:**

 - The `--related`/`-r` flag shows the other postings in each transaction, like 
ledger.
 - The `--width`/`-w` option increases or sets the output width.

**web command:**

 - The web command now also starts a browser, and auto-exits when unused, by 
default (local ui mode).
   With `--server`, it keeps running and logs requests to the console (server 
mode).
 - Bootstrap is now used for styling and layout
 - A favicon is served
 - The search field is wider
 - yesod devel is now supported; it uses `$LEDGER_FILE` or `~/.hledger.journal`
 - the `blaze_html_0_5` build flag has been reversed and renamed to 
`blaze_html_0_4`

**Add-ons:**

 - The hledger-interest and hledger-irr commands have been released/updated.
 - hledger-chart and hledger-vty remain unmaintained and deprecated.

**Documentation and infrastructure:**

 - The hledger docs and website have been reorganised and updated
 - Manuals for past releases are provided as well as the latest dev version
 - hledger has moved from darcs and darcs hub to git and github (!)
 - The bug tracker has moved from google code to github
 - Feature requests and project planning are now managed on trello
 - A build bot builds against multiple GHC versions on each commit

Release contributors:

- Sascha Welter commissioned register enhancements (--related and --width)
- David Patrick contributed a bounty for add enhancements
- Joachim Breitner added support for ! in status field
- Xinruo Sun provided hledger-web build fixes
- Peter Simons provided hledger-web build fixes, and a build bot
- Marko Kocić provided hledger-web fixes


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Looking for portable Haskell or Haskell like language

2013-05-01 Thread Christopher Howard
On 05/01/2013 12:21 AM, Gabor Greif wrote:
 Am 27. April 2013 um 07:21 schrieb Christopher Howard
 christopher.how...@frigidcode.com:
 
  
 I can feel your pain... Here is a blog post I have written some time ago
 http://heisenbug.blogspot.de/2011/09/ghc-704-on-centos.html
 about how to bridge the gap. This was actually a RHEL5 system,
 but did not want to admit it :-)
 
 My writeup may be useful to you.
 
 Cheers,
 
 Gabor
 
 

For posterity's sake: I actually got this figured out already. First, I
downloaded the binary version of GHC 6.8.3 and installed it without
issues. Then I used it to build the sources of GHC 6.10.4 and install
them. Then I used 6.10.4 to build and install 6.12.3. Then 7.0.4, then
7.2.2, then 7.4.2, and finally 7.6.3.

Had no problems doing it that way, except for the optimization flags
issue in the 7.* series which I mentioned in my other thread. That was
easily fixed by setting the build.mk to the quick build profile.

-- 
frigidcode.com



signature.asc
Description: OpenPGP digital signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Backward compatibility

2013-05-01 Thread Adrian May
Hi All,

Please don't interpret this as a rant: I'm just feeling a bit disappointed
about probably having to give up on Haskell.

Let's face it: this decision to change the default syntax in GHC7 means
that right now Haskell looks about as stable as Ruby on Rails.

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
persisted for a while but gave up because getPackageId doesn't exist in any
form at all anymore. This was only the install script: what would WASH
itself have in store for me to get my brain around?

What are my choices here:

1) Revert to GHC6 or put pragmas and compiler switches everywhere, switch
2010 off globally with cabal or even make an alias of ghc: That means I'll
gradually clash with people who decide ...
2) Convert all my code and a lot of other peoples' to the new syntax,
thereby exacerbating the problem that ruled out 1.

Either way, we're looking at a long period during which a large portion of
the libraries will be incompatible with the other portion, and nobody will
know which style to write. I don't know if or when WASH or any other
library will convert, or even if I'd prefer that to happen sooner or later,
because that would depend on when other libraries do and how I'd worked
around it in the meantime. Altogether that means I can't sensibly decide to
rely on any library, so I can't use Haskell. I'll just have to go back to
fumbling around in XSL, PHP and the like. Is Haskell 2010 really so much
better that it justifies this?

I just saw that movie The Words: the moral of the story is that you
shouldn't try to change your mistakes.

...

Apparently it's not only 2010. I now find that buildng the Haskell Platform
wants GHC 7.4.2, not 7.4.1 because of the line import Prelude (if I
remember rightly,) and even when I follow the rules precisely I still get
several different deprecation warnings. The prelude is not exactly obscure.
If you deprecate that you've broken everything. Is it really impossible to
keep such a basic mantra meaningful from one minor version to the next?
Java was fond of deprecating things in the early days, but when they said
deprecated they didn't mean switched off, let alone that it would lead
to a syntax error. They just meant not trendy anymore.

It's a very common illusion to believe that the central thing in your life
is also the central thing in everybody else's. That's why things like
Norton take over your whole machine: those guys believe that the only
reason you bought the computer was to fight viruses, because that's what
most of the machines in their office were bought for.

There seems to be something similar going on in the way Haskellers are
expected to update all their code whenever GHC decide to issue an update.
But in reality we have jobs of our own. I'd like to choose Haskell over XSL
because I think it'll enable me to write web sites more efficiently, not
because I want to forget all about my job and savour the brilliance of the
latest Haskell version. But in reality I'm just sitting here waiting for
the Platform to compile just in case it's the Ubuntu package's fault, but I
know it won't help. I'll just get other problems instead. Reality is that
the whole ecosytem is in disarray because of this lack of respect for
backward compatibility. At least Rails can plead that it's relatively new,
but Haskell has been around for over 20 years.

I understand that progress has to be made, and it would be nice if people
did just update all their code quickly so you could switch off old stuff
and move on. But it's not hard to survey the code that's out there and see
how much stuff you'd be breaking if you did. If it's not a lot, then
switching it off to wake them up would be an acceptable compromise. But it
looks to me as if a lot of very important stuff is still failing on the GHC
from November 2010, so clearly things are going too fast. Adding new stuff
is great, and sometimes the new stuff clashes with the old stuff. But how
much of that deprecated stuff really *needed* to be switched off, and
couldn't the new stuff have been designed so as not to force that?

In principle this is the best language on the planet, but with all these
version gotchas I don't know that I can use it anymore. What a tragedy. I
can't even think of a suggestion as to how Haskell should try to get out of
this mess now.

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


Re: [Haskell-cafe] Markdown extension for Haddock as a GSoC project

2013-05-01 Thread Ben
sorry, i was only trying to make a helpful suggestion!

just to clarify: i'm not championing asciitext (or any other format) -- i only 
heard about it recently in a comment on

http://www.codinghorror.com/blog/2012/10/the-future-of-markdown.html

i checked it out and it sounded cool, so i thought it'd be a helpful pointer to 
whomever is working on new haddock -- they are of course welcome to ignore it.  
totally understand that overmuch debate is not helpful (though i'm not sure 
it's fair to call it bikeshedding, since it is a primary feature of the 
proposed project!)

best, ben

On Apr 27, 2013, at 2:02 PM, Bryan O'Sullivan wrote:

 On Sat, Apr 27, 2013 at 1:47 PM, Ben midfi...@gmail.com wrote:
 asciidoc has been mentioned a few times in comments, i think it's worth 
 looking at.
 
 This is the problem I was afraid of: for every markup syntax under the sun, 
 someone will come along to champion it.
 
 The choice of one or N syntaxes is ultimately up to the discretion of the 
 student, guided by their mentor. It is in our collective interest to avoid 
 prolonging a bikeshed discussion on this, as a long inconclusive discussion 
 risks dissuading any sensible student or mentor from wanting to pursue the 
 project in the first place.


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