Re: [Haskell-cafe] static linking with ghc?

2012-04-25 Thread Ketil Malde
Johannes Waldmann waldm...@imn.htwk-leipzig.de writes: A similar thing is mentioned here (see Caveat) http://www.haskell.org/haskellwiki/Web/Literature/Static_linking Another caveat is that shared linking isn't very useful on Linux, since the C library loads various stuff dynamically anyway.

Re: [Haskell-cafe] JSON library suggestions?

2012-04-25 Thread Vincent Hanquez
On 04/24/2012 09:46 PM, Jeff Shaw wrote: Hello, Up until now I've been using Aeson, but I've found that its number type isn't going to work for me. I need to use decimal numbers while avoiding conversions from and to Double, which Aeson doesn't allow. There are quite a few more JSON libraries

Re: [Haskell-cafe] ANN: signed-multiset-0.1

2012-04-25 Thread Stefan Holdermans
Wren, Sjoerd, This is not just about map, but it also a problem for the Monoid instance. You are basically adding an extra identity element, 0, to the max monoid, which works but is weird. Still that's how union is typically defined for hybrid sets. It's what happens if want union and

Re: [Haskell-cafe] Multi-site haddock documentation with proper links?

2012-04-25 Thread Ryan Newton
One more update: cabal haddock exposes a --html-location flag which is useful: http://www.haskell.org/cabal/users-guide/installing-packages.html#setup-haddock Another way of invoking haddock is through cabal install. It looks like cabal install --enable-documentation and cabal install

[Haskell-cafe] atomicModifyMutVar and casMutVar

2012-04-25 Thread Thomas Bereknyei
I have seen some push to take advantage of the new primop casMutVar, yet I see that atomicModifyMutVar hasn't been used yet either. For example, modifySTRef is just a read followed by a write. I've been unable to create a version that does not allocate with something as simple as modifySTRef ref

Re: [Haskell-cafe] Multi-site haddock documentation with proper links?

2012-04-25 Thread Brent Yorgey
It is possible. I have done it for http://projects.haskell.org/diagrams/doc/index.html But it is not fun, and it took me several days of work (spread over two weeks) to figure out the proper magic incantations to get everything to work properly. I really ought to write up a blog post with

Re: [Haskell-cafe] desactivate my Show instance implementations temporarily

2012-04-25 Thread Eric Kow
On 23 Apr 2012, at 17:49, Evan Laforge wrote: I use a custom Pretty class along with HughesPJ, ala ghc's Outputable. It means I can omit data or print it out in a more readable form (even just rounding floats to %.03f can help a lot), and also get nice layout and wrapping. I think I do

[Haskell-cafe] Printing call site for partial functions

2012-04-25 Thread Michael Snoyman
I had a bug in a site of mine[1] for a few weeks, where it would just print: Prelude.head: empty list It took a long time to track down the problem, as it came from some other library I was depending on. Eventually I tracked it down, reported it, and the problem was fixed the next day. The

Re: [Haskell-cafe] Printing call site for partial functions

2012-04-25 Thread Evan Laforge
And then have the compiler automatically include (optional) package name, module name, and line number where `headContext` was called. How about we borrow a bit from rewrite rules, and have a pragma such as:    {-# WITH_CONTEXT head headContext #-} This seems similar to the SRCLOC_ANNOTATE

Re: [Haskell-cafe] Printing call site for partial functions

2012-04-25 Thread Ozgur Akgun
Hi, On 25 April 2012 16:36, Michael Snoyman mich...@snoyman.com wrote: Prelude.head: empty list Recent versions of GHC actually generate a very helpful stack trace, if the program is compiled with profiling turned on and run with -xc. See:

Re: [Haskell-cafe] Correspondence between libraries and modules

2012-04-25 Thread Gregg Lebovitz
On 4/24/2012 11:49 PM, wren ng thornton wrote: On 4/24/12 9:59 AM, Gregg Lebovitz wrote: The question of how to support rapid innovation and stable deployment is not an us versus them problem. It is one of staging releases. The Linux kernel is a really good example. The Linux development

[Haskell-cafe] Uploading a new hsc2hs

2012-04-25 Thread Thomas DuBuisson
Warning: I, not the maintainer of hsc2hs, will be uploading a trivial fix for hsc2hs to hackage (new build deps). Even after public attempts to contact anyone in charge of hsc2hs (last January) there still has been no word. Speak now or forever hold your peace. Cheers, Thomas P.S. I still

Re: [Haskell-cafe] ANN: signed-multiset-0.1

2012-04-25 Thread Sjoerd Visscher
On Apr 25, 2012, at 11:39 AM, Stefan Holdermans wrote: The union of two sets is typically defined as the smallest set that is a superset of both the operands; this definition extends nicely for multisets and hybrid sets [1,2,3]. [3] differs from [1] and [2] (and your implementation). [3]

[Haskell-cafe] ANN: unfoldable-0.4.0

2012-04-25 Thread Sjoerd Visscher
I am pleased to announce the 5th version of the unfoldable package. (This is the first announcement, you didn't miss anything.) http://hackage.haskell.org/package/unfoldable-0.4.0 Just as there's a Foldable class, there should also be an Unfoldable class. This package provides one: class

Re: [Haskell-cafe] ANN: signed-multiset-0.1

2012-04-25 Thread Stefan Holdermans
Sjoerd, I am sorry, as I already wrote, I decided to deprecate the package. [3] defines the union as h(u) = max(f(u), g(u)) where f, g and h are multiplicity functions. Which is the same, as [3] is about multisets, not signed multisets. [...] and this is also what your implementation does.

[Haskell-cafe] Linear Diaphantine equation solver bug

2012-04-25 Thread John D. Ramsdell
I uploaded a new version of the ACU unifier in package cmu. It includes a Linear Diaphantine equation solver that now handles inhomogeneous equations. What's interesting is the algorithm is based on a paper by Contejean and Devie. That paper includes a proof of correctness of their algorithm.

Re: [Haskell-cafe] ANN: signed-multiset-0.1

2012-04-25 Thread Sjoerd Visscher
On Apr 26, 2012, at 12:54 AM, Stefan Holdermans wrote: Sjoerd, I am sorry, as I already wrote, I decided to deprecate the package. That's too bad, I really love these kind of data structures. (That's why I keep ranting about it, sorry about that.) [3] defines the union as h(u) =

Re: [Haskell-cafe] ANN: signed-multiset-0.1

2012-04-25 Thread Stefan Holdermans
Sjoerd, [3] defines the union as h(u) = max(f(u), g(u)) where f, g and h are multiplicity functions. Which is the same, as [3] is about multisets, not signed multisets. Chapter 3 of [3] is about Hybrid Sets. And there the union is defined by taking the *minimum* of multiplicities, which

Re: [Haskell-cafe] Uploading a new hsc2hs

2012-04-25 Thread Antoine Latter
On Wed, Apr 25, 2012 at 4:59 PM, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: Warning: I, not the maintainer of hsc2hs, will be uploading a trivial fix for hsc2hs to hackage (new build deps).  Even after public attempts to contact anyone in charge of hsc2hs (last January) there still

Re: [Haskell-cafe] Uploading a new hsc2hs

2012-04-25 Thread Thomas DuBuisson
On Wed, Apr 25, 2012 at 5:27 PM, Antoine Latter aslat...@gmail.com wrote: On Wed, Apr 25, 2012 at 4:59 PM, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: Warning: I, not the maintainer of hsc2hs, will be uploading a trivial fix for hsc2hs to hackage (new build deps).  Even after public

[Haskell-cafe] Haskell Weekly News: Issue 224

2012-04-25 Thread Daniel Santa Cruz
Welcome to issue 224 of the HWN, an issue covering crowd-sourced bits of information about Haskell from around the web. This issue covers the week of April 15 to 21, 2012. Announcements Some of these announcements are a bit behind, for which I apologize. Better late than never... The long

Re: [Haskell-cafe] JSON library suggestions?

2012-04-25 Thread Richard O'Keefe
On 25/04/2012, at 9:51 AM, Alvaro Gutierrez wrote: For that reason, most standard (fixed size/binary) numeric types like double are a poor choice to contain numeric values specified in JSON; in particular, the mismatch means that conversion can be lossy in both directions. Note that the

Re: [Haskell-cafe] ANN: signed-multiset-0.1

2012-04-25 Thread wren ng thornton
On 4/25/12 5:39 AM, Stefan Holdermans wrote: The union of two sets is typically defined as the smallest set that is a superset of both the operands; Or, the smallest set containing all the elements of both/all operands. The two definitions coincide for sets. They diverge for bags/multisets:

Re: [Haskell-cafe] JSON library suggestions?

2012-04-25 Thread Alvaro Gutierrez
On Wed, Apr 25, 2012 at 10:42 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote: Note that the conversion *IS* lossy in practice. If you send a JSON message to a Javascript program, or a Python program, or a Go program (if I am reading src/pkg/encoding/json/decode.go correctly) what you get will

Re: [Haskell-cafe] ANN: signed-multiset-0.1

2012-04-25 Thread wren ng thornton
On 4/25/12 7:27 PM, Stefan Holdermans wrote: Sjoerd, [3] defines the union as h(u) = max(f(u), g(u)) where f, g and h are multiplicity functions. Which is the same, as [3] is about multisets, not signed multisets. Chapter 3 of [3] is about Hybrid Sets. And there the union is defined by