Re: [Haskell] Treatment of unknown pragmas

2018-12-02 Thread Neil Mitchell
Hi all,

I've just released HLint 2.1.11 which supports three different forms
of pragma as per https://github.com/ndmitchell/hlint#ignoring-hints,
so you can write:

* {-# ANN module "HLint: ignore Eta reduce" #-}
* {-# HLINT ignore "Eta reduce" #-}
* {- HLINT ignore "Eta reduce" -}

The last two are new to this version of HLint. ANN is a serious
performance penalty, {-# HLINT #-} triggers a GHC warning, and {-
HLINT -} gets highlighted as a comment - so people get to pick their
downside. I will probably remove documentation of the ANN variant at
some point, since it's got serious the most serious downsides.

I have no intention to support a {-@ HLINT @-} or similar syntax,
because everything that might sensibly be used is taken, and even if
it gets adopted universally, I suspect HLINT will account for 80%+
instances, making it still the "weird HLINT syntax".

 My preference is still to have GHC not give warnings on HLINT, but
assuming that's still infeasible, I'll probably see about getting all
the Haskell syntax highlighters to add special support for {- HLINT
-}...

Thanks, Neil
On Sun, Oct 28, 2018 at 3:04 PM Artem Pelenitsyn  wrote:
>
> Hello Daniel,
>
> Annotations API was discussed earlier in this thread. Main points against are:
>
> Neil:
> Significant compilation performance penalty and extra recompilation. ANN 
> pragmas is what HLint currently uses.
>
> Brandon:
> The problem with ANN is it's part of the plugins API, and as such does things 
> like compiling the expression into the program in case a plugin generates 
> code using its value, plus things like recompilation checking end up assuming 
> plugins are in use and doing extra checking. Using it as a compile-time 
> pragma is actually fairly weird from that standpoint.
>
> --
> Best, Artem
> On Sat, 27 Oct 2018 at 22:12 Daniel Wagner  wrote:
>>
>> I don't have a really strong opinion, but... isn't this (attaching string-y 
>> data to source constructs) pretty much exactly what GHC's annotation pragma 
>> is for?
>> ~d
>>
>> On Tue, Oct 16, 2018 at 3:14 PM Ben Gamari  wrote:
>>>
>>> Vladislav Zavialov  writes:
>>>
>>> > What about introducing -fno-warn-pragma=XXX? People who use HLint will
>>> > add -fno-warn-pragma=HLINT to their build configuration.
>>> >
>>> A warning flag is an interesting way to deal with the issue. On the
>>> other hand, it's not great from an ergonomic perspective; afterall, this
>>> would mean that all users of HLint (and any other tool requiring special
>>> pragmas) include this flag in their build configuration. A typical
>>> Haskell project already needs too much such boilerplate, in my opinion.
>>>
>>> I think it makes a lot of sense to have a standard way for third-parties
>>> to attach string-y information to Haskell source constructs. While it's
>>> not strictly speaking necessary to standardize the syntax, doing
>>> so minimizes the chance that tools overlap and hopefully reduces
>>> the language ecosystem learning curve.
>>>
>>> Cheers,
>>>
>>> - Ben
>>> ___
>>>
>>> Haskell mailing list
>>> Haskell@haskell.org
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell
>>
>> ___
>> Haskell mailing list
>> Haskell@haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell
>
> ___
> ghc-devs mailing list
> ghc-d...@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
___
Haskell mailing list
Haskell@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell


Re: [Haskell-community] 2018 state of Haskell survey

2018-10-14 Thread Neil Mitchell
Hi Taylor,

What does official support look like? I don't think there's anything above
and beyond what you're already doing.

Thanks, Neil

On Sun, 14 Oct 2018 at 3:49 pm, Taylor Fausak  wrote:

> (I have CCed  because the haskell-community
> mailing list seems relatively quiet and I want to make sure this is seen.)
>
> Hello! My name is Taylor Fausak. I run the Haskell Weekly newsletter. Last
> year I published a survey [1] for the Haskell community. I collected and
> reported [2] on about 1,335 responses. I plan on publishing another survey
> this year on the same date, November 1st. I am developing it in the open
> again [3] and would love to hear from any interested parties. Please let me
> know if you have any ideas about the survey!
>
> This year I am interested in making the survey official by seeking support
> from Haskell.org. Is such a thing possible and desirable?
>
> Thanks for your consideration! I hope to hear from you soon.
>
> [1]: https://haskellweekly.news/surveys/2017.html
> [2]:
> https://taylor.fausak.me/2017/11/15/2017-state-of-haskell-survey-results/
> [3]: https://github.com/haskellweekly/haskellweekly.github.io/issues/206
> ___
> Haskell-community mailing list
> Haskell-community@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-community
>
___
Haskell-community mailing list
Haskell-community@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-community


Re: ANNOUNCE: GHC 7.10.1 Release Candidate 3

2015-03-17 Thread Neil Mitchell
All of the mingw links give me 403 forbidden errors. Do they have
permission issues?

Thanks, Neil


On Mon, Mar 16, 2015 at 8:30 PM, Austin Seipp aus...@well-typed.com wrote:
 We are pleased to announce the third release candidate for GHC 7.10.1:

 https://downloads.haskell.org/~ghc/7.10.1-rc3
 https://downloads.haskell.org/~ghc/7.10.1-rc3/docs/html/

 This includes the source tarball and bindists for Windows and Debian
 Linux. FreeBSD, CentOS and Mac OS X binary distributions will follow
 soon. These binaries and tarballs have an accompanying
 SHA256SUMS file signed by my GPG key id (0x3B58D86F).

 We plan to make the 7.10.1 final release at the end of this week - so
 please test as much as possible; bugs are much cheaper if we find them
 before the release!

 The list of issues we plan on fixing can always be found in an
 up-to-date form here:
 https://ghc.haskell.org/trac/ghc/wiki/Status/GHC-7.10.1

 --
 Regards,

 Austin Seipp, Haskell Consultant
 Well-Typed LLP, http://www.well-typed.com/
 ___
 ghc-devs mailing list
 ghc-d...@haskell.org
 http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users


Re: ANNOUNCE: GHC 7.10.1 Release Candidate 3

2015-03-17 Thread Neil Mitchell
Confirmed, thanks a lot!

On Tue, Mar 17, 2015 at 1:47 PM, Austin Seipp aus...@well-typed.com wrote:
 Neil, this has been fixed.

 On Tue, Mar 17, 2015 at 7:52 AM, Neil Mitchell ndmitch...@gmail.com wrote:
 All of the mingw links give me 403 forbidden errors. Do they have
 permission issues?

 Thanks, Neil


 On Mon, Mar 16, 2015 at 8:30 PM, Austin Seipp aus...@well-typed.com wrote:
 We are pleased to announce the third release candidate for GHC 7.10.1:

 https://downloads.haskell.org/~ghc/7.10.1-rc3
 https://downloads.haskell.org/~ghc/7.10.1-rc3/docs/html/

 This includes the source tarball and bindists for Windows and Debian
 Linux. FreeBSD, CentOS and Mac OS X binary distributions will follow
 soon. These binaries and tarballs have an accompanying
 SHA256SUMS file signed by my GPG key id (0x3B58D86F).

 We plan to make the 7.10.1 final release at the end of this week - so
 please test as much as possible; bugs are much cheaper if we find them
 before the release!

 The list of issues we plan on fixing can always be found in an
 up-to-date form here:
 https://ghc.haskell.org/trac/ghc/wiki/Status/GHC-7.10.1

 --
 Regards,

 Austin Seipp, Haskell Consultant
 Well-Typed LLP, http://www.well-typed.com/
 ___
 ghc-devs mailing list
 ghc-d...@haskell.org
 http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs




 --
 Regards,

 Austin Seipp, Haskell Consultant
 Well-Typed LLP, http://www.well-typed.com/
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users


Re: [Haskell-cafe] Hoogle vs Hayoo

2013-09-01 Thread Neil Mitchell
Hi,

Hoogle is definitely not deprecated. The reason you can't yet search
all packages simultaneously is that it consumes too many resources -
the number of Haskell packages exploded at a time when I wasn't able
to spend enough time to allow Hoogle to keep up. It's definitely
something on the todo list! The FP complete guys are helping with the
work required to get there.

Be careful what you wish for though. I can't almost guarantee that
every type you search for is available in the lens package as a
hylo-zygote-para-poly-morphism if you instantiate the Bazaar
applicative to the right type. I agree that sorting the platform
packages to the top of the list is likely to help make this more
manageable.

Thanks, Neil


On Fri, Aug 23, 2013 at 3:53 PM, Mateusz Kowalczyk
fuuze...@fuuzetsu.co.uk wrote:
 On 23/08/13 14:57, jabolo...@google.com wrote:
 It's a bit pointless, if I have to know the package, where I want to
 search in.

 Yeah! It does sound a bit pointless.  Hoogle should search everything
 by default, and then you can refine your search by clicking on the '+'
 or '-' on the packages that appear on the left menu.

 Jose

 +1 to this, I never even knew this functionality existed. Why not have a
 checkbox or something along these lines to enable the search in all
 packages? This wouldn't change the old behaviour by default and it would
 allow for a wider search.

 --
 Mateusz K.

 ___
 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] Hoogle problems?

2013-07-18 Thread Neil Mitchell
Hoogle has returned to live, thanks to the efforts to the new
haskell.org admins.

Thanks, Neil

On Tue, Jul 16, 2013 at 4:33 PM, Neil Mitchell ndmitch...@gmail.com wrote:
 No idea why it has gone down, my guess is that the Apache rule that
 says treat it as a CGI script got changed to serve it as a file. In
 the meantime you can use a copy of Hoogle at:
 https://www.fpcomplete.com/hoogle

 Thanks, Neil



 On Mon, Jul 15, 2013 at 5:19 PM, Niklas Hambüchen m...@nh2.me wrote:
 OK, but why does it need to go down for migration?

 On Mon 15 Jul 2013 23:52:02 SGT, Daniel F wrote:
 The web site is migrating.
 IRC says: Topic for #haskell: haskell.org in the middle of migration;
 expect turbulence; use  www.haskell.org


 ___
 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] Hoogle problems?

2013-07-16 Thread Neil Mitchell
No idea why it has gone down, my guess is that the Apache rule that
says treat it as a CGI script got changed to serve it as a file. In
the meantime you can use a copy of Hoogle at:
https://www.fpcomplete.com/hoogle

Thanks, Neil



On Mon, Jul 15, 2013 at 5:19 PM, Niklas Hambüchen m...@nh2.me wrote:
 OK, but why does it need to go down for migration?

 On Mon 15 Jul 2013 23:52:02 SGT, Daniel F wrote:
 The web site is migrating.
 IRC says: Topic for #haskell: haskell.org in the middle of migration;
 expect turbulence; use  www.haskell.org


 ___
 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] Uniplate and rewriting with different types

2013-01-29 Thread Neil Mitchell
Hi Chris,

 With the following type, and transformation functions:

 data Odd = OddOne Even | OddZero Even  deriving 
 (Data,Typeable,Show)
 data Even = EvenOne Odd | EvenZero Odd | Nil   deriving 
 (Data,Typeable,Show)

 t1,t2,t3 :: Even - Maybe Even

 But if one of the transformations has a different type, you can't do
 it this way.  For instance, redefine t2 to have a different type:

 t2 :: Odd - Maybe Odd
 t2 (OddZero (EvenOne x)) = Just $ OddZero (EvenZero x)
 t2 x = Nothing

 and you are stuck because the functions of different types can't be
 combined into a single transformation.

 My question is: is there a good way to combine the transformation
 functions if they have different types?

Currently, no. Although there is something definitely related, with
transformBis: 
http://hackage.haskell.org/packages/archive/uniplate/1.6.10/doc/html/Data-Generics-Uniplate-Data.html#v:transformBis

That takes a list of transformation functions of different types and
acts as though you did transform on each one in turn. You could
certainly imagine adding rewriteBis in the same style, and with your
version you almost have. The transformBis function is particularly
efficient because it knows which traversals or parts of traversals
can be fused without changing the semantics. rewriteBis could
certainly do the same trick.

If you provided a patch for rewriteBis I'd certainly apply it!

Thanks, Neil

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


Re: [Haskell-cafe] [Haskell] Well-Typed and Skills Matter offer Haskell courses in London in October

2012-09-25 Thread Neil Mitchell
Hi Claude,

I have a promo code which gives £50 off to make the Haskell Exchange
£175. HASKELLX-2012-TE1.

Note that this cost isn't profiteering - unfortunately running a
conference (just getting a venue) is expensive.

There will probably be some social aspect afterwards, I'll certainly
go to a pub if anyone wants.

I would love to see London HUG revived, I know people have tried
(including in the very recent past, a few months ago), but as yet no
one has managed to get any meetings going. Perhaps soon though.

Hoodlums is a great event, more teaching and less talk based, but very
well run and I highly recommend it!

Thanks, Neil

On Mon, Sep 24, 2012 at 9:11 PM, Claude Heiland-Allen
cla...@mathr.co.uk wrote:
 Hi Andres, list,


 On 19/09/12 09:41, Andres Löh wrote:

 Oops, I hit send too prematurely, sorry for the seeming bluntness (but it
 is
 still a blunt message, can't apologize for that I suppose):


 No need to apologize. There's a need for informal meetings as much (or
 even more) as there is for courses and conferences.


 Thank you.


 Regarding London, I know there's the
 Haskell Hoodlums meetup (http://www.meetup.com/hoodlums/)


 Thanks, I wasn't aware of this one.  I have signed up.


 Claude


 ___
 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: Error while installing new packages with GHC 7.4.1

2012-03-01 Thread Neil Mitchell
Hi Antoras,

The darcs version of Hoogle has had a more permissive dependency for a few
weeks. Had I realised the dependency caused problems I'd have released a
new version immediately! As it stands, I'll release a new version in about
4 hours. If you can't wait that long, try darcs get
http://code.haskell.org/hoogle

Thanks, Neil

On Thursday, March 1, 2012, Antoras wrote:

 Ok, interesting info. But how to solve the problem now? Should I contact
 the author of Hoogle and ask him about how solving this?


 On 03/01/2012 02:02 AM, Albert Y. C. Lai wrote:

 On 12-02-29 06:04 AM, Antoras wrote:

 I don't know where the dependency to array-0.3.0.3 comes from. Is it
 possible to get more info from cabal than -v?


 hoogle-4.2.8 has Cabal = 1.8   1.13, this brings in Cabal-1.12.0.

 Cabal-1.12.0 has array = 0.1   0.4, this brings in array-0.3.0.3.

 It is a mess to have 2nd instances of libraries that already come with
 GHC, unless you are an expert in knowing and avoiding the treacherous
 consequences. See my
 http://www.vex.net/~trebla/**haskell/sicp.xhtmlhttp://www.vex.net/~trebla/haskell/sicp.xhtml

 It is possible to fish the output of cabal install --dry-run -v3 hoogle
 for why array-0.3.0.3 is brought in. It really is fishing, since the output
 is copious and of low information density. Chinese idiom: needle in ocean
 (haystack is too easy). Example:

 selecting hoogle-4.2.8 (hackage) and discarding Cabal-1.1.6, 1.2.1,
 1.2.2.0,
 1.2.3.0, 1.2.4.0, 1.4.0.0, 1.4.0.1, 1.4.0.2, 1.6.0.1, 1.6.0.2, 1.6.0.3,
 1.14.0, blaze-builder-0.1, case-insensitive-0.1,

 We see that selecting hoogle-4.2.8 causes ruling out Cabal 1.14.0

 Similarly, the line for selecting Cabal-1.12.0 mentions ruling out
 array-0.4.0.0

 __**_
 Glasgow-haskell-users mailing list
 Glasgow-haskell-users@haskell.org
 http://www.haskell.org/**mailman/listinfo/glasgow-**haskell-usershttp://www.haskell.org/mailman/listinfo/glasgow-haskell-users



 __**_
 Glasgow-haskell-users mailing list
 Glasgow-haskell-users@haskell.org
 http://www.haskell.org/**mailman/listinfo/glasgow-**haskell-usershttp://www.haskell.org/mailman/listinfo/glasgow-haskell-users

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


Re: Error while installing new packages with GHC 7.4.1

2012-03-01 Thread Neil Mitchell
Hi Antoras,

I've just released Hoogle 4.2.9, which allows Cabal 1.15, so hopefully
will install correctly for you.

Thanks, Neil

On Thu, Mar 1, 2012 at 5:02 PM, Neil Mitchell ndmitch...@gmail.com wrote:
 Hi Antoras,

 The darcs version of Hoogle has had a more permissive dependency for a few
 weeks. Had I realised the dependency caused problems I'd have released a new
 version immediately! As it stands, I'll release a new version in about 4
 hours. If you can't wait that long, try darcs get
 http://code.haskell.org/hoogle

 Thanks, Neil


 On Thursday, March 1, 2012, Antoras wrote:

 Ok, interesting info. But how to solve the problem now? Should I contact
 the author of Hoogle and ask him about how solving this?


 On 03/01/2012 02:02 AM, Albert Y. C. Lai wrote:

 On 12-02-29 06:04 AM, Antoras wrote:

 I don't know where the dependency to array-0.3.0.3 comes from. Is it
 possible to get more info from cabal than -v?


 hoogle-4.2.8 has Cabal = 1.8   1.13, this brings in Cabal-1.12.0.

 Cabal-1.12.0 has array = 0.1   0.4, this brings in array-0.3.0.3.

 It is a mess to have 2nd instances of libraries that already come with
 GHC, unless you are an expert in knowing and avoiding the treacherous
 consequences. See my
 http://www.vex.net/~trebla/haskell/sicp.xhtml

 It is possible to fish the output of cabal install --dry-run -v3 hoogle
 for why array-0.3.0.3 is brought in. It really is fishing, since the output
 is copious and of low information density. Chinese idiom: needle in ocean
 (haystack is too easy). Example:

 selecting hoogle-4.2.8 (hackage) and discarding Cabal-1.1.6, 1.2.1,
 1.2.2.0,
 1.2.3.0, 1.2.4.0, 1.4.0.0, 1.4.0.1, 1.4.0.2, 1.6.0.1, 1.6.0.2, 1.6.0.3,
 1.14.0, blaze-builder-0.1, case-insensitive-0.1,

 We see that selecting hoogle-4.2.8 causes ruling out Cabal 1.14.0

 Similarly, the line for selecting Cabal-1.12.0 mentions ruling out
 array-0.4.0.0

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



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

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


Re: Error while installing new packages with GHC 7.4.1

2012-03-01 Thread Neil Mitchell
Hi Antoras,

My suspicion is you've ended up with corrupted packages in your
package database - nothing to do with Hoogle. I suspect trying to
install parsec-3.1.2 directly would give the same error message. Can
you try ghc-pkg list, and at the bottom it will probably say something
like:

The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
warp-1.1.0

I often find ghc-pkg unregister warp --force on all the packages
cleans them up enough, but someone else may have a better suggestion.

Thanks, Neil

On Fri, Mar 2, 2012 at 12:02 AM, Antoras m...@antoras.de wrote:
 Hi Neil,

 thanks for your effort. But it still does not work. The old errors
 disappeared, but new ones occur.

 Maybe I have not yet the most current versions:


 $ ghc --version
 The Glorious Glasgow Haskell Compilation System, version 7.4.1

 $ cabal --version
 cabal-install version 0.10.2
 using version 1.10.1.0 of the Cabal library

 This seems to be the most current version of Cabal. The command 'cabal info
 cabal' brings: Versions installed: 1.14.0 but not 1.15

 An extract of the error messages:

 [...]
 Configuring parsec-3.1.2...
 Preprocessing library parsec-3.1.2...
 Building parsec-3.1.2...
 command line: cannot satisfy -package-id
 text-0.11.1.13-9b63b6813ed4eef16b7793151cdbba4d:
 text-0.11.1.13-9b63b6813ed4eef16b7793151cdbba4d is unusable due to missing
 or recursive dependencies:
 deepseq-1.3.0.0-a73ec930018135e0dc0a1a3d29c74c88

 (use -v for more information)
 command line: cannot satisfy -package Cabal-1.14.0:
 Cabal-1.14.0-5875475606fe70ef919bbc055077d744 is unusable due to missing or
 recursive dependencies:
 array-0.4.0.0-59d1cc0e7979167b002f021942d60f46
 containers-0.4.2.1-cfc6420ecc2194c9ed977b06bdfd9e69
 directory-1.1.0.2-07820857642f1427d8b3bb49f93f97b0
 process-1.1.0.1-18dadd8ad5fc640f55a7afdc7aace500
 (use -v for more information)
 [...]


 On Thu 01 Mar 2012 11:06:43 PM CET, Neil Mitchell wrote:

 Hi Antoras,

 I've just released Hoogle 4.2.9, which allows Cabal 1.15, so hopefully
 will install correctly for you.

 Thanks, Neil

 On Thu, Mar 1, 2012 at 5:02 PM, Neil Mitchellndmitch...@gmail.com
  wrote:

 Hi Antoras,

 The darcs version of Hoogle has had a more permissive dependency for a
 few
 weeks. Had I realised the dependency caused problems I'd have released a
 new
 version immediately! As it stands, I'll release a new version in about 4
 hours. If you can't wait that long, try darcs get
 http://code.haskell.org/hoogle

 Thanks, Neil


 On Thursday, March 1, 2012, Antoras wrote:


 Ok, interesting info. But how to solve the problem now? Should I contact
 the author of Hoogle and ask him about how solving this?


 On 03/01/2012 02:02 AM, Albert Y. C. Lai wrote:


 On 12-02-29 06:04 AM, Antoras wrote:


 I don't know where the dependency to array-0.3.0.3 comes from. Is it
 possible to get more info from cabal than -v?



 hoogle-4.2.8 has Cabal= 1.8    1.13, this brings in Cabal-1.12.0.

 Cabal-1.12.0 has array= 0.1    0.4, this brings in array-0.3.0.3.


 It is a mess to have 2nd instances of libraries that already come with
 GHC, unless you are an expert in knowing and avoiding the treacherous
 consequences. See my
 http://www.vex.net/~trebla/haskell/sicp.xhtml

 It is possible to fish the output of cabal install --dry-run -v3
 hoogle
 for why array-0.3.0.3 is brought in. It really is fishing, since the
 output
 is copious and of low information density. Chinese idiom: needle in
 ocean
 (haystack is too easy). Example:

 selecting hoogle-4.2.8 (hackage) and discarding Cabal-1.1.6, 1.2.1,
 1.2.2.0,
 1.2.3.0, 1.2.4.0, 1.4.0.0, 1.4.0.1, 1.4.0.2, 1.6.0.1, 1.6.0.2, 1.6.0.3,
 1.14.0, blaze-builder-0.1, case-insensitive-0.1,

 We see that selecting hoogle-4.2.8 causes ruling out Cabal 1.14.0

 Similarly, the line for selecting Cabal-1.12.0 mentions ruling out
 array-0.4.0.0

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



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





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


Re: parallelizing ghc

2012-01-29 Thread Neil Mitchell
Hi Simon,

I have found that a factor of 2 parallelism is required on Linux to
draw with ghc --make. In particular:

GHC --make = 7.688
Shake -j1 = 11.828 (of which 11.702 is spent running system commands)
Shake full -j4 = 7.414 (of which 12.906 is spent running system commands)

This is for a Haskell program which has several bottlenecks, you can
see graph of spawned processes here:
http://community.haskell.org/~ndm/darcs/shake/academic/icfp2012/profile.eps
- everything above the 1 mark is more than one process in parallel, so
it gets to 4 processes, but not all the time - roughly an average of ~
x2 parallelism.

On Windows the story is much worse. If you -j4 then the time spent
executing system commands shoots up from ~15s to around ~25s, since
even on a 4 core machine the contention in the processes is high. I
tried investigating this, checking for things like a locked file (none
I can find), or disk/CPU/memory contention (its basically taking no
system resources), but couldn't find anything.

If you specify -O2 then the parallel performance also goes down - I
suspect because each ghc process needs to read inline information for
packages that are imported multiple times, and ghc --make gets away
with doing that once?

 This looks a bit suspicious.  The Shake build is doing nearly twice as much
 work as the --make build, in terms of CPU time, but because it is getting
 nearly 2x parallelism it comes in a close second.  How many processes is the
 Shake build using?

Shake uses a maximum of the number of processes you specify, it never
exceeds the -j flag - so in the above example it caps out at 4. It is
very good at getting parallelism (I believe it to be perfect, but the
code is 150 lines of IORef twiddling, so I wouldn't guarantee it), and
very safe about never exceeding the cap you specify (I think I can
even prove that, for some value of proof). The profiling makes it easy
to verify these claims after the fact.

Thanks, Neil

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


Re: [Haskell-cafe] lost in generics

2011-10-24 Thread Neil Mitchell
Hi Rustom,

I tend to find that I use Uniplate for most stuff, and SYB for very
complex stuff (SYB is quite a bit more complicated to do the simple
things, but can do things out of reach for Uniplate). The example of
manipulating AST's is very common, and using a generics library is a
very good idea.

One way to start would be to read the Uniplate manual:
http://community.haskell.org/~ndm/darcs/uniplate/uniplate.htm - it
even uses a simple expression type as the example. It has examples of
all the functions, and also little exercises to try - even if you
don't use Uniplate the exercises might give you practice figuring out
what functions you're likely to end up using in your generics library.

Thanks, Neil


On Thu, Oct 20, 2011 at 6:12 PM, Rustom Mody rustompm...@gmail.com wrote:
 I need some help finding my way around the various generics libraries.

 My usage scenario is -- at least to start with -- the ASTs of programming
 languages.

 It appears to me that there are two generations of generics -- earlier there
 was generic haskell and strafunski
 Now there is uniplate and kure (and syb? -- not sure of its generation...)

 I get this impression because I saw a comment somewhat along these lines.

 And also the very first reference link on the strafunski webpage:
 http://www.haskell.org/haskellwiki/Applications_and_libraries/Generic_programming/Strafunski
 viz http://www.cs.vu.nl/Strafunski/
 seems to be dead. So I am wondering whether strafunski is still under
 development or is it defunct?

 The following paras from
 http://www.cs.uu.nl/research/techreps/repo/CS-2008/2008-010.pdf

 The current status of generic programming in Haskell is comparable
 to the lazy Tower of Babel preceding the birth of Haskell
 in the eighties [Hudak et al., 2007]. We have many single-site languages
 or libraries, each individually lacking critical mass in terms
 of language/library-design effort, implementations, and users.



 Although generic programming has been used in several applications,
 it has few users for real-life projects. This is understandable.
 Developing a large application takes a couple of years, and
 choosing a particular approach to generic programming for such a
 project involves a risk. Few approaches that have been developed
 over the last decade are still supported, and there is a high risk that
 the chosen approach will not be supported anymore, or that it will
 change in a backwards-incompatible way in a couple of years time.

  sound omninous :-)
 In general my question is:  What is alive/active and what is alive/active
 and what is -- um -- moved-on-from.
 And of course which are easier and which more difficult to dig into.

 Thanks

 Rusi

 ___
 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] hledger subcommand detection, RFC

2011-09-11 Thread Neil Mitchell

  * an option to all commands that lists out all its available
 options, to aid with shell completion. See the link I posted above
 about the oggz tools for an example usage and a link to a bash
 completion file.


Note that the next version of CmdArgs will include command line flag
completion automatically, so you might want to leave that feature a little
while and see if you can make use of the CmdArgs feature.

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


Re: [Haskell-cafe] extending and reusing cmdargs option specs ?

2011-09-11 Thread Neil Mitchell
Hi,

You're asking for:
http://code.google.com/p/ndmitchell/issues/detail?id=291 - it's
something I'm already aware of, and what to do at some point.
Unfortunately, it probably won't be anytime in the next few months,
but it will happen eventually.

Thanks, Neil

On Tue, Aug 9, 2011 at 3:08 AM, wren ng thornton w...@freegeek.org wrote:
 On 8/8/11 1:59 PM, Simon Michael wrote:

 And, I may have made things worse for myself in the reuse/avoiding
 boilerplate department: I'm not sure how to reuse a cmdargs options data
 structure, extending it with a few more options.

 This is a big problem I'm dealing with too lately. In particular, what I
 would like is if cmdargs could do flattening of structures, either
 automatically or with a new annotation combinator. With this it would be
 easy to have a basic FooBar program:

    data FooBar = FooBar
        { foo :: Foo
        , bar :: Bar
        }
        deriving (Data, Typeable,...)

    getFooBarMode :: IO (Mode (CmdArgs FooBar))
    getFooBarMode = ...

 and then extend it to a FooBarBaz program:

    data FooBarBaz = FooBarBaz
        { fooBar :: FooBar
        , baz :: Baz
        }
        deriving (Data, Typeable,...)

    getFooBarBazMode :: IO (Mode (CmdArgs FooBarBaz))
    getFooBarBazMode = ...

 The big trick is that I should be able to call getFooBarMode from
 getFooBarBazMode equivalently to if I had defined,

    data FooBarBaz = FooBarBaz
        { foo :: Foo
        , bar :: Bar
        , baz :: Baz
        }
        deriving (Data, Typeable,...)

 and copied over getFooBarMode inline into getFooBarBazMode. The problem is
 that the bulk of the code is in the Mode-generating functions, and it's also
 the sort of code that's hardest to keep in sync documentation-wise.

 I don't mind the extra indirection in the Mode structures since I don't
 actually use them in the program itself; I have an internal configuration
 type that I compile the FooBarBaz down to, so that I can perform additional
 semantic consistency checks before execution, as well as precomputing what
 the commandline arguments dereference into (e.g., functions).


 As always, thanks a lot for cmdargs!
 -Simon

 Indeed. Aside from this feature request I've been quite pleased :)

 --
 Live well,
 ~wren


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


Re: [Haskell-cafe] Package descriptions on hackage

2011-09-11 Thread Neil Mitchell
There are several problems here:

1) Not everyone can write beautiful clear English descriptions, it
takes a certain skill.
2) The person writing the description is the author, who knows all the
details, but the person reading the description doesn't  - writing for
a different audience is an even harder skill to master.
3) It's easy to miss something when updating a package.
4) Quality documentation places an ongoing maintenance burden on the
package, and while test suites etc. make code maintenance easy, I
don't know any way to automatically check documentation!

Why not email the maintainers of packages you think need a better
description - ideally giving suggestions? I'd welcome that for any of
my packages.

Thanks, Neil

On Mon, Sep 5, 2011 at 11:22 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
 On 5 September 2011 23:59, Joachim Breitner m...@joachim-breitner.de wrote:
 Dear hackage package authors,

 this is a short message from your distribution package creators: Please,
 if possible, write good, not too short descriptions, and also keep them
 up to date. Of course, users browsing hackage will benefit as well.

 Also for potential users trying to work out what your library does!

 Something that I find particularly frustrating is all the libraries of
 the form hFoo: Haskell bindings to the Foo library; well, what _is_
 the Foo library?

 --
 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


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


Re: [Haskell-cafe] Code critique - Was [Maybe Int] sans Nothings

2011-05-30 Thread Neil Mitchell
Hi Michael,

You've used quite a few entirely redundant brackets. The tool HLint (
http://community.haskell.org/~ndm/hlint) will tell you which ones.

Thanks, Neil

On Wed, May 25, 2011 at 12:09 AM, michael rice nowg...@yahoo.com wrote:

 The input file: http://dl.dropbox.com/u/27842656/psalms

 The Markov chain exercise from The Practice of Programming,
 Kermighan/Pike. Sample runs at the end.

 Michael

 

 import System.Environment(getArgs)
 import System.Random
 import Control.Applicative
 import Control.Monad.Reader
 import Control.Monad.State
 import Data.Maybe
 import Data.Map

 type Prefix = (String,String)
 type GeneratorState1 = State ((Map Prefix [String]),Prefix,[String])
 type GeneratorState2 = StateT (Prefix,StdGen) (Reader (Map Prefix
 [String]))

 non_word = \n

 f key new old = new ++ old

 buildMap :: GeneratorState1 (Map Prefix [String])
 buildMap = do (mp,(pfx1,pfx2),words) - get
   if (Prelude.null words)
 then {- No more words. Return final map (adding non_word
 for final prefix). -}
   return (insertWithKey' f (pfx1,pfx2) [non_word] mp)
 else do {- Add word to map at prefix  continue. -}
   put (insertWithKey' f (pfx1,pfx2) [head words] mp,
 (pfx2,(head words)), tail words)
   buildMap

 generate :: GeneratorState2 (Maybe String)
 generate = do ((pfx1,pfx2),gen) - get
   mp - ask
   let suffixList = mp ! (pfx1,pfx2)
   let (index,newGen) = randomR (0, (length suffixList)-1) gen
   let word = suffixList !! index
   if (word == non_word)
 then
   return Nothing
 else do
   put ((pfx2,word),newGen)
   return (Just word)

 rInt :: String - Int
 rInt = read

 main = do (seed:nwords:_) - (Prelude.map rInt) $ getArgs
   contents - getContents
   putStrLn $ unwords $ catMaybes $ runReader (evalStateT (sequence
 $ replicate nwords generate) ((non_word,non_word),mkStdGen seed))
  (evalState buildMap
 (singleton (non_word,non_word) [], (non_word,non_word), words contents))

 {-
 [michael@hostname ~]$ ghc --make markov.hs
 [1 of 1] Compiling Main ( markov.hs, markov.o )
 Linking markov ...
 [michael@hostname ~]$ cat psalms | ./markov 111 100
 Blessed is the LORD, in thine own cause: remember how the foolish people
 have blasphemed thy name. In the courts of the righteous: The LORD taketh
 pleasure in the desert. And he led them with the wicked, and with the whole
 earth, is mount Zion, on the sides of thine only. O God, and was troubled: I
 complained, and my God. My times are in thy praise. Blessed be God, which is
 full of the LORD is good: for his wondrous works. Now also when I am small
 and despised: yet do I put my trust: how say ye to
 [michael@hostname ~]$ cat psalms | ./markov 666 100
 Blessed is the LORD, and cried unto thee, Thy face, LORD, will I remember
 thee from the beginning: and every one that is weaned of his heart to any
 wicked transgressors. Selah. They return at evening: they make ready their
 arrow upon the people; and thou hast destroyed all them that fight against
 them that trust in thee: and let my tongue cleave to the heavens by his
 power for ever; and thy lovingkindnesses; for they have laid a snare before
 them: and that my ways were directed to keep thy word. Mine eyes fail while
 I have said that
 [michael@hostname ~]$

 --- On *Tue, 5/24/11, Alexander Solla alex.so...@gmail.com* wrote:


 From: Alexander Solla alex.so...@gmail.com
 Subject: Re: [Haskell-cafe] [Maybe Int] sans Nothings
 To: Haskell Cafe haskell-cafe@haskell.org
 Date: Tuesday, May 24, 2011, 5:01 PM


  Personally, I find non-functional values without Eq instances to be
  degenerate.  So I really do not mind superfluous Eq constraints.  I
  would not hesitate to use filter ((/=) Nothing) in a function whose type
  has no free type variables.  It's just a bit of plumbing inside of a
  more complex function.

 Sometimes it seems to be better to not allow Eq on Float and Double.
 Since most algebraic laws do not hold for those types, it is more often
 an error than an intention to compare two Float values. And how to
 compare (IO a) values?


 Floats, Doubles, and IO are all degenerate types, for the reasons you
 outline.  (Admittedly, Float and Double have Eq instances, but invalid Eq
 semantics)  Notice how their value semantics each depend on the machine your
 runtime runs on, as opposed to merely the runtime.  Bottom is another one of
 these degenerate types, since comparisons on arbitrary values are
 undecidable.

 Also, by thinking about function types, you often
 get interesting use cases. Thus I would not assume too quickly that a
 type will always be instantiated by types other than a function type.
 Thus I would stick to (filter isJust) and use this 

Re: [Haskell-cafe] uniplate (was: code review?)

2011-05-30 Thread Neil Mitchell
Hi John,

  While I'm on the topic, I recently wrote a tool that wanted to
  traverse deep data structures as produced by haskell-src-exts. ?I
  wound up with about 50 lines of case expressions and around the time
  my hands were literally beginning to hurt decided that enough was
  enough and I should try a generic approach. ?I heard uniplate was
  pretty easy to use, and was pretty pleased to turn the entire thing
  into a single line. ?It took me a little longer to figure out I needed
  to use universeBi since all the examples were monotyped, but once I
  did it Just Worked. ?Amazing. ?So thanks again! ?And maybe you could
  mention universeBi in the instant introduction?

 Yes, I probably should - I'll try and get to that. Of course, I'd also
 happily accept a patch against
 http://community.haskell.org/~ndm/darcs/uniplate

 I use Uniplate inside HLint, and it's invaluable - there are a lot of
 times when List Comp + universeBi really hits the spot.

 Does Uniplate include an instance for:
 instance Uniplate a = Biplate [a] a

No, it only includes:

instance Biplate [Char] Char where
biplate (x:xs) = plate (:) |* x ||* xs
biplate x = plate x

I am slightly curious why I didn't include the more general a instead
of Char version, but perhaps it doesn't quite work - polymorphic
versions of the Direct instances can have problems if you pick weird
types. I'll have a think, and if it does always work, I'll include it.

Note that if you use the Typeable or Data versions this instance is
automatically available. In practice I almost always end up using the
Data versions of Uniplate, they require no instance definitions are
are good to get started with - you can switch to Direct only if you
need the additional performance.

Thanks, Neil

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


Re: [Haskell-cafe] code review?

2011-05-25 Thread Neil Mitchell
Hi Niklas,

 I use Uniplate inside HLint, and it's invaluable - there are a lot of
 times when List Comp + universeBi really hits the spot.

 +1 on that, I use uniplate for pretty much all my haskell-src-exts tasks
 these days, works like a charm!
 I'd love to include some standard traversal functionality in
 haskell-src-exts that depends on uniplate, but hesitate to do so because of
 HP aspirations for haskell-src-exts. Neil, what do you reckon the chances of
 getting uniplate in the HP are? :-)

I'm happy to have it included. The only likely change is that I
currently have basically two versions of all modules
(Data.Generics.PlateData and Data.Generics.Uniplate.Data). I'll upload
a version 1.7 of Uniplate marking those deprecated, then a 1.8
removing them, and then I'd love to get included in the Platform. Of
course, whether it goes in the platform is not really up to me, it's
up to the community - but if someone proposes it I'll back it.

Thanks, Neil

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


Re: [Haskell-cafe] lambdabot hoogle

2011-05-25 Thread Neil Mitchell
Hi Jacek,

 Which works swimmingly on Ubuntu, but fails on OS X, because wget seems to
 be hard-wired. I seem to recall that at least one of the packages that I
 installed over the last 2 days, automatically selected wget on Ubuntu, and
 curl on OS X.

I see someone raised a bug for this:
http://code.google.com/p/ndmitchell/issues/detail?id=434 - it's a very
reasonable idea, which I'll include in the next version. Then if you
have either wget or curl it will work.

 Any pointers to the least painful way of getting 'hoogle data' to work on OS
 X?

Set up a shell alias so wget just calls curl? Install wget on OS X? If
neither of these is feasible let me know and I'll rush out a new
version of Hoogle.

Thanks, Neil

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


Re: [Haskell-cafe] code review?

2011-05-24 Thread Neil Mitchell
 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 run it on my own code.  Thanks for the great tool!

Glad you like it.

 While I'm on the topic, I recently wrote a tool that wanted to
 traverse deep data structures as produced by haskell-src-exts.  I
 wound up with about 50 lines of case expressions and around the time
 my hands were literally beginning to hurt decided that enough was
 enough and I should try a generic approach.  I heard uniplate was
 pretty easy to use, and was pretty pleased to turn the entire thing
 into a single line.  It took me a little longer to figure out I needed
 to use universeBi since all the examples were monotyped, but once I
 did it Just Worked.  Amazing.  So thanks again!  And maybe you could
 mention universeBi in the instant introduction?

Yes, I probably should - I'll try and get to that. Of course, I'd also
happily accept a patch against
http://community.haskell.org/~ndm/darcs/uniplate

I use Uniplate inside HLint, and it's invaluable - there are a lot of
times when List Comp + universeBi really hits the spot.

Thanks, Neil

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


Re: [Haskell-cafe] code review?

2011-05-23 Thread Neil Mitchell
 'if all == False then return False else return True' is a pretty
 confusing way to say 'return all'.  In fact, any time you see 'x ==
 True' you can just remove the '== True'.  The whole postAll thing
 would be clearer as

Before doing a code review I always demand that the author runs over
the code with HLint (http://community.haskell.org/~ndm/hlint) - they
don't have to necessarily apply all the suggestions, but they do have
to at least be aware of obvious alternatives. A code review takes a
reasonable amount of time, and it's best to use that for things that
machines can't yet figure out - rather than the simpler stuff like the
above.

Thanks, Neil

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


Re: [Haskell-cafe] Functional dependencies and Peano numbers (and hoogle-bug?)

2011-05-03 Thread Neil Mitchell
Hi Oscar,

Sorry for the seriously late reply. I only just found this message in
the bottom of my inbox:

 On an unrelated note:

 I hoogled to (i.e. http://haskell.org/hoogle/?hoogle=to) and just
 got a blank page. Nothing. Nil (not even html.../html). Is this a
 bug or a feature? :)

It was a bug, fixed in hoogle-4.2.1. I had an incomplete pattern match
on to, which crashed Hoogle. The reason to is treated specially is
that when people search for a to b, they usually mean a - b, and
my code to detect this was incorrect. All fixed now.

Thanks for the report. In future, if you find a bug in Hoogle can you
please email me directly, or raise it on my bug tracker:
http://code.google.com/p/ndmitchell/issues/

Thanks, Neil

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


Re: [Haskell-cafe] wrong backquote in haskell 2010 report Prelude

2011-03-22 Thread Neil Mitchell
Hi Albert,

Thanks for spotting this, it definitely looks wrong. On the line above
I also see the ^ characters have got corrupted. I've emailed it
onwards to the current report editor (Malcolm Wallace)

Thanks, Neil

On Thu, Mar 17, 2011 at 4:57 PM, Albert Y. C. Lai tre...@vex.net wrote:
 Haskell 2010 report chapter 9 Standard Prelude uses a wrong backquote, e.g.,

 infixl 7  ⋆, /, ‘quot‘, ‘rem‘, ‘div‘, ‘mod‘

 Those are U+2018. The grammar (Chapter 3) requires U+0060 and accepts no
 substitutes, e.g.,

 varop → varsym | `  varid `


 ___
 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: hoogling GHC

2011-03-14 Thread Neil Mitchell
Hi Ranjit,

 Is there a command line option that allows one to change the default prefix 
 for the
 URL returned by searches?

No command line option, but you can change the .txt file itself by doing:

@url http://www.haskell.org/ghc/docs/7.0.1/html/libraries/ghc-7.0.1/
@package ghc

That should cause all the URL's in the GHC package that aren't
explicit to have the above URL prepended to them. If there's demand, I
can add a flag.

Thanks, Neil


 On Mar 9, 2011, at 1:59 PM, Neil Mitchell wrote:

 Hi Ranjit,

 It sounds like you've got quite far. Sadly the manual is a bit out of
 date with respect to generating databases, but generally you need to
 produce ghc.txt on your own (using tools such as GHC's make system),
 then you can do:

 hoogle convert ghc.txt default.hoo

 Then you can run the local server with:

 hoogle server --databases=.

 That will find databases from the current directory, and serve them.
 Alternatively, if you put ghc.hoo (or default.hoo) in
 $DATADIR/databases it will pick them up automatically (where $DATADIR
 is whatever Cabal configured it to be). If you name the database as
 default.hoo it will be searched by default, if you name it ghc.hoo
 then foo +ghc will search for foo in the GHC database.

 If a copy of ghc.txt was publicly available somewhere (and updated on
 some schedule), I'd be happy to make the official Hoogle server search
 it. Usually I just grab databases off Hackage, but I'll happily make
 an exception for GHC.

 Thanks, Neil

 On Sun, Mar 6, 2011 at 7:52 AM, Malcolm Wallace malcolm.wall...@me.com 
 wrote:
 The final stumbling block is getting the local webserver (hoogle server)
 to also search the above database. I'm sure there must be some simple way
 I
 can pass the name of the database as an argument when I boot up the
 server,
 but I can't seem to find it...

 Have you found the various versions of the web deployment procedure yet?

 deploy.txt:  instructions to follow manually (seems to be up-to-date)
 deploy.sh:   a shell script version to run locally (may be old)
 Deploy.hs:   a haskell version to run remotely (may also be old)

 Obviously those scripts are tailored to the official installation, but there
 are some clues in there, for instance the steps

    cabal configure --datadir=/srv/web/haskell.org/hoogle/
 --datasubdir=datadir -O2

 and

    Upload datadir/resources to /srv/web/haskell.org/hoogle/datadir/resources
    Upload datadir/databases/* to
 /srv/web/haskell.org/hoogle/datadir/databases

 Regards,
    Malcolm

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




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


Re: [Haskell-cafe] Cmdargs and common flags

2011-03-12 Thread Neil Mitchell
{-# OPTIONS_GHC -fno-warn-missing-fields #-}

That's what I did in my CmdArgs test suite - if you have all your
CmdArgs bit in a separate file then missing this warning will be fine.
I don't know of any way to rewrite the code to indicate to GHC that
you know what you are doing.

Thanks, Neil


On Sat, Mar 12, 2011 at 8:02 AM, Magnus Therning mag...@therning.org wrote:
 On Mon, Feb 14, 2011 at 19:11, Neil Mitchell ndmitch...@gmail.com wrote:
 Hi Magnus,

 Finally, you can switch to the pure annotations. I will document them
 shortly and give an example in System.Console.CmdArgs.Implicit, but
 for now the details can be found at
 http://hackage.haskell.org/packages/archive/cmdargs/0.6.7/doc/html/System-Console-CmdArgs-Annotate.html

 I've added more details in:
 http://hackage.haskell.org/packages/archive/cmdargs/0.6.8/doc/html/System-Console-CmdArgs-Annotate.html
 http://hackage.haskell.org/packages/archive/cmdargs/0.6.8/doc/html/System-Console-CmdArgs-Implicit.html

 The first link includes comparisons for pure/impure, and the second
 gives a set of equivalences for converting between the two forms.

 Thanks, Neil

 I noticed that the form record Ctor {} [...] leads to a warning that
 Ctor isn't initialised.  The obvious way to remove the warning is to
 call the constructor with all the arguments, but is there a more
 convenient/terse way of achieving the same?

 /M

 --
 Magnus Therning                      OpenPGP: 0xAB4DFBA4
 email: mag...@therning.org   jabber: mag...@therning.org
 twitter: magthe               http://therning.org/magnus


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


Re: hoogling GHC

2011-03-09 Thread Neil Mitchell
Hi Ranjit,

It sounds like you've got quite far. Sadly the manual is a bit out of
date with respect to generating databases, but generally you need to
produce ghc.txt on your own (using tools such as GHC's make system),
then you can do:

hoogle convert ghc.txt default.hoo

Then you can run the local server with:

hoogle server --databases=.

That will find databases from the current directory, and serve them.
Alternatively, if you put ghc.hoo (or default.hoo) in
$DATADIR/databases it will pick them up automatically (where $DATADIR
is whatever Cabal configured it to be). If you name the database as
default.hoo it will be searched by default, if you name it ghc.hoo
then foo +ghc will search for foo in the GHC database.

If a copy of ghc.txt was publicly available somewhere (and updated on
some schedule), I'd be happy to make the official Hoogle server search
it. Usually I just grab databases off Hackage, but I'll happily make
an exception for GHC.

Thanks, Neil

On Sun, Mar 6, 2011 at 7:52 AM, Malcolm Wallace malcolm.wall...@me.com wrote:
 The final stumbling block is getting the local webserver (hoogle server)
 to also search the above database. I'm sure there must be some simple way
 I
 can pass the name of the database as an argument when I boot up the
 server,
 but I can't seem to find it...

 Have you found the various versions of the web deployment procedure yet?

 deploy.txt:  instructions to follow manually (seems to be up-to-date)
 deploy.sh:   a shell script version to run locally (may be old)
 Deploy.hs:   a haskell version to run remotely (may also be old)

 Obviously those scripts are tailored to the official installation, but there
 are some clues in there, for instance the steps

    cabal configure --datadir=/srv/web/haskell.org/hoogle/
 --datasubdir=datadir -O2

 and

    Upload datadir/resources to /srv/web/haskell.org/hoogle/datadir/resources
    Upload datadir/databases/* to
 /srv/web/haskell.org/hoogle/datadir/databases

 Regards,
    Malcolm

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


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


Re: [Haskell-cafe] Cmdargs and common flags

2011-02-14 Thread Neil Mitchell
Hi Magnus,

 Finally, you can switch to the pure annotations. I will document them
 shortly and give an example in System.Console.CmdArgs.Implicit, but
 for now the details can be found at
 http://hackage.haskell.org/packages/archive/cmdargs/0.6.7/doc/html/System-Console-CmdArgs-Annotate.html

I've added more details in:
http://hackage.haskell.org/packages/archive/cmdargs/0.6.8/doc/html/System-Console-CmdArgs-Annotate.html
http://hackage.haskell.org/packages/archive/cmdargs/0.6.8/doc/html/System-Console-CmdArgs-Implicit.html

The first link includes comparisons for pure/impure, and the second
gives a set of equivalences for converting between the two forms.

Thanks, Neil

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


Re: [Haskell-cafe] Cmdargs and common flags

2011-01-24 Thread Neil Mitchell
Hi Magnus,

What you want is actually easier than you think!

To quote from 
http://hackage.haskell.org/packages/archive/cmdargs/0.6.7/doc/html/System-Console-CmdArgs-Implicit.html:

Missing Fields: If a field is shared by multiple modes, it may be
omitted in subsequent modes, and will default to the previous value.

Therefore you can just do:

   cmd1 = Cmd1 { foo = def = help .., ...}
   cmd2 = Cmd2 { ...} -- never mention foo in Cmd2

cmdArgs [cmd1,cmd2]

And foo in Cmd2 will act exactly like you duplicated the definition
from foo in Cmd1. I use this feature regularly - it's a big time
saver.

Alternatively, you can use the tricks described by Kevin.

Finally, you can switch to the pure annotations. I will document them
shortly and give an example in System.Console.CmdArgs.Implicit, but
for now the details can be found at
http://hackage.haskell.org/packages/archive/cmdargs/0.6.7/doc/html/System-Console-CmdArgs-Annotate.html

To translate your cmd1/cmd2:

cmd1 = record Cmd1{} [foo := def += help .., ...]
cmd2 = record Cmd2{} [foo := def += help .., ...]

And then call cmdArgs_ instead. Now you can do anything that
equational reasoning supports without any danger:

cmd1 = record Cmd1{} [myfoo, ...]
cmd2 = record Cmd2{} [myfoo, ...]
myfoo = foo := def += help ..

Even when using the pure annotations, you can still use missing fields:

cmd1 = record Cmd1{} [foo := def += help .., ...]
cmd2 = record Cmd2{} [...]

Thanks, Neil

On Mon, Jan 24, 2011 at 8:50 PM, Kevin Quick qu...@sparq.org wrote:
 Magnus,

 I used the following technique, but it was a couple of iterations of CmdArgs
 ago:


 data UIMode = Normal | Batch | Query deriving (Data,Typeable,Show,Eq)

 uimode_arg :: forall t. t - UIMode
 uimode_arg _ = enum Normal
               [ Batch = flag B  text batch mode (no interaction) 
 group grp
               , Query = flag Q
                            text query mode (user verification solicited)
                            group grp
               ]
    where grp = Operating Mode


 data Globalargs = CMD1 { ... , uimode :: UIMode , ... }
                | CMD2 { ... , uimode :: UIMode , ... }


 cmd1mode :: Mode Globalargs
 cmd1mode = mode $ CMD1 { ... , uimode = uimode_arg cmd1 }
                  = text (usage ...)


 cmd2mode :: Mode Globalargs
 cmd2mode = mode $ CMD1 { ... , uimode = uimode_arg cmd2 }
                  = text (usage ...)

 modes :: [ Mode Globalargs ]
 modes = [ cmd1mode, cmd2mode ]

 main  = do cmdArgs progSummary modes
           ...


 I've cut and pasted from my usage and perhaps pasted too little, so let me
 know if the above is unuseably brief.  And again, cmdargs has changed
 somewhat since this code was written and I haven't tried a recent
 compilation.

 -KQ

 P.S.  This often required {-# OPTIONS_GHC -fno-full-laziness -fno-strictness
 #-} because GHC (6.12? 6.10?) would complain about my uimode_arg type
 otherwise.


 On Thu, 20 Jan 2011 01:48:35 -0700, Magnus Therning mag...@therning.org
 wrote:

 I'm looking for a good way of dealing with common flags in cmdargs.
 Currently what I do requires a bit of repetition that I'd really like
 to get rid of:

 1. Data types

    data Modes = Cmd1 { foo :: String, ... } | Cmd2 { foo :: String, ... }

 2. Mode specifications

    cmd1 = Cmd1 { foo = def = help .., ...}
    cmd2 = Cmd2 { foo = def = help .., ...}

 I have no idea how to deal with the repetition in the data types, so
 all suggestions are welcome.

 For the repetition in the mode specifications I attempted to factor
 the common bits into a variable:

    flagFoo =  = help ..

 but that resulted in only the first command getting the proper
 specification.  I suppose this comes down to the impurity, but how do
 I work around that?  (Especially, are there any good examples of using
 the pure part of the API?)

 /M



 --
 -KQ

 ___
 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: Release/git plans

2011-01-22 Thread Neil Mitchell
Hi Austin,

The compiler plugins work is a great, and I'd be a likely user. The
original version wasn't supported on Windows, because GHC on Windows
lacked various forms of dynamic linking. Does the current patch you've
prepared work on Windows?

Thanks, Neil

On Sat, Jan 22, 2011 at 10:29 AM, Max Bolingbroke
batterseapo...@hotmail.com wrote:
 On 21 January 2011 23:59, austin seipp a...@hacks.yi.org wrote:
 Perhaps Max can
 elaborate on why this design was rejected in favor of the current one,
 so we can see how and where it falls down, and what we really want.

 The only reason really is that it added a lot of mechanism. From the
 top of my head:
  * Parsing etc for PHASE pragmas that declared phase objects
  * A new namespace for phases
  * Stuff to gather declared phases from all imported modules during 
 compilation
  * A built-in phase for each core pass
  * A solver that ordered core passes and plugin passes according to the phases

 So it was a lot of trouble for relatively little gain. In an effort to
 keep the delta against GHC small I threw it out in favour of the much,
 much simpler design we have today.

 Thomas pointed out the Scala compiler plugin design document, so I'll
 be sure to read over it this weekend when I get the chance to cook up
 ideas.

 The Scala plugins project was just starting when I was working on GHC
 plugins so there was no design doc I could refer to at that time.
 Shame :-(

 Thanks for taking the lead on resurrecting plugins, Austin!

 Cheers,
 Max

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


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


[Haskell-cafe] Community.haskell.org is down

2011-01-19 Thread Neil Mitchell
http://www.downforeveryoneorjustme.com/http://community.haskell.org

Currently community is down for me. I remember some
infrastructure/website strike team was set up, but I couldn't find
where to get in contact with them?

Thanks, Neil

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


Re: [Haskell-cafe] parsec2 vs. parsec3... again

2011-01-15 Thread Neil Mitchell
 This isn't completely without basis. For instance, I made some big speed
 improvements to attoparsec's very performance-sensitive takeWhile function
 just the other day, thanks to -auto-all.

 I might, though, see if there's a way I could enable that flag only for
 myself (in a way that I wouldn't routinely forget).

See ~/.cabal/config - I use that to make sure all my packages are
installed globally with profiling, and I think it might have enough
options to force -auto-all in some way.

Thanks, Neil

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


Re: [Haskell-cafe] hoogle command line program on Linux

2011-01-15 Thread Neil Mitchell
On Mon, Jan 10, 2011 at 10:17 PM, Neil Mitchell ndmitch...@gmail.com wrote:
 If so, I'll make a new release that just changes the
 file creation mask to the above during hoogle data (and sets it back
 after).

Thanks to Erik's help testing preview versions I've now released
Hoogle 4.1.4 that sets the file creation mask appropriately.

Thanks, Neil

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


Re: [Haskell-cafe] hoogle command line program on Linux

2011-01-15 Thread Neil Mitchell
 Thanks to Erik's help testing preview versions I've now released
 Hoogle 4.1.4 that sets the file creation mask appropriately.

 Shouldn't data like this really go in /var rather than /usr ?  To
 quote Wikipedia [1]: /var/: Variable files—files whose content is
 expected to continually change during normal operation of the
 system—such as logs, spool files, and temporary e-mail files.

The Hoogle databases are expected to change very rarely - most users
will install them when they install Hoogle. A small number will update
them occasionally as the packages update. I'm using the Cabal datadir
to store the databases, but does Cabal provide a more sensible place
to put them? As a Windows user, I'm happy to defer to what Posix
system users want.

Thanks, Neil

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


Re: [Haskell-cafe] Needed: A repeatable process for installing GHC on Windows

2011-01-15 Thread Neil Mitchell
 Earlier today I was trying to set up a Windows build bot for the
 'network' package. That turned out to be quite difficult. Too much
 playing with PATHs, different gcc versions, etc. Does anyone have a
 repeatable, step-by-step process to install GHC and get a build
 environment (where I could build network) going?

No, but I used to (and sadly can't find it any more). I used to have a
script called ghcsetup which built GHC on Windows, and importantly
validated the setup was correct (the right gcc was first in the path
etc) and took actions to correct it.

I am sure there used to be a great web page on the GHC wiki, saying
the exact steps to build (written by Claus), but I can't find it any
more. Perhaps Claus knows where it has gone?

Thanks, Neil

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


Re: [Haskell-cafe] hoogle command line program on Linux

2011-01-15 Thread Neil Mitchell
Hi Joachim,

 The Hoogle databases are expected to change very rarely - most users
 will install them when they install Hoogle. A small number will update
 them occasionally as the packages update. I'm using the Cabal datadir
 to store the databases, but does Cabal provide a more sensible place
 to put them? As a Windows user, I'm happy to defer to what Posix
 system users want.

 shouldn’t they change with every library update? In that case, maybe
 that should be managed by cabal, similar to how cabal can update your
 haddock index at ~/.cabal/share/doc/index.html.

Yes, that's exactly how it should work. All we need is someone to do
the work :-) There is a bug tracking the progress on this issue here:
http://code.google.com/p/ndmitchell/issues/detail?id=80 - but its a
reasonable amount of work, touching lots of different parts of the
Haskell infra.

Thanks, Neil

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


Re: RFC: migrating to git

2011-01-10 Thread Neil Mitchell
 As another non-GHC contributor, my opinion should probably also count for
 little, but my experience with git has been poor.

 I have used git daily in my job for the last year.  Like Simon PJ, I
 struggle to understand the underlying model of git, despite reading quite a
 few tutorials.  I have a high failure rate with attempting anything beyond
 the equivalents of darcs record, push, and pull.

I'm in exactly the same camp as Malcolm. I don't understand git, and I
end up deleting the entire repo and starting again every time I try
and do anything clever - something I've never needed to do with darcs.
I consider the git equivalent of darcs unrecord to be rm -rf, but
I'm sure that's a lack of knowledge/intuition on my part.

All my git dislike aside, I wouldn't worry about git and Windows. GHC
on Windows already drags in plenty of dependencies from Cygwin or
Mingw, both of which provide workable git binaries, and none of which
ever seem to have caused a problem. The standard gui's (gitk and git
gui) both work on Windows, and I certainly miss them when using darcs.

Thanks, Neil

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


Re: [Haskell-cafe] hoogle command line program on Linux

2011-01-10 Thread Neil Mitchell
 If so, I'll make a new release that just changes the
 file creation mask to the above during hoogle data (and sets it back
 after).

 That makes sense. If you have a darcs repo of the code (or even a
 tarball), I can check it before create a package.

That would be very useful. I'll try and update the darcs version
tomorrow and let you know when it's done.

Thanks, Neil

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


Re: [Haskell-cafe] hoogle command line program on Linux

2011-01-09 Thread Neil Mitchell
Hi Erik,

I'll release Hoogle 4.1.3 with a fix later today.

Thanks, Neil

On Sun, Jan 9, 2011 at 5:07 AM, Erik de Castro Lopo
mle...@mega-nerd.com wrote:
 Hi all,

 I'm testing out hoogle 4.1.2 on Debian Linux and getting the
 following when trying to update the local hoogle databases:

    erik  sudo hoogle data
    Starting default
    Starting keyword
    hoogle: keyword.txt: commitAndReleaseBuffer: invalid argument
    (Invalid or incomplete multibyte or wide character)

 My LANG related envorinment variables are set as follows:

    erik  env | grep LANG
    LANG=en_AU.UTF-8
    GDM_LANG=en_AU.UTF-8
    LANGUAGE=en_AU.UTF-8
    LC_LANG=en_AU.UTF-8

 When faced with a similar problem while working on Ben Lippmeier's
 compiler, I fixed this by replacing all instances of readFile with
 readUtf8File which is defined as:

    readUtf8File :: FilePath - IO String
    readUtf8File filePath
     = do   h - openFile filePath ReadMode
            hSetEncoding h utf8
            hSetEncoding stdout utf8
            hGetContents h

 Is it possible to fix this without hacking the hoogles sources?
 I'd like to package hoogle for Debian, but first I need to get
 it working.

 Cheers,
 Erik
 --
 --
 Erik de Castro Lopo
 http://www.mega-nerd.com/

 ___
 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] hoogle command line program on Linux

2011-01-09 Thread Neil Mitchell
Hi Erik,

Hoogle 4.1.3 is now released, which reads and writes Hoogle input
files in UTF8 throughout. Please let me know if this doesn't fix your
problem.

Thanks, Neil

On Sun, Jan 9, 2011 at 11:22 AM, Neil Mitchell ndmitch...@gmail.com wrote:
 Hi Erik,

 I'll release Hoogle 4.1.3 with a fix later today.

 Thanks, Neil

 On Sun, Jan 9, 2011 at 5:07 AM, Erik de Castro Lopo
 mle...@mega-nerd.com wrote:
 Hi all,

 I'm testing out hoogle 4.1.2 on Debian Linux and getting the
 following when trying to update the local hoogle databases:

    erik  sudo hoogle data
    Starting default
    Starting keyword
    hoogle: keyword.txt: commitAndReleaseBuffer: invalid argument
    (Invalid or incomplete multibyte or wide character)

 My LANG related envorinment variables are set as follows:

    erik  env | grep LANG
    LANG=en_AU.UTF-8
    GDM_LANG=en_AU.UTF-8
    LANGUAGE=en_AU.UTF-8
    LC_LANG=en_AU.UTF-8

 When faced with a similar problem while working on Ben Lippmeier's
 compiler, I fixed this by replacing all instances of readFile with
 readUtf8File which is defined as:

    readUtf8File :: FilePath - IO String
    readUtf8File filePath
     = do   h - openFile filePath ReadMode
            hSetEncoding h utf8
            hSetEncoding stdout utf8
            hGetContents h

 Is it possible to fix this without hacking the hoogles sources?
 I'd like to package hoogle for Debian, but first I need to get
 it working.

 Cheers,
 Erik
 --
 --
 Erik de Castro Lopo
 http://www.mega-nerd.com/

 ___
 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] hoogle command line program on Linux

2011-01-09 Thread Neil Mitchell
Hi Erik,

 The next problem is that hoogle installed as a Debian package would
 install as root as /usr/bin/hoogle. Then, when I run hoogle data it
 wants to install the database at /usr/share/hoogle/hoogle-4.1.3/databases
 which fails because I'm not running as root. So, to install the databases
 I need to run sudo hoogle data (which is acceptable), but then an
 unprivelidge user can't run hoogle because they don't have read permission
 on the database.

 The solution would be to set the umask before writing the databases.
 Something like (untested):

    import System.Posx


    -- Set umask to world read/execute. Save old umask for
    -- restoration later.
    oldumask - setFileCreationMask 0o022

Should all files created by hoogle data always have world
read/execute? I'm not sure what the Unix conventions are - would that
be reasonable? If so, I'll make a new release that just changes the
file creation mask to the above during hoogle data (and sets it back
after).

Thanks, Neil

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


Re: [Haskell-cafe] A question regarding cmdargs package

2010-12-30 Thread Neil Mitchell
Hi Sönke,

helpArg [groupname Something] should work, but it sounds like it
doesn't. I've raised a bug:
http://code.google.com/p/ndmitchell/issues/detail?id=392

I'll probably have this fixed in about a week.

Thanks, Neil

On Thu, Dec 30, 2010 at 4:05 PM, Sönke Hahn sh...@cs.tu-berlin.de wrote:
 That i18n is a fantastic argument - and one that really means cmdargs
 has no choice but to support all the attributes on help/version.

 Is it possible to change the groupname for the implicit help and version
 options? I have defined some options with groupname development flags, but I
 would want to have another groupname for help and version. (Or -- even
 better -- have them included in the Common flags section. I toyed around
 with something like 'helpArg [groupname Something]', but without success.

 Thanks,
 Sönke

 (Using System.Console.CmdArgs.Implicit from cmdargs-0.6.5.)


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


Re: [Haskell-cafe] A question regarding cmdargs package

2010-12-30 Thread Neil Mitchell
Hi Sönke,

I've just released cmdargs-0.6.6 which supports helpArgs [groupname Something]

Thanks, Neil

On Thu, Dec 30, 2010 at 5:09 PM, Neil Mitchell ndmitch...@gmail.com wrote:
 Hi Sönke,

 helpArg [groupname Something] should work, but it sounds like it
 doesn't. I've raised a bug:
 http://code.google.com/p/ndmitchell/issues/detail?id=392

 I'll probably have this fixed in about a week.

 Thanks, Neil

 On Thu, Dec 30, 2010 at 4:05 PM, Sönke Hahn sh...@cs.tu-berlin.de wrote:
 That i18n is a fantastic argument - and one that really means cmdargs
 has no choice but to support all the attributes on help/version.

 Is it possible to change the groupname for the implicit help and 
 version
 options? I have defined some options with groupname development flags, but 
 I
 would want to have another groupname for help and version. (Or -- even
 better -- have them included in the Common flags section. I toyed around
 with something like 'helpArg [groupname Something]', but without success.

 Thanks,
 Sönke

 (Using System.Console.CmdArgs.Implicit from cmdargs-0.6.5.)



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


Re: [Haskell-cafe] OT: Monad co-tutorial: the Compilation Monad

2010-12-18 Thread Neil Mitchell
 Er, it works for me. Maybe *your* DNS has been hijacked? I know lots
 of Windows viruses play tricks like this...

No, the DNS for haskell.org was down yesterday - if you try again
today (after the DNS caches have cleared) it will work.

Thanks, Neil

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


Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Neil Mitchell
Hi

 In general I'd say that MSIE should be avoided and updated to newer
 version like 7 or 8 (according to wikipedia they should be avaible for
 Windows XP - or at least they were available when Windows XP was
 supported) - IE6 have technology from 2001. I understand however that it
 may be outside your control (maybe portable Fx would be solution?)

I strongly agree that MSIE 6 should be avoided, but for many company
networks it's required. The big problem isn't that 16% (or whatever)
of people use it, it's that while technical people will use a modern
and powerful browser, many non-technical managers will just use the
default settings/systems, and it gives a bad impression if when told
that Haskell is a great tool a manager looks up haskell.org and sees
a messy splat.

For reference, the new Haddock style also gives various rendering
issues in IE6. I reported these a while back (to Mark) but never got
any response.

Thanks, Neil

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


Re: [Haskell-cafe] Weird error during derive-2.3.0.2 build

2010-12-13 Thread Neil Mitchell
Hi Alex,

The latest version of derive is 2.4.1, which has a number of compile
fixes for newer compilers. Any package I maintain is tested on GHC
6.10.4, 6.12.3 and 7.0.1 - so this bug should not be present in 2.4.1.

Thanks, Neil

On Sun, Dec 12, 2010 at 10:07 PM, Alex alex.s...@gmail.com wrote:
 Hi all.

 I am trying to install the yi editor using cabal-install, which in turns
 installs the package 'derive-2.3.0.2'. I get the following error during
 derive's compilation:

 [53 of 58] Compiling Data.Derive.Internal.Traversal (
 Data/Derive/Internal/Traversal.hs,
 dist/build/Data/Derive/Internal/Traversal.o )

 Data/Derive/Internal/Traversal.hs:34:0:
 Illegal instance declaration for `Applicative (Writer w)'
 (All instance types must be of the form (T t1 ... tn)
  where T is not a synonym.
  Use -XTypeSynonymInstances if you want to disable this.)
 In the instance declaration for `Applicative (Writer w)'
 cabal: Error: some packages failed to install:
 derive-2.3.0.2 failed during the building phase. The exception was:
 ExitFailure 1

 Of course, I tried to build it with --ghc-option=-XTypeSynonymInstances,
 which in turn gives another compilation error.

 I am using ubuntu maverick 32-bit, with ghc-6.12.1 and cabal-install 0.8.2.
 The ghc was installed from the package repository. Cabal was installed
 using:

 cabal-install cabal

 Alex.

 ___
 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] Question about TagSoup

2010-12-06 Thread Neil Mitchell
Hi David,

I see no reason not to use TagSoup for this, assuming it does what you
want. It wasn't really designed for either modification or round
tripping, so be careful that things like entities don't become
corrupted. Also note that this won't replace all the contents of the
Content tag, only the first text node, so if someone writes
ContentiText/i/Content you won't hit it. But if it works, I'd
stick with it - it's light weight and easy to get to grips with.

Also your use of recursion seems perfectly reasonable. I often find
the easiest way to encode some kind of multiple element search (i.e.
for the Content tag and it's following text) is with direct
recursion - although I'm certain some kind of fold would also work.

Thanks, Neil

On Fri, Dec 3, 2010 at 1:45 PM, Alex Rozenshteyn rpglove...@gmail.com wrote:
 I really wouldn't use tag soup for this.  Haskell has libraries specifically
 for XML processing which might be better suited to your needs.

 On Fri, Dec 3, 2010 at 5:59 AM, David Virebayre dav.vire+hask...@gmail.com
 wrote:

 Hello café,

 I have seen tutorials about extracting information from a tag soup, but I
 have a different use case:
 I want to read a xml file, find a tag, change its content, and write the
 xml file back.

 This is an example of the files

 ?xml version=1.0 encoding=UTF-8 standalone=yes?
 idPkg:Story
 xmlns:idPkg=http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging;
 DOMVersion=7.0
        Story Self=ub9fad AppliedTOCStyle=n TrackChanges=false
 StoryTitle=$ID/ AppliedNamedGrid=n
                StoryPreference OpticalMarginAlignment=false
 OpticalMarginSize=12 FrameType=TextFrameType
 StoryOrientation=Horizontal StoryDirection=LeftToRightDirection/
                InCopyExportOption IncludeGraphicProxies=true
 IncludeAllResources=false/
                ParagraphStyleRange
 AppliedParagraphStyle=ParagraphStyle/prix
                        CharacterStyleRange
 AppliedCharacterStyle=CharacterStyle/$ID/[No character style]
                                Contentzzznba5/Content
                        /CharacterStyleRange
                /ParagraphStyleRange
        /Story
 /idPkg:Story

 Assuming I want to change the content of the Content tag, this is what I
 came up with (simplified), I'm using direct recursion. Is there a better way
 ?
 ts = do
  soup - parseTags `fmap` readFile idml/h00/Stories/Story_ub9fad.xml
  writeFile test $ renderTagsOptions renderOptions{optMinimize = const
 True}
                   $ modif soup

 modif [] = []
 modif (x@(TagOpen Content []):TagText _m : xs) = x : TagText modified
 : modif xs
 modif (x:xs) = x : modif xs

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




 --
           Alex R

 ___
 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] haskell.org downtime: Tuesday Nov 30th

2010-11-29 Thread Neil Mitchell
Hi Bas,

 Neil will be working on developing Hoogle all this weekend, but without
 Internet access. He expects to get it set up on the new server sometime
 during next week, but probably not before Weds.

 Ok thanks for the heads up! We get a new developer at work next week
 who needs to read through some of our Haskell code. It really helps to
 have Hoogle around for this type of thing. I'll tell him to install
 one locally. (Of course there's also Hayoo which is great also)

With the darcs version of Hoogle running a local hoogle server is now
trivial - just type hoogle server. With that you can build a version
of Hoogle that indexes both hackage, along with whatever codebase you
might use.

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


Re: [Haskell] haskell.org downtime: Tuesday Nov 30th

2010-11-29 Thread Neil Mitchell
Thanks to a large portion of help from Ian, I now have Hoogle working
at http://new-www.haskell.org/hoogle/

The old Hoogle seems to have broken with a configuration error - not
sure if that's related to the move, or just the old server being
flakey, but come tomorrow it won't matter.

Thanks, Neil

On Mon, Nov 29, 2010 at 10:01 PM, Bas van Dijk v.dijk@gmail.com wrote:
 On Mon, Nov 29, 2010 at 10:02 PM, Neil Mitchell ndmitch...@gmail.com wrote:
 Hi Bas,

 Neil will be working on developing Hoogle all this weekend, but without
 Internet access. He expects to get it set up on the new server sometime
 during next week, but probably not before Weds.

 Ok thanks for the heads up! We get a new developer at work next week
 who needs to read through some of our Haskell code. It really helps to
 have Hoogle around for this type of thing. I'll tell him to install
 one locally. (Of course there's also Hayoo which is great also)

 With the darcs version of Hoogle running a local hoogle server is now
 trivial - just type hoogle server. With that you can build a version
 of Hoogle that indexes both hackage, along with whatever codebase you
 might use.

 Thanks, Neil

 Nice, thanks!

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


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

2010-11-18 Thread Neil Mitchell
There is nothing to stop an library author doing exactly this, and it
might even be useful for some people (personally I'm going to stick to
haskell-src-exts, because it's a brilliant library). However, I don't
think we should make it official or part of the standard. I've found
plenty of HSE/GHC parsing differences in my work, and my suspicion is
that several of them are probably also present in haskell-src. I also
don't want the Haskell Prime Committee to take on the jobs of library
maintainership or implementation, those are best kept elsewhere.

Thanks, Neil

On Tue, Nov 16, 2010 at 9:13 AM, Yitzchak Gale g...@sefer.org wrote:
 I propose that the haskell-src package be renamed
 haskell20nn-src for each revision Haskell 20nn of
 the standard, and be made an official machine-readable
 component of the standard.

 This has the following advantages:

 1. It would require almost no extra work, because
 haskell-src already exists, and syntax changes, if
 any, will be very minimal for each revision.

 2. For the portion of the standard that it covers,
 any ambiguity that might creep into the human-readable
 standard document would be resolved.

 3. It would serve as a basic machine-verification tool
 which is easily extensible.

 4. As a side-effect, the haskell-src package would be
 continually maintained. The package is useful in its
 own right as a much lighter-weight version of haskell-src-exts.
 It is much easier to use when an application does
 not require full support of all of Haskell's syntax.

 This proposal is a natural extension of a proposal
 raised on the libraries mailing list in the context of
 the Haskell Platform: Ian Lynagh proposed that the
 current haskell-src-exts be renamed haskell-src
 (and included in the Haskell Platform, as suggested
 by Sterling Clover), and that the current haskell-src
 be renamed to haskell98-src (and removed from the
 Platform).

 The libraries subthread is here:

 http://www.haskell.org/pipermail/libraries/2010-November/015018.html

 Thanks,
 Yitz
 ___
 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-cafe] Space not reclaimed by GC

2010-11-18 Thread Neil Mitchell
Hi,

I have a program which runs, then calls performGC multiple times. I'd
expect all (or nearly all) of the memory to be freed by that point.
But it isn't.

Given this program:

import Language.Haskell.Exts.Annotated -- from haskell-src-exts
import System.Mem

main :: IO ()
main = do
let src = fromParseResult $ parseFileContents $ data C = C {a ::
F {-  ++ replicate 40 'd' ++  -} }
putStrLn $ Total length is:  ++ show (length $ show $ src)
performGC
performGC
performGC

I run with: ghc --make Temp.hs -rtsopts  Temp.exe +RTS -G1 -S (the
use of 1 generation is to make sure all GC's clear up everything, the
leak still happens without it). I am using GHC 7.0.1

I get the output:

AllocCopied LiveGCGC TOT TOT  Page Flts
bytes bytes bytes  user  elapuserelap
... lots of values ...
 16187336   9598808   9600428  0.05  0.060.470.6600  (Gen:  0)
 19513288  11571104  11572724  0.06  0.070.550.7700  (Gen:  0)
 23519176  13948292  13949912  0.09  0.080.670.8900  (Gen:  0)
Total length is: 4226
 24645752   548   2091128  0.00  0.000.750.9800  (Gen:  0)
   20   540   2091120  0.00  0.000.750.9900  (Gen:  0)
0   540   2091120  0.00  0.000.751.0000  (Gen:  0)
 1288   844  3028  0.00  0.000.751.0100  (Gen:  0)
0  0.00  0.00

 162,592,312 bytes allocated in the heap
  81,004,756 bytes copied during GC
  13,949,912 bytes maximum residency (30 sample(s))
 226,344 bytes maximum slop
  63 MB total memory in use (6 MB lost due to fragmentation)

  Generation 0:30 collections, 0 parallel,  0.48s,  0.51s elapsed

  INIT  time0.02s  (  0.02s elapsed)
  MUT   time0.25s  (  0.47s elapsed)
  GCtime0.48s  (  0.51s elapsed)
  EXIT  time0.00s  (  0.00s elapsed)
  Total time0.75s  (  1.01s elapsed)

  %GC time  64.6%  (50.6% elapsed)

  Alloc rate613,093,182 bytes per MUT second

  Productivity  33.3% of total user, 24.7% of total elapsed

QUESTION 1: My reading of this report is that performGC leaves 2091120
of live data. However, the program seems to run a GC on termination,
when only 3028 bytes of data are left. Why is all the data not
released on performGC?

QUESTION 2: It seems that the haskell-src-exts parser has some kind of
space leak in data C = C {a :: F {- d -} }, but not in data C =
C {a :: F} {- d -}. That's fair enough, but is it because it's a
space leak that performGC doesn't get the data? If I change to the
second form then the in use memory after performGC is about 3Kb.

I found that if I did the parseFileContents/print bit once I get 2Mb
of leak, if I do it twice I get 2Mb, and if I do it three times I get
1Mb of leak, which really confused me.

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


Re: [Haskell-cafe] RegEx versus (Parsec, TagSoup, others...)

2010-11-15 Thread Neil Mitchell
 I've been working on a project that requires me to do screen scraping.

If you are screen scraping HTML I think tagsoup is a very good choice.
The use of tagsoup means that you have a real HTML 5 compliant parser
underneath, and then you can use whatever technique you wish to split
up the page text - and regular expressions/parsec might be a
reasonable choice. I've written lots of screen scraping stuff with
tagsoup, and it's usually very easy - the manual even walks you
through a couple of examples:
http://community.haskell.org/~ndm/darcs/tagsoup/tagsoup.htm

 He's very experienced, and comes from
 a Perl perspective. I let him into what I was doing, and he opined I
 should be using pcre.

When all you have is a hammer, everything looks like a thumb.
Structured manipulation of algebraic data types is trivial in Haskell,
and much less natural in Perl, so they use different techniques in
different places.

 So now I'm second guessing my choices. Why do
 people choose not to use regex for uri parsing?

If you mean HTML parsing, then it's because it's a nightmare to get
right, and people on the web do all kinds of crazy stuff. A correct
regular expression to match an HTML tag is lots of work. Given that
it's a solved problem, why go to all that effort. It is possible to do
with regular expressions, but not pleasant.

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


Re: [Haskell-cafe] xml packages

2010-11-15 Thread Neil Mitchell
 First question. As I saw in sources, both hxt and haxml uses [Char]'s.
 this is very inefficient. I want to know, does any effective parser for
 haskell, written in haskell, exists.

The TagSoup parser can generate ByteString syntax trees - but they're
quite a bit slower than [Char] versions. I am planning to speed up the
ByteString version in the future:
http://code.google.com/p/ndmitchell/issues/detail?id=290

 Efficient means using ByteString to
 store strings and possibly building representations that shares one
 string for all similiary named elements. If there is no, is anyone
 interested in writing one?

I intend to do that in TagSoup, and it can even be done now by running
a Map state over the available strings with fmap.

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


Re: MonoLocalBinds and darcs

2010-11-02 Thread Neil Mitchell
Hi Ganesh,

Make sure you are using RC2 of the compiler, from what I remember RC1
required signatures it shouldn't have, or enabled MonoLocalBinds more
than it should - RC2 required less signatures. However, your code
could well just be heavily using the relevant features.

Thanks, Neil


On Tue, Nov 2, 2010 at 1:28 PM, Sittampalam, Ganesh
ganesh.sittampa...@credit-suisse.com wrote:
 Simon Marlow wrote:
 On 02/11/2010 07:37, Sittampalam, Ganesh wrote:
 I've just been updating darcs 2.5 for GHC 7.0. I had to add about 40
 signatures for MonoLocalBinds in about 140 files/30K LOC. Is that
 about normal? darcs does make fairly heavy use of rank 2 polymorphism
 which leads to quite a lot of local definitions needing to be
 polymorphic.

 Sounds about right given my experience so far, but as you say it
 depends a lot on the style of code involved.  Some people tend to
 write a lot more polymorphic local bindings than others :-)

 In the case of darcs much of the fundamental structure of the code
 pushes us that way; code that works on repositories is written as
 withRepository (some polymorphic function) so that it's generic on the
 specific repository type, and since where clauses generally scope
 outside the withRepository they get bitten. Similarly our witnesses
 lists of patches have map operations with rank-2 types.

 Also, NoMonoLocalBinds didn't help at all, which surprised me a bit -
 I thought it might at least make some of the signatures unnecessary.

 I suspect MonoLocalBinds is being turned on again by an option later
 in the ordering.  I had this problem a lot when trying to use
 NoMonoLocalBinds, it's actually quite hard to make it stick. e.g. if
 you have LANGUAGE GADTs in the source file, that will override
 NoMonoLocalBinds on the command line.

 Ahh. I'd put it as the first option!

  I'm not sure what (if anything) we should do about this.

 It intuitively feels like language specifiers should be
 order-independent, but when you have positive and negative extensions
 like we do that's not trivial to achieve. Perhaps we could do better if
 more combinations were errors instead of taking the last selection.
 Also, perhaps options that imply other options could be decomposed into
 the underlying pieces, with the high-level options being aliases for
 baskets of the lower-level ones. So GADTs = GADTsCore + MonoLocalBinds,
 and then GADTS + NoMonoLocalBinds (in any order) = GADTsCore +
 MonoLocalBinds + NoMonoLocalBinds = an error.

 Finally, is NoMonoLocalBinds supposed to imply NPlusKPatterns? The
 only changes I was able to revert when I enabled it were a couple of
 those!

 It certainly is not, if you have evidence to the contrary please
 submit a bug report.

 OK, I'll check.

 Cheers,

 Ganesh

 ===
 Please access the attached hyperlink for an important electronic 
 communications disclaimer:
 http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
 ===

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

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


Re: [Haskell-cafe] trying to use Tag Soup - fromAttrib

2010-11-02 Thread Neil Mitchell
Hi Michael,

If you just replace all 'str' with 'String' when reading the signature
then that will almost certainly be sufficient for your purposes. So
read it as:

fromAttrib :: String - Tag String - String

Where Tag String can be thought of as just Tag. If you try to
parse HTML with regular expressions you'll probably find it much
harder than using tagsoup.

As one of the previous commenter's guessed, Show is indeed required
only for nice error messages. I think it's also probably redundant,
since StringLike has a toString style method on it anyway.

Thanks, Neil

On Tue, Nov 2, 2010 at 10:04 PM, Michael Litchard mich...@schmong.org wrote:
 Ah thank you. I can go ahead and figure out how to parse that string.
 Using a regex is tempting but I have a feeling I can get something
 more maintainable if I use another approach.

 On Tue, Nov 2, 2010 at 2:52 PM, Daniel Schoepe
 daniel.scho...@googlemail.com wrote:
 Excerpts from Michael Litchard's message of Tue Nov 02 22:40:27 +0100 2010:
 Daniel,
            Thank you for your reply. I'm still confused.
 When I see a code sample like this
 main = do
   posts - liftM parseTags (readFile posts.xml)
   print $ head $ map (fromAttrib Id) $
                  filter (~== (row OwnerUserId= ++ userid ++ ))
                  posts

 I have no idea how to match that up with what you said. The usage of
 fromAttrib here doesn't match up with what I htink the type signature
 is saying.

 fromAttrib :: (Show str, Eq str, StringLike str) = str - Tag str - str

 seems to say fromAttrib takes two parameters (I know it doesn't
 literally take two), one str (with the constraints in parenthesis to
 the left) and one str of type Tag, giving back a str. Then I look at
 the above code sample and can't match the two up.

 In the code sample, the first argument is Id, in which case the
 concrete type for the type variable str is String, and the second
 argument are the tags returned by the call to filter, which have type
 Tag String.

 The second parameter is not a str of type Tag, but Tag (which is a
 type constructor) applied to
 the same concrete type for str its first argument has.

 So in your case, calling
 fromAttrib href (TagOpen ...)

 Would give you
 /launchWebForward.do?resourceId=4policy=0returnTo=%2FshowWebForwards.do. 
 To
 get the resourceId you want, you'd have to dissect this string further.

 ___
 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

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


Re: [Haskell-cafe] Idea for a tool

2010-10-20 Thread Neil Mitchell
Hi Michael,

I want this tool. I fake it slightly by using my RSS reader and
http://page2rss.com/ to get notified when any packages I depend on
change, which basically works - but if you could provide a better
service (ideally integrated in to hackage), I'd use it.

Thanks, Neil

On Wed, Oct 20, 2010 at 8:27 AM, Bas van Dijk v.dijk@gmail.com wrote:
 On Wed, Oct 20, 2010 at 7:36 AM, Michael Snoyman mich...@snoyman.com wrote:
 Hi all,

 I saw a quote from Eric Kow via Neil Mitchell[1] that we don't spend
 enough time writing tools. Well, I've decided that the most annoying
 part of package maintainership right now is staying on top of new
 versions of dependencies. We essentially have two options right now:

 * Follow the PVP and put an upper bound on all dependencies, and
 people will be upset when your package only works with the old version
 of the dependency.
 * Skip the upper bound, and risk having your code break when there's a
 new version.

 I have an idea for a tool: you give it a list of packages you
 maintain, or even better yet, you give it your email address and it
 gets that list automatically. Then is looks through all your
 dependencies and sees if you have any upper bounds preventing newer
 versions from being used. Bonus points for making it a web service
 that just gives you an RSS feed.

 If anyone's interested in writing a tool like that, let me know.
 Otherwise, next time I'm twiddling my thumbs I'll try to throw it
 together. I've never dealt directly with the Cabal library, but
 there's a first time for everything. If someone else wants to write
 that tool and wants help sticking a web service on it, let me know.

 Michael

 [1] http://neilmitchell.blogspot.com/2010/10/enhanced-cabal-sdist.html
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


 This would be a nice feature for the new hackage server:
 http://sparky.haskell.org:8080

 Bas
 ___
 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: un-used record wildcards

2010-10-16 Thread Neil Mitchell
Hi Simon,

I've seen this issue with GHC 6.12.3 (and assumed it was by design).
It occurs with a slight modification of your example:

{-# LANGUAGE RecordWildCards #-}

module Test where

data T = MkT { f,g :: Int }

p x = let MkT{..} = x in f

This example warns about Defined but not used: `g' on the line
defining p. I've raised a GHC bug:
http://hackage.haskell.org/trac/ghc/ticket/4411 about this warning.

Thanks, Neil

 Which version of GHC are you using?  GHC 6.12 does not complain about unused 
 variables bound by ...  Try this, which complains about y, but not g.

 Simon

 {-# LANGUAGE RecordWildCards #-}
 module Test where

 data T = MkT { f,g :: Int }

 p (MkT { .. }) y = f


 |  -Original Message-
 |  From: glasgow-haskell-users-boun...@haskell.org 
 [mailto:glasgow-haskell-users-
 |  boun...@haskell.org] On Behalf Of Serge D. Mechveliani
 |  Sent: 14 October 2010 11:01
 |  To: Antoine Latter
 |  Cc: glasgow-haskell-users@haskell.org
 |  Subject: Re: un-used record wildcards
 |
 |  On Wed, Oct 13, 2010 at 01:47:11PM -0500, Antoine Latter wrote:
 |   On Wed, Oct 13, 2010 at 1:02 PM, Serge D. Mechveliani mech...@botik.ru
 |  wrote:
 |    Dear GHC developers,
 |   
 |    I use the language extension of RecordWildcards, for example,
 |                                   f (Foo {foo1 = n, foo2 = m, ..}) = ...
 |   
 |    But the complier warns about un-used values of  foo3, foo4,
 |    probably, due to the extension of
 |                        Foo {foo1 = n, foo2 = m, foo3 = foo3, foo4 = foo4}.
 |   
 |    In such cases, these warnings look as unneeded.
 |    Is it possible to have an un-used binding warnings with exception for
 |    wildcards in records?
 |    If not, then has it sense to introduce an option?
 |   
 |  
 |   If you're not using foo3 and foo4, can you not put it the ellipsis?
 |   that won't cover every case (such as where you're using foo3 but not
 |   foo4).
 |  
 |   Antoine
 |  
 |
 |  Indeed, thank you.
 |  It occurs that under RecordWildcards the compiler allows to skip some
 |  record fields in a pattern.
 |  ___
 |  Glasgow-haskell-users mailing list
 |  glasgow-haskell-us...@haskell.org
 |  http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

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

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


Re: [Haskell-cafe] a couple of cabal related questions

2010-10-13 Thread Neil Mitchell
I do this using a .ghci file. For Hoogle I have a file called Paths.hs
with the module name Paths_hoogle and stub exports. I then have my
.ghci file as:

:load Main.hs Paths.hs

Now Paths.hs will never interfere, or be picked up in ghc --make,
because it has the wrong name - but is used in ghci.

Thanks, Neil

On Wed, Oct 13, 2010 at 6:45 AM, Antoine Latter aslat...@gmail.com wrote:
 On Tue, Oct 12, 2010 at 10:41 PM, Ivan Lazar Miljenovic
 ivan.miljeno...@gmail.com wrote:
 On 13 October 2010 02:00, Magnus Therning mag...@therning.org wrote:
 On Tue, Oct 12, 2010 at 15:34, Dmitry V'yal akam...@gmail.com wrote:
 By the way, the 'version' variable doesn't mentioned in Cabal user
 guide, or
 at least I missed it. Is it documented somewhere?

 I don't know, I think I found it in the source more or less by mistake
 :-)

 Yeah, I think that's the common consensus; there is _some_
 documentation of the Paths_foo module in the Cabal user guide, but it
 doesn't cover much.

 One thing I do wish was possible: the ability to use a stub
 Paths_foo module for testing purposes (as currently you have to have
 done a cabal configure  cabal build to get it), but I couldn't
 find a way to do so without Cabal packaging the stub version when
 creating the distribution tarball :s


 I've used CPP, something like:

 module MyPaths
  ( export contents of Paths_magic ) where

 #ifdef SOME_DEF_SET_BY_CABAL
 import Paths_magic
 #else

 mock implementation of paths magic here

 #endif

 Then in your .cabal file declare the define which causes it to use the
 real magic paths module. When not compiling via cabal, you'll at least
 have something sensible (like the current directory or something).

 I'm pretty sure I didn't make this up, but I have used it. It's a bit
 of a pain to set up, though.

 Antoine
 ___
 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] Re: A question regarding cmdargs package

2010-10-12 Thread Neil Mitchell
 This makes me curious.  What's the use case where you want to allow the user
 to pass arguments on the command line, but you don't want that user to
 be able
 to use '--help' to find out what arguments may be passed?

 When you don't want to bother defining the help options/descriptions? :p

 (alternatively, you may wish to provide a more full-featured version
 like what darcs does by using a pager)

You can already do this with CmdArgs. If you use cmdArgsMode/process
it returns a structure populated to say what to do next (i.e. display
a help message), but you are welcome to do something different, or do
what it says in a different way. However, I can see some people might
want to remove help entirely, so I'll try and find a balance.

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


Re: [Haskell-cafe] Re: Re: A question regarding cmdargs package

2010-10-12 Thread Neil Mitchell
 The point here was not so much removing --help, but rather that I want to
 have control over the 'standard' options (help,version,verbosity) in the
 same way as for the rest. My program might not have a version, so why
 offer --version? Or maybe I want a different name for it because the -V is
 already used for something else, which I cannot change for backwards
 compatibility. I might want another name for --help, for instance -h. The
 standard -? does not work in all shells/configurations and --help might
 look strange if all other options are of the one-dash-one-character sort. I
 would also like to configure the help text for the standard options, for
 instance for i18n or because I like starting with a lower case letter or...

That i18n is a fantastic argument - and one that really means cmdargs
has no choice but to support all the attributes on help/version.

 BTW another cool feature of an auto-magic option parsing lib is the GNU
 standard -- (arguments after this are not to be treated as options).

cmdargs also supports this by default.

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


Re: [Haskell-cafe] Re: A question regarding cmdargs package

2010-10-11 Thread Neil Mitchell
Hi Ben,

 How can I disable the standard arguments 'help' and 'version'?

In general I suggest you email the author of the cmdargs package
directly, as well as cc'ing the mailing list (otherwise the author
might miss this message, as I did!)

In CmdArgs there is currently no way to suppress either --help or
--version, but I am currently reviewing a patch (from you!) and expect
that the next version will have both these features. The hard part is
making sure the defaults match what people expect and that the options
to modify the behaviour are discoverable and natural, but I'm sure
I'll find something.

Thanks, Neil



 If you're not fully committed to the cmdargs package, you might try my
 package 'console-program' instead
 http://hackage.haskell.org/package/console-program. It does not have
 built-in --help or --version functionality. (There is a function
 'showUsage' that takes the description of the command/option structure
 of your program, and prints --help style usage information, but you
 use this at your own discretion.)

 Thanks, looks good. I will certainly try it out.

 Cheers
 Ben

 ___
 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] HTML library with DOM?

2010-10-07 Thread Neil Mitchell
Yes, I don't think I've officially announced a version of TagSoup that
has had HTML 5 parsing, but it now does as standard for the last few
releases. The HTML 5 spec is still changing, so it's entirely possible
something is incorrect in a corner case, but please let me know and
I'll fix it.

Thanks, Neil

2010/10/7 Gregory Collins g...@gregorycollins.net:
 Michael Snoyman mich...@snoyman.com writes:

 As far as I know, Neil Mitchel's tagsoup[1] parses according to the
 HTML 5 parsing rules, but it just generates a list of Tags[2], so
 you'd have to build the DOM tree up from there. I personally have had
 great experience with tagsoup. It's even the core of HTML-scraping
 technology powering searchonce[3].

 Yep, someone else wrote me privately to say this (that tagsoup respects
 the html5 lexing rules). So I'll be using this as the basis of an html5
 DOM parser. Stay tuned!

 G
 --
 Gregory Collins g...@gregorycollins.net
 ___
 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] Notes from Haskell takes over the world BoF at ICFP

2010-10-07 Thread Neil Mitchell
Hi

 Digressing a little, can anyone interested in doing so merge hoogle
 and Hayoo and make them part of Hackage?

I am currently working on this in my spare time. I hope to have
something to show in the next month.

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


Re: [Haskell-cafe] Re: EDSL for Makefile

2010-10-04 Thread Neil Mitchell
Hi

 Telling from the video and the slide, Neil's make system is actually
 really cool. Indeed something I would really enjoy to use.

Thanks :-)

 So you use want and need to tell the system about the static and
 dynamic dependencies.
 The want at the beginning just tells which targets to start.
 Since you may want to choose your task via command line, you actually
 would want to do something like:

 main = do
    wantDefault file1 = getArgs
    file1 * ...

Yep, that's certainly one way of doing it (and a very natural way of doing it).

 Since using String everywhere for dependencies can lead to errors, it
 is always a good idea to replace the strings by constants you can
 reuse.

You can also use wildcards everywhere (i.e. have a rule for *.exe),
and then you only give each file once - but anyone duplicating any
complex thing like a string more than once should either use a let or
write a combinator on top of it - either works just fine.

 Shake is more kind of a library. If you want a more make-like System
 you can even write a preprocessor (like the haskell sinatra clone
 bird), which even looks for your target symbols and then generates a
 haskell file with target symbols replaced by Strings.

It doesn't even need to generate a Haskell file, you can sequence
these operations dynamically in a Monad and use Shake as a backend
target for anything. Haskell is great :-)

 I hope the space leaks will be fixed in the future, so one can even
 write long running processes which automatically detect changes and
 rerun without user interaction and much more.

Yes, although in practice you could probably already do it without
issue. I think the space leak is incredibly shallow, and could be
fixed in a few hours.

 I actually wonder about the semantic differences between want and
 need. Is need used to tell about dynamic dependencies and want for
 static dependencies?

You could always do:

PHONY * \_ - do
   need xs

Instead of want xs, and have the system know about PHONY specially.
want is a way of kicking off the initial set, and need is doing it
after that - the real difference is the monad they run in and nothing
else. The semantic idea is that want expresses that you the end user
wants to have these files available, while the rules need to have
files available before they continue - it's entirely  possible they
should be overloaded over the two monads.

Thanks, Neil


 On 4 Okt., 05:41, C K Kashyap ckkash...@gmail.com wrote:
  mention_only_once file action = do
    want [file]
    file * action

  main = mention_only_once file1 $ \x - do need [file2]
                                             putStrLn Hello
                                             putStrLn World

 Thanks Bulat 
 I guess even this should work -

 main = do
   let file1=file1
   want [file1]
   file1 * \x - do
     need [file2]
     putStrLn Hello
     putStrLn World

 --
 Regards,
 Kashyap
 ___
 Haskell-Cafe mailing list
 haskell-c...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe
 ___
 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] EDSL for Makefile

2010-10-03 Thread Neil Mitchell
 I checked out the video - nice - but I think, understandably, since
 its not open source yet, not much of implementations details were
 mentioned.

Yes, it's unfortunate.

 So, I have this unanswered question nagging in my head. In the
 example below, how can I let the makefile writer refer to the target
 name and dependencies. Likr Emil mentioned, I could use target r1
 but I want to avoid having to mention r1.

If it helps, written in Shake, this would be:

main = do
  want [file1]
  file1 * \x - do
need [file2]
putStrLn Hello
putStrLn World

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


Re: [Haskell-cafe] EDSL for Makefile

2010-09-30 Thread Neil Mitchell
Hi,

What great timing! I will be giving a talk at the Haskell Implementors
Workshop tomorrow about the Make system Shake. It will be video taped
and I can send you the slides after I've given the talk. So wait a
day, and I'll give you all the answers.

Thanks, Neil

On Thu, Sep 30, 2010 at 6:02 AM, Neil Brown nc...@kent.ac.uk wrote:
 On 30/09/10 09:41, C K Kashyap wrote:

 Hi All,
 I was thinking about doing an EDSL for Makefile (as an exercise)
 I put down my line of thought here -
 http://hpaste.org/40233/haskell_makefile_edsl

 I'd appreciate some feedback on the approach. Also, I wanted some idea
 on how(in the current approach) I could make the target name and the
 dependency available to the action writer - as shown below.

 r1 = Rule {
        target = file1,
        dependsOn = [file2],
        action = do
                        execute (gcc -c  ++ dependencyList ++  -o  ++
 target)
 }



 Neil Mitchell gave a talk at AngloHaskell 2009 on doing a better make in
 Haskell.  I've found the abstract on the wiki:
 http://www.haskell.org/haskellwiki/AngloHaskell/2009 but, alas, no slides to
 be found.  My memory was that he had implemented the system successfully for
 internal use at a company and it had worked out quite well.  Perhaps you can
 contact him about the slides.

 Thanks,

 Neil.
 ___
 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] EDSL for Makefile

2010-09-30 Thread Neil Mitchell
 What great timing! I will be giving a talk at the Haskell Implementors
 Workshop tomorrow about the Make system Shake. It will be video taped
 and I can send you the slides after I've given the talk. So wait a
 day, and I'll give you all the answers.

 Will you publish the tool too? ;-)

No :-( [or at least not yet]

Wait for the talk, and I'll explain more.

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


Re: BlockedIndefinitelyOnMVar exception

2010-07-05 Thread Neil Mitchell
 I wrote my Chan around the abstraction:

 data Chan a = Chan (MVar (Either [a] [MVar a]))

 The Chan either has elements in it (Left), or has readers waiting for
 elements (Right). To get the fairness properties on Chan you might
 want to make these two lists Queue's, but I think the basic principle
 still works. By using this abstraction my Chan was a lot simpler. With
 this scheme implementing isEmpyChan or unGetChan would both work
 nicely. My Chan was not designed for performance. (In truth I replaced
 the Left with IntMap a, and inserted elements with a randomly chosen
 key, but the basic idea is the same.)

 I like the idea.  But what happens if one of the blocked threads gets killed
 by a killThread (e.g. a timeout) while it is waiting?  Won't we still give
 it an element of the Chan sometime in the future?  Perhaps this doesn't
 happen in your scenario, but it seems to throw a spanner in the works for
 using this as a general-purpose implementation.

I hadn't thought of that at all - my scenario doesn't have any threads
being killed. With the thought of threads dying concurrency
abstractions become significantly harder - I hadn't quite realised how
hard that must make it.

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


Re: BlockedIndefinitelyOnMVar exception

2010-07-04 Thread Neil Mitchell
Hi Simon,

 My suspicion for the root cause of the problem is that Concurrent.Chan
 is incorrect. In the course of debugging this problem we found 2 bugs
 in Chan, and while I never tracked down any other bugs in Chan, I no
 longer trust it. By rewriting parts of the program, including avoiding
 Chan, the bugs disappeared.I don't think I'll be using Chan again
 until after someone has proven in correct.

 Considering Chan is 150 lines of code and has been around for many years,
 that's amazing!  Did you report the bugs?  Is it anything to do with
 asynchronous exceptions?

Nothing to do with async exceptions. I found:

http://hackage.haskell.org/trac/ghc/ticket/4154
http://hackage.haskell.org/trac/ghc/ticket/3527

Of course, there's also the async exceptions bug still around:

http://hackage.haskell.org/trac/ghc/ticket/3160

However, even after having a program with no async exceptions (I never
used them), and eliminating unGetChan and isEmpyChan, I still got
bugs. I have no proof they came from the Chan module, and no minimal
test case was ever able to recreate them, but the same program with my
own Chan implementation worked. My Chan had different properties (it
queues items randomly) and a subset of the Chan functions, so it still
doesn't prove any issue with Chan - but I am now sceptical.

 You should have more luck with Control.Concurrent.STM.TChan, incedentally.
  It's much easier to get right, and when we benchmarked it, performance was
 about the same (all those withMVar/modifyMVars in Chan are quite expensive),
 plus you get to compose it easily: reading from either of 2 TChans is
 trivial.

The performance of the Haskell is irrelevant - the program spends all
its time invoking system calls. Looking at the implementation I am
indeed much more trusting of TChan, I'll be using that in future if
there is ever a need.

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


Re: BlockedIndefinitelyOnMVar exception

2010-07-04 Thread Neil Mitchell
 http://hackage.haskell.org/trac/ghc/ticket/4154

 Yup, that's a bug.  Not clear if it's fixable.

 http://hackage.haskell.org/trac/ghc/ticket/3527

 That too.  A very similar bug in fact, if there is a fix it will probably
 fix both of them.  The problem is that readChan holds a lock on the read end
 of the Chan, so neither isEmptyChan nor unGetChan can work when a reader is
 blocked.

I wrote my Chan around the abstraction:

data Chan a = Chan (MVar (Either [a] [MVar a]))

The Chan either has elements in it (Left), or has readers waiting for
elements (Right). To get the fairness properties on Chan you might
want to make these two lists Queue's, but I think the basic principle
still works. By using this abstraction my Chan was a lot simpler. With
this scheme implementing isEmpyChan or unGetChan would both work
nicely. My Chan was not designed for performance. (In truth I replaced
the Left with IntMap a, and inserted elements with a randomly chosen
key, but the basic idea is the same.)

 own Chan implementation worked. My Chan had different properties (it
 queues items randomly) and a subset of the Chan functions, so it still
 doesn't prove any issue with Chan - but I am now sceptical.

 It's surprising how difficult it is to get these MVar-based abstractions
 right.  Some thorough testing of Chan is probably in order.

Agreed! In this project I wrote 8 different concurrency abstractions.
I had bugs in most. MVar is a great building block on which to put
higher layered abstractions, but using it correctly is tricky. I found
that I used MVar's in four ways:

1) MVar's which are always full, and are just locks around data for
consistency. Created with newMVar, used with modifyMVar.

2) MVar's which contain unit and are used for locking something other
than data (i.e. a file on disk). Created with newMVar, used with
withMVar.

3) MVar's which are used to signal computation can begin, created with
newMVarEmpty, given to someone who calls putMVar (), and waited on by
the person who created them.

4) MVar's which go in a higher-level concurrency operation - CountVars
(variables which wait until they have been signaled N times), RandChan
(Chan but with randomness), Pool (thread pool) etc.

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


Re: BlockedIndefinitelyOnMVar exception

2010-07-01 Thread Neil Mitchell
Hi Simon,

Thanks for the excellent information. I've now debugged my problem,
and think I've got the last of the MVar blocking problems out.

 * How confident are people that this exception does really mean that
 it is in a blocked state? Is there any chance the error could be
 raised incorrectly?

 There have been one or two bugs in the past that could lead to this
 exception being raised incorrectly, but I'm not aware of any right now.
  It's not inconceivable of course.

I have no reason to think it's broken. I found at least 3 separate
concurrency bugs in various parts (one added the day before, one over
a year old, one of which had been introduced while trying to work
around the MVar problem).

My suspicion for the root cause of the problem is that Concurrent.Chan
is incorrect. In the course of debugging this problem we found 2 bugs
in Chan, and while I never tracked down any other bugs in Chan, I no
longer trust it. By rewriting parts of the program, including avoiding
Chan, the bugs disappeared.I don't think I'll be using Chan again
until after someone has proven in correct.

 * Any debugging tips for this problem?

 I'd use the event log: compile with -debug, run with +RTS -Ds -l, and dump
 the event log with show-ghc-events (cabal install ghc-events).  Or just dump
 it to stderr with +RTS -Ds, if the log isn't too large.  Use
 GHC.Exts.traceEvent to add your own events to the trace.

The event log is fantastic!

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


Re: BlockedIndefinitelyOnMVar exception

2010-06-26 Thread Neil Mitchell
 My understanding was that this error occurred when one thread was blocked,
 waiting on an MVar, and no other thread in the program has a reference to
 that MVar (this can be detected during GC).  Ergo, the blocked thread will
 end up waiting forever because no-one can ever wake it up again.

That certainly seems a sensible rule - I'll see if that can help me
debug my problem.

 Do you actually have use of MVars in your program directly, or are they
 being used via a library?  And do you at least know which thread is
 throwing this exception?  It should be catchable so you can probably wrap
 the arguments to your forkIO calls with a catcher than indicates which
 thread blew up.

I use MVar's directly, use Chan/QSem, and have about 5 concurrency
data types built on top of MVar's - they're everywhere.

I also have a thread pool structure, so tasks move between threads
regularly - knowing which thread got blocked isn't very interesting.

Thanks for the information,

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


Re: [Haskell-cafe] TagSoup 0.9

2010-05-25 Thread Neil Mitchell
Hi,

From what I can tell of your example you've managed to get the raw
HTTP response in Unicode, which isn't suitable for sending to tagsoup.
I've not used the Network.HTTP library for downloading much, but when
I did I thought it stripped the headers automatically.

Can you just print the first few lines of the output you get from the
HTTP library, without passing them through tagsoup. That should show
the problem independent of tagsoup.

Thanks, Neil


On Mon, May 24, 2010 at 3:24 AM, Ralph Hodgson rhodg...@topquadrant.com wrote:
 Thanks Neil,



 Using Network.HTTP worked.



 However something else I have just run into concerns some web pages that
 start with:



 ?xml version=1.0 encoding=iso-8859-1?

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;



 I get the following bad result:



 TagText HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nLast-Modified: Tue,
 27 Oct 2009 19:30:40 GMT\r\nETag: \6f248cf73b57ca1:25e2\\r\nDate: Sun, 23
 May 2010 22:46:41 GMT\r\nTransfer-Encoding:  chunked\r\nConnection:
 close\r\nConnection:
 Transfer-Encoding\r\n\r\n4000\r\n\255\254\NUL?\NULx\NULm\NULl\NUL
 \NULv\NULe\NULr\NULs\NULi\NULo\NULn\NUL=\NUL\\NUL1\NUL.\NUL0\NUL\\NUL
 \NULe\NULn\NULc\NULo\NULd\NULi\NULn\NULg\NUL=\NUL\\NULi\NULs\NULo\NUL-\NUL8\NUL8\NUL5\NUL9\NUL-\NUL1\NUL\\NUL



 etc etc



 Is this an easy thing to fix? I've started to look over the code.



 -Original Message-
 From: Neil Mitchell [mailto:ndmitch...@gmail.com]
 Sent: Wednesday, May 19, 2010 12:19 PM
 To: Ralph Hodgson
 Cc: Daniel Fischer; haskell-cafe@haskell.org; Don Stewart
 Subject: Re: [Haskell-cafe] TagSoup 0.9



 Hi Ralph,



 I was using TagSoup 0.8 with great success. On upgrading to 0.9 I have
 this error:



 TQ\TagSoup\TagSoupExtensions.lhs:29:17:

    `Tag' is not applied to enough type arguments

    Expected kind `*', but `Tag' has kind `* - *'

    In the type synonym declaration for `Bundle'

 Failed, modules loaded: TQ.Common.TextAndListHandling.



 My change notes have this being a change between 0.6 and 0.8. As

 Malcolm says, any old uses of Tag should become Tag String. The

 reason is that Tag is now parameterised, and you can use Tag

 ByteString etc. However, I should point out that Tag ByteString won't

 be any faster than Tag String in this version (it's in the future work

 pile).



  Forgot to add: I now need to understand the following warnings on this

  line  import Text.HTML.Download:



 Everyone's comments have been right. I previously included

 Text.HTML.Download so that it was easy to test tagsoup against the

 web. Since I first wrote that snippet the HTTP downloading libraries

 have improved substantially, so people should use those in favour of

 the version in tagsoup - you'll be able to connect to more websites in

 more reliable ways, go through proxies etc. I don't intend to remove

 the Download module any time soon, but I will do eventually.



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


Re: [Haskell-cafe] No copy XML parser (rough idea only)

2010-05-20 Thread Neil Mitchell
Hi Joachim,

I have been playing around with this idea myself in TagSoup
(http://community.haskell.org/~ndm/tagsoup). The largest conceptual
problem I came across was that TagSoup decodes entities (i.e. gt;
becomes ). However, I think that's a minor issue, and entity
resolution can be turned off in TagSoup to guarantee copy-free
parsing.

The practical problem is that writing an HTML parser is hard, and that
writing it in a way that works on both String/ByteString/LBS and gets
the copy-free behaviour in the right places is tricky. I am still
working on program optimisation techniques that I think will make this
feasible (based around the idea of supercompilation, to expose the
underlying structure of the parser, without writing it in too painful
a manner). So with any luck your copy-free XML parser will happen
sooner or later.

Thanks, Neil

On Fri, May 14, 2010 at 8:20 PM, Joachim Breitner
m...@joachim-breitner.de wrote:
 Hi,

 Am Freitag, den 14.05.2010, 15:31 -0300 schrieb Felipe Lessa:
 On Fri, May 14, 2010 at 08:57:42AM -0700, John Millikin wrote:
  Additionally, since the original bytestring is shared in your types,
  potentially very large buffers could be locked in memory due to
  references held by only a small portion of the document. Chopping a
  document up into events or nodes creates some overhead due to the
  extra pointers, but allows unneeded portions to be freed.

 However, if your bytestring comes from mmap'ed memory this
 drawback wouldn't apply :D.

 exactly. Of course such a library would not be a general-purpose tool,
 but in cases where you know that you need most of the document for most
 of the time, e.g. when doing statistics on it, this would be acceptable.

 Also note that even after chopping into nodes, if you don’t make sure
 you drop the reference to root in a timely manner, the same thing would
 happen.

 Am Freitag, den 14.05.2010, 08:57 -0700 schrieb John Millikin:
 The primary problem I see with this is that XML content is
 fundamentally text, not bytes. Using your types, two XML documents
 with identical content but different encodings will have different
 Haskell values (and thus be incorrect regarding Eq, Ord, etc).

 The instances could be adapted... but this will be expensive, of course.

 One could also convert documents that are not utf-8 encoded as a whole
 and then work on that.

 If you'd like memory-efficient text storage, using Bryan O'Sullivan's
 text package[1] is probably the best option. It uses packed Word16
 buffers to store text as UTF-16. Probably not as efficient as a type
 backed by UTF-8, but it's much much better than String.

 Right. For arbtt, I tried to switch from String to text, and it actually
 got slower. The reason (I think) was that besides passing strings
 around, it mainly runs pcre-light on them – which wants utf8-encoded
 bytestrings.

 I ended up creating a newtype¹ around utf8-encoded ByteStrings and the
 result was quite satisfying, both memory- and runtime-wise. I wish we
 had a package providing a standard type for this type that would become
 similarly popular. There is at least one more packages on hackage that
 defines this type:
 http://hackage.haskell.org/packages/archive/regex-tdfa-utf8/1.0/doc/html/Text-Regex-TDFA-UTF8.html


 Greetings,
 Joachim

 ¹ http://darcs.nomeata.de/arbtt/src/Data/MyText.hs

 --
 Joachim Breitner
  e-Mail: m...@joachim-breitner.de
  Homepage: http://www.joachim-breitner.de
  ICQ#: 74513189
  Jabber-ID: nome...@joachim-breitner.de

 ___
 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] TagSoup 0.9

2010-05-19 Thread Neil Mitchell
Hi Ralph,

 I was using TagSoup 0.8 with great success. On upgrading to 0.9 I have this 
 error:

 TQ\TagSoup\TagSoupExtensions.lhs:29:17:
`Tag' is not applied to enough type arguments
Expected kind `*', but `Tag' has kind `* - *'
In the type synonym declaration for `Bundle'
 Failed, modules loaded: TQ.Common.TextAndListHandling.

My change notes have this being a change between 0.6 and 0.8. As
Malcolm says, any old uses of Tag should become Tag String. The
reason is that Tag is now parameterised, and you can use Tag
ByteString etc. However, I should point out that Tag ByteString won't
be any faster than Tag String in this version (it's in the future work
pile).

  Forgot to add: I now need to understand the following warnings on this
  line  import Text.HTML.Download:

Everyone's comments have been right. I previously included
Text.HTML.Download so that it was easy to test tagsoup against the
web. Since I first wrote that snippet the HTTP downloading libraries
have improved substantially, so people should use those in favour of
the version in tagsoup - you'll be able to connect to more websites in
more reliable ways, go through proxies etc. I don't intend to remove
the Download module any time soon, but I will do eventually.

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


Re: [Haskell-cafe] {-# LANGUAGE DeriveApplicative #-} ?

2010-05-07 Thread Neil Mitchell
Hi,

If you think you can write an algorithm for deriving Applicative, I'd
welcome you to try adding it to Derive:
http://community.haskell.org/~ndm/derive

The Functor/Foldable/Traversable derivations all started out in
Derive, got tested/implemented/refined there, then moved to GHC later.
I think that's a reasonable path with any Applicative derivation.

Thanks, Neil

On Thu, May 6, 2010 at 11:53 AM, Ben Millwood hask...@benmachine.co.uk wrote:
 On Thu, May 6, 2010 at 8:55 AM, Pavel Perikov peri...@gmail.com wrote:
 Hi, list!.

 Now in 6.12.1 we have DeriveFunctor, DeriveFoldable and DeriveTraversable. 
 This greatly simplifies the reuse structure style of programming. Some 
 structure (not just _data_ structure) got captured in ADT and can be reused 
 for various purposes.

 Wouldn't it be nice to have the ability to derive Applicative as well? It 
 shouldn't be more difficult than deriving Functor but will provide exciting 
 possibilities. Just think about liftA2.


 The difference is that there is at most one law-abiding instance of
 Functor for each type, whereas there are in principle multiple
 possible instances for Applicative for a type. E.g. the following:

 instance Applicative [] where
  pure x = [x]
  fs * xs = concatMap (\f - map f xs) fs

 instance Applicative [] where
  pure = repeat
  (f:fs) * (x:xs) = f x : fs * xs
  _ * _ = []

 are both law-abiding instances (although only one has a corresponding
 law-abiding Monad, I believe). Which should GHC choose?
 It's worth noting, though, that there are other derivable classes that
 don't have a single implementation. It's a question of trading off
 complexity of the compiler versus saved effort in code versus
 additional clarity in code, I think.
 ___
 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] Would it be evil to add deriving Typeable to newtype Q?

2010-05-07 Thread Neil Mitchell
Hi Leonel,

You might want to try Derive
(http://community.haskell.org/~ndm/derive) if DrIFT doesn't work for
you. They do roughly the same jobs, but Derive has more output formats
(it can be spliced in as Template Haskell, generate #include files,
output text etc) more derivations (but not quite overlapping -
although both have Typeable), and is fully cabal-friendly on all
platforms.

Thanks, Neil

On Thu, May 6, 2010 at 3:42 PM, Leonel Fonseca leone...@gmail.com wrote:
 Hey, the hint provided by Ben worked like a charm.

 I've also tried Ivan suggestions both on my windows and linux installations.
 DrIFT-cabalized couldn't install at all at windows since I don't use MinGW.
 So, I ghc'ed --make  DrIFT.

 Both, windows and linux, refused to complete work with this error:
 drift: can't find module Control/Monad

 Thank you.

 {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}

 import Data.Typeable
 import Language.Haskell.TH

 deriving instance Typeable1 Q



 --

 Leonel Fonseca.
 ___
 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] Haskell XML Parsers

2010-05-05 Thread Neil Mitchell
Hi,

You might want to take a look at TagSoup
(http://community.haskell.org/~ndm/tagsoup) - it parses XML/HTML
lazily returning a stream of tags. It doesn't do nesting, but it does
have good memory usage.

Thanks, Neil

On Fri, Apr 30, 2010 at 11:35 AM, R Senington sc06...@leeds.ac.uk wrote:
 Dear all,

 I have been looking at using XML for a little program I have been writing. 
 The file I am currently trying to load is about 9MB, and I have now tried to 
 use
 HaXml and HST. Without any of my own code, just a simple call to the basic 
 parsers, they both use huge amount of memory.
 HST is the worst and about 7GB and climbing. HaXml uses 1.3Gb.

 The code I am using is
 HST
 xml - readFile file_name_here;k-runX (parseXmlDocument True) xml;print k

 and for HaXml
 x-readFile file_name_here
 let (Document _ _ e _) = xmlParse t x
 let t = myFilter $ CElem e
 print $ length t


 I have seen on previous posts to the cafe that other people have run into 
 this problem with HST. Is this a general problem with XML in Haskell (I know 
 that XML parsing is a slow and bulky process but this seems excessive)? Is 
 there a known solution? Does anyone have any advice?

 Cheers

 RS
 ___
 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] Latest Haskell Platform for Windows (2010.1.0.0) does not seem to include C++ support

2010-05-04 Thread Neil Mitchell
Hi

 On checking, Haskell Platform\2010.1.0.0\mingw\libexec\gcc\mingw32\3.4.5
 does not contain cc1plus.exe. Previous versions of the platform have
 done so. Is this an accidental change or a deliberate policy decision?

 ghc-6.12.1 on Windows did not include the mingw C++ compiler.  This was a
 mistake.  It is included once more in ghc-6.12.2.

ghc-6.12.1 didn't include cc1plus.exe or libstdc++.a. The lack of
libstdc++.a caused a failure in something I was building, so I raised
a bug and it's now included in 6.12.2. I didn't explicitly compile any
C++ code, so it's possible that still doesn't work.

It wasn't a policy decision, merely an accident, and I'm sure if you
alert people it will be rectified (since otherwise it's a regression).

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


Re: [Haskell-cafe] Broken ghc documentation links

2010-04-28 Thread Neil Mitchell
Hi,

I have recently updated Hoogle so it points at specific documentation.
If anyone finds any further bugs, please let me know.

I'm hoping to go through Hoogle and revise much of it in the near
future, and intend to put things in place to stop this happening again
(and keep it up to date).

Thanks, Neil

On Mon, Apr 26, 2010 at 2:15 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
 Daniel Fischer daniel.is.fisc...@web.de writes:

 Am Montag 26 April 2010 13:36:22 schrieb Ivan Lazar Miljenovic:
 So, the problem is that there are broken links _in Hoogle_;

 No, hoogle just sends you to
 http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Prelude.html#t%3AIO
 , which does exist. It's the 'Source' link in the haddocks that sends you
 to the 404 Not Found.
 It's the same with my local docs, I think it's haddock that got confused by
 the move of the IO definition from base to ghc-prim.

 Yeah, as I've said I mis-read the initial problem (I've fielded a few
 queries recently regarding Hoogle not pointing to the 6.12.2 docs and
 initially thought this was another one).

 --
 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

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


Re: [Haskell-cafe] ANNOUNCE: Agata-0.2.0

2010-04-21 Thread Neil Mitchell
Hi Jonas,

 As far as i can tell, derive only works for regular and linear
 recursive types and Regular uses frequencies to regulate size. (Also
 Regular doesn't seem to work for QuickCheck-2).

Derive will generate instances for all types, but uses a fairly
standard formulation (pick between each constructor equally), meaning
that in some cases the generators won't be that good, and will tend to
generate infinite branches.

 Another feature of Agata generators is improved scalability compared
 to other QuickCheck generators, especially for nested collection data
 types (analog to a and such). The details of how this works in
 Agata will one day be explained in the documentation, but the
 principle is explained in my masters thesis[1].

Very neat :-)

I'd welcome an instance generator based on your ideas as a patch to
Derive. Derive provides 3 things:

* Infrastructure - given a definition, it provides tests, ability to
run as template haskell, ability to write to files, auto-generated
documentation etc. I hope to add more infrastructure, such as the
ability to run derivations via a website, so the user need not even
install derive.

* Derivation inference - a method infer derivations given a single
example (explained in this paper:
http://community.haskell.org/~ndm/downloads/paper-deriving_a_relationship_from_a_single_example-04_sep_2009.pdf)

* Lots of instances, about 34 different ones.

I/you/we could replace the Arbitrary instance with one based on your
implementation. You don't have to use the derivation inference (and it
probably wouldn't be suitable), but you do get to benefit from the
rest of the infrastructure. People can then run your program via the
command line, integrate easily with preprocessors etc - and still do
the Template Haskell bit too.

 [1] http://gupea.ub.gu.se/bitstream/2077/22087/1/gupea_2077_22087_1.pdf

Nice, I'll have a read (if it's in English)

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


Re: [Haskell-cafe] ANNOUNCE: Agata-0.2.0

2010-04-20 Thread Neil Mitchell
Hi,

Have you seen the derive package? It also generates QuickCheck
instances in virtually the same way - plus it can generate source code
and do lots of other types of instances.
http://community.haskell.org/~ndm/derive/

Thanks, Neil


2010/4/20 Bas van Dijk v.dijk@gmail.com:
 2010/4/19 Jonas Almström Duregård jonas.dureg...@gmail.com:
 If this is to be used with QuickCheck maybe it should be named that way.
 Certainly worth considering. There seems to be no convenient way of
 renaming packages on Hackage though, is there?

 AFAIK hackage has support for deprecating packages in favor of others.
 This functionality is not exposed to regular users but you could mail
 one of the maintainers (Ross Paterson) to rename your package.

 Bas
 ___
 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: GUI (was: Re: [Haskell-cafe] DLL on Windows)

2010-04-20 Thread Neil Mitchell
:-( - it seems that cabal install wx isn't how you install it on
Windows, not by a long shot.

I'm currently a Gtk2hs user. If wx got to the point where cabal
install wx either installed wx, including all it's non-Haskell
dependencies, or printed out a message you're a windows user who
hasn't installed wxWidgets, here's a handy url for you to click and
run then run cabal install wx again I'd be tempted to switch. I
realise that the platform differences makes it annoying, but it would
be generally handy for Windows users.

I do appreciate the work the wx people are doing for Windows users -
it is generally going in the right direction :-)

Thanks, Neil


On Mon, Apr 19, 2010 at 2:54 AM, Jeremy O'Donoghue
jeremy.odonog...@gmail.com wrote:
 On 18/04/2010, Daniel Fischer daniel.is.fisc...@web.de wrote:
 Am Sonntag 18 April 2010 21:41:06 schrieb Daniel Fischer:
 wx-config should have been installed as part of the wxWidgets package.
 Is that not included in the windows-installer of wxWidgets?

 Seems it's not so.
 http://www.haskell.org/haskellwiki/WxHaskell/Building says
 Windows users should also get the Windows port of wx-config.
 ( http://sites.google.com/site/wxconfig/

 Sadly, the Windows port of wxWidgets doesn't contain wx-config (all of
 the Unix variants have it - it's a shell script), which is a major
 problem as this by far the simplest way for the build system to work
 out the options used to build wxWidgets.

 The Windows port of wx-config is an attempt to fix this problem, but
 only currently supports gcc, hence the restriction to using MinGW
 (although I guess Cygwin would probably work).

  If wxHaskell could be installed with one cabal command that would be
  incredibly cool :-)

 Well, it's just one cabal command if you have all non-Haskell requirements
 installed as needed.

 An option I am looking at is creating a basic Windows installer for
 wxHaskell which would contain a compiled copy of wxWidgets and a copy
 of wx-config, and which would run cabal install wxWidgets out of the
 box. (basic here means you probably don't get to choose anything at
 all - not even where the wxWidgets libraries get installed)

 Provided that I don't need to maintain a source distribution, this
 might be a good way forward for some Windows users. The installer
 would be updated for 'significant' wxWidgets updates (you would be
 able to 'cabal install wx' at any time wxHaskell is updated once you
 have all of the libraries)

 Any interest - please let me know.

 Regards Jeremy
 ___
 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] GHC vs GCC vs JHC

2010-03-27 Thread Neil Mitchell
Hi John,

Any chance of seeing the benchmark? You're not the only one with an
optimising compiler tucked away somewhere :-)

I have one benchmark where I outperform GHC by 21 times, although
saying it's artificial is a bit of an understatement...

Thanks, Neil

On Fri, Mar 26, 2010 at 6:27 PM, John Meacham j...@repetae.net wrote:
 Here are jhc's timings for the same programs on my machine. gcc and ghc
 both used -O3 and jhc had its full standard optimizations turned on.

 jhc:
 ./hs.out  5.12s user 0.07s system 96% cpu 5.380 total

 gcc:
 ./a.out  5.58s user 0.00s system 97% cpu 5.710 total

 ghc:
 ./try  31.11s user 0.00s system 96% cpu 32.200 total


 As you can see, jhc shines at this example, actually beating gcc -O3. It
 isn't too surprising, this is exactly the sort of haskell code that jhc
 excels at.

        John


 --
 John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
 ___
 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: Plans for GHC 6.12.2

2010-03-25 Thread Neil Mitchell
Hi,

Could this bug please be added: http://hackage.haskell.org/trac/ghc/ticket/3893

It's a regression against GHC 6.10.4, entirely a packaging issue, and
most likely an oversight to remove the file.

Thanks, Neil

On Tue, Mar 23, 2010 at 6:38 PM, Ian Lynagh ig...@earth.li wrote:

 Hi all,

 This is a summary of our plans for GHC 6.12.2.

 We plan to put out a release candidate 6.12.2-rc1 shortly and, assuming
 there are no serious regressions found, 6.12.2 will follow soon after.

 The bugs that we're planning to fix for 6.12.2 are the high priority
 tickets in the 6.12.2 milestone:

 http://hackage.haskell.org/trac/ghc/query?status=newstatus=assignedstatus=reopenedpriority=highestpriority=highmilestone=6.12.2order=priority

 If there is a bug not in that list that is important to you, please let
 us know.


 Thanks
 Ian

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

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


Re: [Haskell-cafe] Syntax programming with lexemes rather than trees?

2010-03-23 Thread Neil Mitchell
Hi Stephen,

It actually sounds like your representation has structure, but you
dislike structure because it's hard to work with. The solution is a
generics library, and I recommend Uniplate:
http://community.haskell.org/~ndm/uniplate

Imagine you have a ridiculously complex AST, with beam groups under
tuplets etc, and you want to delete the first item from every beam
group:

transform f
  where f (Beam (x:xs)) = Beam xs
   f x = x

Uniplate moves through tuplets and any other hierarchical syntax, so
you just specify the transformation. My guess is if you throw away the
structure then you'll need it back for some operations.

Thanks, Neil

2010/3/22 Stephen Tetley stephen.tet...@gmail.com:
 Hi Malcolm

 Thanks - particularly I don't want to go to an AST because its I'm
 finding it too convoluted 'shape wise' - processing beam groups inside
 tuplets etc. is a nightmare - music representations have had at least
 eight centuries of ad hoc extension.

 I know Norman Ramsey and colleagues papers on low-level
 representations - I'll give them a re-reading.

 Thanks again

 Stephen
 ___
 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] installing Network on windows

2010-03-23 Thread Neil Mitchell
Hi,

I managed this with the following sequence of commands:
http://www.haskell.org/pipermail/libraries/2010-February/013038.html

Thanks, Neil

On Wed, Mar 17, 2010 at 9:44 PM, Niklas Larsson nikl...@ymail.com wrote:
 Hi!

 It needs some shell, if you install MSYS from mingw and do the cabal install
 from there it will work just fine.

 Here is the download for MSYS:
 http://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/msys-1.0.11/MSYS-1.0.11.exe/download

 // Niklas L.
 
 From: gladst...@gladstein.com gladst...@gladstein.com
 To: haskell-cafe@haskell.org
 Sent: Wed, March 17, 2010 9:11:00 PM
 Subject: [Haskell-cafe] installing Network on windows

 I need some advice on the most straightforward way to install the Network
 package on Windows. I can install Cywgin if that's what it takes. Thanks in
 advance.

 cabal install network
 Resolving dependencies...
 Configuring network-2.2.1.7...
 cabal: Error: some packages failed to install:
 network-2.2.1.7 failed during the configure step. The exception was:
 sh: runGenProcess: does not exist (No such file or directory)


 ___
 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] Haskell platform for GHC 6.12.1?

2010-03-07 Thread Neil Mitchell
Hi Han,

I uploaded my latest version which works with GHC 6.12.1:

http://community.haskell.org/~ndm/temp/cabal.zip

Hope it helps,

Thanks, Neil

On Sun, Mar 7, 2010 at 5:59 PM, Han Joosten han.joos...@atosorigin.com wrote:

 Is it possible to post the correct cabal binary at
 http://www.haskell.org/cabal/download.html ?
 A while ago I gave up on trying to get GHC 6.12.1 working, for I lost the
 battle building cabal on my windows machine
 It would help A LOT when cabal.exe could be downloaded somewhere...

 Thanks

 Han Joosten


 Neil Mitchell wrote:

 Have you tried compiling cabal-install with GHC 6.12.1? I got these
 stream
 errors after I compiled it with 6.10.4, but with 6.12.1 it's working
 flawless.

 Woohoo, your tip works! Thanks a lot.

 Neil


 2010/3/6 Neil Mitchell ndmitch...@gmail.com

 That and all Cabal 0.8 binaries on Windows suffer from zlib corrupted
 stream issues. I've got cabal-install binary, but it's not worth
 distributing :-(

 There is a cabal ticket for this.

 Thanks, Neil

 On Fri, Mar 5, 2010 at 11:27 PM, Ivan Lazar Miljenovic
 ivan.miljeno...@gmail.com wrote:
  Andrew Coppin andrewcop...@btinternet.com writes:
  Is there a reason why a new precompiled binary can't be put up for
  download?
 
  I would assume because no-one has supplied one (Duncan doesn't use
  Windows; don't know about the rest of the cabal-install developers).
 
  --
  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
 
 ___
 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



 --
 View this message in context: 
 http://old.nabble.com/Haskell-platform-for-GHC-6.12.1--tp27778596p27813226.html
 Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

 ___
 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] Haskell platform for GHC 6.12.1?

2010-03-06 Thread Neil Mitchell
That and all Cabal 0.8 binaries on Windows suffer from zlib corrupted
stream issues. I've got cabal-install binary, but it's not worth
distributing :-(

There is a cabal ticket for this.

Thanks, Neil

On Fri, Mar 5, 2010 at 11:27 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
 Andrew Coppin andrewcop...@btinternet.com writes:
 Is there a reason why a new precompiled binary can't be put up for
 download?

 I would assume because no-one has supplied one (Duncan doesn't use
 Windows; don't know about the rest of the cabal-install developers).

 --
 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

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


Re: [Haskell-cafe] Haskell platform for GHC 6.12.1?

2010-03-06 Thread Neil Mitchell
 Have you tried compiling cabal-install with GHC 6.12.1? I got these stream
 errors after I compiled it with 6.10.4, but with 6.12.1 it's working
 flawless.

Woohoo, your tip works! Thanks a lot.

Neil


 2010/3/6 Neil Mitchell ndmitch...@gmail.com

 That and all Cabal 0.8 binaries on Windows suffer from zlib corrupted
 stream issues. I've got cabal-install binary, but it's not worth
 distributing :-(

 There is a cabal ticket for this.

 Thanks, Neil

 On Fri, Mar 5, 2010 at 11:27 PM, Ivan Lazar Miljenovic
 ivan.miljeno...@gmail.com wrote:
  Andrew Coppin andrewcop...@btinternet.com writes:
  Is there a reason why a new precompiled binary can't be put up for
  download?
 
  I would assume because no-one has supplied one (Duncan doesn't use
  Windows; don't know about the rest of the cabal-install developers).
 
  --
  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
 
 ___
 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: Easily generating efficient instances for classes

2010-03-02 Thread Neil Mitchell
Hi

Derive generates declarations - they can be instances, classes, data
types, functions, type synonyms etc.

Thanks, Neil

On Mon, Mar 1, 2010 at 10:32 AM, John Lato jwl...@gmail.com wrote:
 From: Christian H?ner zu Siederdissen

 Hi,

 I am thinking about how to easily generate instances for a class. Each
 instance is a tuple with 1 or more elements. In addition there is a
 second tuple with the same number of elements but different type. This
 means getting longer and longer chains of something like (...,x3*x2,x2,0).

 - template haskell?
 - CPP and macros?

 Consider arrays with fast access like Data.Vector, but with higher
 dimensionality. Basically, I want (!) to fuse when used in Data.Vector
 code.

 (shameless plug) You may want to look at my AdaptiveTuple package,
 which does something very similar to this.  I used Template Haskell
 because AFAIK neither generic approaches nor DrIFT/Derive will
 generate data decls.

 If all you need are the instances, then DrIFT or Derive would be my
 recommendations.

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

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


Re: Easily generating efficient instances for classes

2010-02-28 Thread Neil Mitchell
As Bulat says, the Derive package might be a good way to go. I am
happy to accept any new derivations, and you get lots of things for
free - including writing your code using the nice haskell-src-exts
library, preprocessor support, TH support etc.

Thanks, Neil

On Thu, Feb 25, 2010 at 8:57 AM, Bulat Ziganshin
bulat.zigans...@gmail.com wrote:
 Hello Christian,

 Thursday, February 25, 2010, 3:57:44 AM, you wrote:

 I am thinking about how to easily generate instances for a class. Each

 it's called generic programing. just a few overviews on this topic:

 Libraries for Generic Programming in Haskell
 http://www.cs.uu.nl/research/techreps/repo/CS-2008/2008-025.pdf

 Comparing Approaches to Generic Programming in Haskell
 http://www.cs.uu.nl/~johanj/publications/ComparingGP.pdf

 Derive package is probably the easiest way

 Template Haskell is also good although a bit too complex. my own pets:
 http://www.haskell.org/bz/th3.htm
 http://www.haskell.org/bz/thdoc.htm

 --
 Best regards,
  Bulat                            mailto:bulat.zigans...@gmail.com

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

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


Re: [Haskell-cafe] DLL on Windows

2010-02-16 Thread Neil Mitchell
Hi Serguey,

I notice you are using GHC 6.10.3, I suggest you try 6.10.4 which I
know does work.

I rewrote that section of the manual recently. I haven't had time to
merge it back in, but it might give you more help:

http://neilmitchell.blogspot.com/2009/11/haskell-dlls-on-windows.html

Thanks, Neil

On Tue, Feb 16, 2010 at 2:33 PM, Serguey Zefirov sergu...@gmail.com wrote:
 I tried the way described in
 http://www.haskell.org/ghc/docs/latest/html/users_guide/win32-dlls.html
 and i got this error message:

 
 ghc -shared -o test.dll --make test.hs
 [1 of 1] Compiling Test             ( test.hs, test.o )
 ghc.exe: panic! (the 'impossible' happened)
  (GHC version 6.10.3 for i386-unknown-mingw32):
        link: GHC not built to link this way: LinkDynLib

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 
 How can I fix it?
 ___
 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 meaning of tilde (~) symbol

2010-02-16 Thread Neil Mitchell
Hi

 The symbols that are not specified in a library can be found here:
  http://www.haskell.org/haskellwiki/Keywords
 Hoogle used to show links to this page, when a keyword was searched, but not
 anymore.

And that's a bug:
http://code.google.com/p/ndmitchell/issues/detail?id=280 (that I only
just became aware of).

I'll fix this up shortly.

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


Re: [Haskell-cafe] DLL on Windows

2010-02-16 Thread Neil Mitchell
Hi Serguey,

A GHC 6.10.4 version of Gtk2hs:

http://www.mail-archive.com/gtk2hs-de...@lists.sourceforge.net/msg00340.html

I used to recommend Gtk2hs over wxHaskell for GUI development as there
was always a version that worked on Windows with the latest GHC
release. I think I might have to switch back to recommending C# for
GUI development...

Thanks, Neil

On Tue, Feb 16, 2010 at 5:19 PM, Serguey Zefirov sergu...@gmail.com wrote:
 I'd like to, but I cannot. My code is tied to gtk2hs, which supports
 either 6.10.1 or 6.10.3.

 I put it another way: could I build DLL using ghc 6.12.*?

 If I can, I'll use 6.10.3 for gtk2hs code and 6.12 for all new stuff.

 2010/2/16 Neil Mitchell ndmitch...@gmail.com:
 Hi Serguey,

 I notice you are using GHC 6.10.3, I suggest you try 6.10.4 which I
 know does work.

 I rewrote that section of the manual recently. I haven't had time to
 merge it back in, but it might give you more help:

 http://neilmitchell.blogspot.com/2009/11/haskell-dlls-on-windows.html

 Thanks, Neil

 On Tue, Feb 16, 2010 at 2:33 PM, Serguey Zefirov sergu...@gmail.com wrote:
 I tried the way described in
 http://www.haskell.org/ghc/docs/latest/html/users_guide/win32-dlls.html
 and i got this error message:

 
 ghc -shared -o test.dll --make test.hs
 [1 of 1] Compiling Test             ( test.hs, test.o )
 ghc.exe: panic! (the 'impossible' happened)
  (GHC version 6.10.3 for i386-unknown-mingw32):
        link: GHC not built to link this way: LinkDynLib

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 
 How can I fix it?
 ___
 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] DLL on Windows

2010-02-16 Thread Neil Mitchell
Oh no, I just give up on Haskell and use C# entirely - I'd much rather
program in Haskell, but if all you are doing is a simple Windows app
then a nice GUI is easy in C# with the form designer.

Thanks, Neil

On Tue, Feb 16, 2010 at 6:01 PM, Serguey Zefirov sergu...@gmail.com wrote:
 Thank you very much.

 How do you use C# for GUI development? Do you use hs-dotnet?

 2010/2/16 Neil Mitchell ndmitch...@gmail.com:
 Hi Serguey,

 A GHC 6.10.4 version of Gtk2hs:

 http://www.mail-archive.com/gtk2hs-de...@lists.sourceforge.net/msg00340.html

 I used to recommend Gtk2hs over wxHaskell for GUI development as there
 was always a version that worked on Windows with the latest GHC
 release. I think I might have to switch back to recommending C# for
 GUI development...

 Thanks, Neil

 On Tue, Feb 16, 2010 at 5:19 PM, Serguey Zefirov sergu...@gmail.com wrote:
 I'd like to, but I cannot. My code is tied to gtk2hs, which supports
 either 6.10.1 or 6.10.3.

 I put it another way: could I build DLL using ghc 6.12.*?

 If I can, I'll use 6.10.3 for gtk2hs code and 6.12 for all new stuff.

 2010/2/16 Neil Mitchell ndmitch...@gmail.com:
 Hi Serguey,

 I notice you are using GHC 6.10.3, I suggest you try 6.10.4 which I
 know does work.

 I rewrote that section of the manual recently. I haven't had time to
 merge it back in, but it might give you more help:

 http://neilmitchell.blogspot.com/2009/11/haskell-dlls-on-windows.html

 Thanks, Neil

 On Tue, Feb 16, 2010 at 2:33 PM, Serguey Zefirov sergu...@gmail.com 
 wrote:
 I tried the way described in
 http://www.haskell.org/ghc/docs/latest/html/users_guide/win32-dlls.html
 and i got this error message:

 
 ghc -shared -o test.dll --make test.hs
 [1 of 1] Compiling Test             ( test.hs, test.o )
 ghc.exe: panic! (the 'impossible' happened)
  (GHC version 6.10.3 for i386-unknown-mingw32):
        link: GHC not built to link this way: LinkDynLib

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 
 How can I fix it?
 ___
 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 meaning of tilde (~) symbol

2010-02-16 Thread Neil Mitchell
Hi Patrick,

 The symbols that are not specified in a library can be found here:
  http://www.haskell.org/haskellwiki/Keywords

 I noticed that \ is not in that list, should it be?

Yes! Add it. If it would help a beginner understand what something
means, it should be on that list.

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


[Haskell] Fun in the Afternoon, London, 17th Feb (next Wednesday)

2010-02-10 Thread Neil Mitchell
Dear functional programmers,

Standard Chartered Bank in London will be hosting the next Fun In The
Afternoon event on Wednesday the 17th of February. The program of
talks, with abstracts, is at the bottom of this email. Everyone is
welcome!

If you would like to come, please email me (ndmitchell -AT- gmail
-DOT- com) with your name and affiliation by the 15th of Feb (late
registrations will probably be accommodated, but we do need to print
out name badges).

Address:
1 Basinghall Avenue, London EC2V 5DD
http://maps.google.co.uk/maps?q=standard+chartered+bankie=UTF8hl=enhq=standard+chartered+bankhnear=London,+UKll=51.517796,-0.091581spn=0.007023,0.01929z=16iwloc=A

Moorgate is the nearest tube station, but London Liverpool Street
train/tube station and Bank tube station are easily walkable.

Time:

The event starts at 1:10pm and finishes at 4:30pm. As traditional,
there will be beer/food afterwards.

Schedule:

12:00-1:10, arrive at Standard Chartered. We'll find lunch somewhere
nearby. Tell the reception you are attending Fun in the Afternoon.
If you have any difficulties getting there, or can't find anyone when
you arrive, phone me on 07876 126 574

1:10-1:15, Introduction

1:15-2:00, Invited talk, TBC

2:00-2:15, break

2:15-2:45, Zhaohui Luo, On Subtyping for Type Theories with Canonical Objects

2:45-3:15, George Giorgidze, Declarative Hybrid Modelling and
Simulation in Haskell

3:15-3:30, break

3:30-4:00, Dominic Orchard, Haskell Type Constraints Unleashed

4:00-4:30, Malcolm Wallace, Pointless fusion for pointwise application

4:30-6:00, Pub

6:00, Dinner

Abstracts:

== Zhaohui Luo, On Subtyping for Type Theories with Canonical Objects

Two different notions of subtyping have been studied in the
literature: subsumptive subtyping that employs the subsumption rule
and coercive subtyping that uses implicit coercions. They are suitable
for different kinds of type systems: subsumptive subtyping for type
assignment systems such as the polymorphic calculi in programming
languages and coercive subtyping for the type theories with canonical
objects such as Martin-Lof's type theory implemented in proof
assistants.

In this talk, we explain that subsumptive subtyping is incompatible
with the idea of canonical object and cannot be employed to reflect,
for example, structural subtyping for inductive types in a type theory
with canonical objects. Coercive subtyping, on the other hand, can be
used in such type theories to deal with structural and non-structural
subtyping relations satisfactorily and has interesting and useful
applications.

If time permits, we shall show how the formal relationship between
these two notions of subtyping can be studied by demonstrating how a
type system of dependent types with subsumptive subtyping can be
transformed faithfully into one with coercive subtyping.

== George Giorgidze, Declarative Hybrid Modelling and Simulation in Haskell

Mathematical modelling and simulation of physical systems plays an
important role in design, implementation and analysis of systems in
numerous areas of science and engineering, e.g., electrical
engineering, astronomy, particle physics, biology, climatology,
automotive industry and finance (to mention just few). To cope with
ever increasing size and complexity of real-world systems, a number of
declarative domain specific languages (DSLs) have been developed for
mathematical modelling and simulation.

In the first half of the talk, I will give a brief overview of the
state-of-the-art languages for modelling and simulation and identify
their shortcomings with respect to reusability, composability and
hybrid (mixed discrete and continuous time) simulation. Next, I will
introduce a Haskell-embedded DSL for declarative modelling and
simulation that addresses some of these shortcomings. The DSL features
first-class implicitly formulated equational constrains allowing for
higher-order modelling and simulation of highly structurally dynamic,
hybrid systems that goes beyond what current languages can simulate.
In particular, it allows repeated generation and just-in-time (JIT)
compilation of updated equational constrains during the simulation,
depending on the results thus far.

The embedding approach that we use should be of general interest and
usable in other domains as well. In the second half of the talk, I
will describe the embedding approach in detail. I will show how to use
mixed-level (combination of deep and shallow) embedding and LLVM JIT
compiler to implement an iteratively staged DSL (characterised by
repeated program generation, compilation and execution) efficiently in
a host language that does not provide built-in multi-stage programming
capabilities.

== Dominic Orchard, Haskell Type Constraints Unleashed

The popular Glasgow Haskell Compiler extends the Haskell 98 type system with
several powerful features, leading to an expressive language of type terms. In
contrast, constraints over types have received much less attention,
creating 

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

2010-02-03 Thread Neil Mitchell
Hi Gwern,

Please update: haskell-src-exts - haskell-src **Unknown**

This project was an unqualified success.  haskell-src-exts is now one
of the most commonly used Haskell libraries, achieved the goals in the
project proposal, and is an essential piece of Haskell infrastructure.
I couldn't be more pleased with how this project turned out.

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



  1   2   3   4   5   6   7   8   9   10   >