[Haskell-cafe] Re: Installing ghc in an OpenSolaris Zone

2010-04-27 Thread Christian Maeder
Günther Schmidt schrieb: Hello, has anyone yet managed to install ghc (6.10.4) into an OpenSolaris zone? http://www.haskell.org/ghc/download_ghc_6_10_4.html#x86solaris is supposed to work under open solaris, too. Cheers Christian ___ Haskell-Cafe

Re: [Haskell-cafe] Haddock infix constructors in markup

2010-04-27 Thread Ozgur Akgun
I shouldn't have choosen Num for the constructor name, it led to confusions apparently. You can replace tha Num with anything you want, doesn't change the situation. I mean, it's not the problematic part. Is there any news about the fix in the lexer? When can we use it? On 27 April 2010 00:52,

Re: [Haskell-cafe] Re: The instability of Haskell libraries

2010-04-27 Thread Christopher Lane Hinson
On Tue, 27 Apr 2010, Brandon S. Allbery KF8NH wrote: I despair that a better Numeric hierarchy will never make it into Haskell. I thought the main reason for that was that nobody could agree on a better hierarchy that was actually usable. (Nobody wants to chain 10 typeclasses together to

[Haskell-cafe] Lazy Parsing (ANN: vcd-0.1.4)

2010-04-27 Thread Tom Hawkins
I had been using Parsec to parse VCD files, but needed to lazily parse streaming data. After stumbling on this thread below, I switch to polyparse. What a great library! I was able to migrate from a strict to a semi-lazy parser and many of my parse reductions didn't even need to change. Thanks

Re: [Haskell-cafe] Haddock infix constructors in markup

2010-04-27 Thread David Waern
2010/4/26 Daniel Fischer daniel.is.fisc...@web.de: Am Montag 26 April 2010 22:18:53 schrieb Daniel Fischer: Am Montag 26 April 2010 22:05:48 schrieb Ozgur Akgun: So, how can we make use of this fix? My guess: $ cabal install haddock-2.7.2 No, it's not yet in there :( Yes, I should make

[Haskell-cafe] ANN: iteratee-parsec 0.0.3

2010-04-27 Thread Maciej Piechotka
iteratee-parsec is a package allowing parsec parser using iteratee. Changes in 0.0.3: - Update to transformers 0.2.* (tested with 0.2.1.0) - Add stricter checks for version of dependencies Regards signature.asc Description: This is a digitally signed message part

Re: [Haskell-cafe] Re: The instability of Haskell libraries

2010-04-27 Thread Henning Thielemann
Christopher Lane Hinson schrieb: On Tue, 27 Apr 2010, Brandon S. Allbery KF8NH wrote: I despair that a better Numeric hierarchy will never make it into Haskell. I thought the main reason for that was that nobody could agree on a better hierarchy that was actually usable. (Nobody wants

Re: [Haskell-cafe] What do _you_ want to see in FGL?

2010-04-27 Thread Henning Thielemann
Ivan Lazar Miljenovic schrieb: Since I've volunteered myself to help maintain/upgrade FGL, what do the people in the community want to see happen with it? I was not happy with the way FGL handles lables so far: http://www.haskell.org/pipermail/libraries/2008-February/009241.html

[Haskell-cafe] Re: Sorting Types

2010-04-27 Thread John Creighton
I was wondering if it is possible to sort types in hakell and if so what language extension I should use. Not sure if this is possible but here is my attempt: (I'm aware I don't need so many pragmas {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-}

[Haskell-cafe] Is XHT a good tool for parsing web pages?

2010-04-27 Thread John Creighton
Subject: Is XHT a good tool for parsing web pages? I looked a little bit at XHT and it seems very elegant for writing concise definitions of parsers by forms but I read that it fails if the XML isn't strict and I know a lot of web pages don't use strict XHTML. Therefore I wonder if it is an

Re: [Haskell-cafe] Is XHT a good tool for parsing web pages?

2010-04-27 Thread Peter Robinson
On 27 April 2010 16:22, John Creighton johns2...@gmail.com wrote: Subject: Is XHT a good tool for parsing web pages? I looked a little bit at XHT and it seems very elegant for writing concise definitions of parsers by forms but I read that it fails if the XML isn't strict and I know a lot of

[Haskell-cafe] Number of CPUs/cores?

2010-04-27 Thread Dimitry Golubovsky
Hi, Does there exist a Haskell library function that returns the number of CPUs/cores (in portable way) on a computer where the program calling it runs? Thanks. -- Dimitry Golubovsky Anywhere on the Web ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: The instability of Haskell libraries

2010-04-27 Thread Christopher Lane Hinson
I'm so sorry. I mean to say that there is no part of the standard prelude that is the numeric part. I was aware of the numeric-prelude package, which is good work and deserves recognition. Friendly, --Lane On Tue, 27 Apr 2010, Henning Thielemann wrote: Christopher Lane Hinson schrieb:

Re: [Haskell-cafe] Number of CPUs/cores?

2010-04-27 Thread Michael Lesniak
Hello, Does there exist a Haskell library function that returns the number of CPUs/cores (in portable way)  on a computer where the program calling it runs? numCapabilities, I think. - Michael ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Number of CPUs/cores?

2010-04-27 Thread Dimitry Golubovsky
OK, makes sense. Thank you. On Tue, Apr 27, 2010 at 10:58 AM, Michael Lesniak mlesn...@uni-kassel.de wrote: [skip] numCapabilities, I think. -- Dimitry Golubovsky Anywhere on the Web ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Getting used and available memory

2010-04-27 Thread Mads Lindstrøm
Hi I have tried haskell.org, Google and Hoolge, but I cannot find any function to give me the available and/or used memory of a Haskell program. Is it just not there? Or am I missing it somehow? /Mads ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: Sorting Types

2010-04-27 Thread Casey McCann
On Tue, Apr 27, 2010 at 10:20 AM, John Creighton johns2...@gmail.com wrote: I was wondering if it is possible to sort types in hakell and if so what language extension I should use. There are multiple ways that some manner of ordering could be defined on types. A structural definition is one

[Haskell-cafe] Trouble with the FFI, Cabal, and GHCI -- installed libraries have invalid FFI pointers

2010-04-27 Thread John Millikin
I have two modules. One is a library, installed with Cabal: - -- Data/Text/IDN/StringPrep.hs {-# LANGUAGE ForeignFunctionInterface #-} module Data.Text.IDN.StringPrep where import Foreign foreign import ccall stringprep.h

Re: [Haskell-cafe] Lazy Parsing (ANN: vcd-0.1.4)

2010-04-27 Thread S. Doaitse Swierstra
How about: import Text.ParserCombinators.UU.Parsing import Text.ParserCombinators.UU.Examples pDate :: Pars (Int,Int,Int) pDate = (,,) $ pNatural * pDot * pNatural * pDot * pNatural where pDot = pSym '.' and then: *Main test pDate 3.4.5 Loading package syb-0.1.0.2 ... linking ...

Re: [Haskell-cafe] Number of CPUs/cores?

2010-04-27 Thread Daniel Peebles
I believe numCapabilities (should be in IO, in my opinion, but that's another discussion) will tell you the number of capabilities (native threads) that have been given to the RTS. The measurement doesn't necessarily have any connection to the number of physical cores or processors in your

Re: [Haskell-cafe] Getting used and available memory

2010-04-27 Thread Daniel Peebles
It's not an easy measurement to even define. There was a huge debacle recently about a windows program that reported misleading numbers about used memory. The fact that GHC has its own allocator and hogs OS memory (it never returns it to the OS) might complicate the definition further. But in

[Haskell-cafe] Re: FRP for game programming / artifical life simulation

2010-04-27 Thread Ben
slightly off topic, but how does one handle pausing / saving / restarting in the FRP framework, especially the arrowized version? i've only been able to do this via explicit (or monadic) state-passing, e.g. imperative / piecemeal versus declarative / wholemeal, which seems against the spirit of

Re: [Haskell-cafe] Lazy Parsing (ANN: vcd-0.1.4)

2010-04-27 Thread Jason Dusek
So UU parsers can construct input? The presence of an empty list in the 2nd slot of the tuple is the only indicator of errors? For parsing datatypes without a sensible default value, what happens? -- Jason Dusek ___ Haskell-Cafe mailing list

[Haskell-cafe] Seeking the correct quote

2010-04-27 Thread Jacques Carette
I have heard generic programming described tongue-in-cheek as the kind of polymorphism that a language does not (yet) have. I find this description rather apt, and it matches fairly what I see called 'generic' in various communities. But who said this, where and when? Jacques

Re: [Haskell-cafe] Run haskell program in emacs without typing main in the ghci buffer.

2010-04-27 Thread Zura_
Jose A. Ortega Ruiz-2 wrote: Assuming you're using haskell-mode, does M-x inferior-haskell-load-and-run This seems to be exactly what I want. Added couple of things: (defun haskell-run-preserve-focus () Load and run but preserve focus. (interactive) (let ((buf

Re: [Haskell-cafe] Number of CPUs/cores?

2010-04-27 Thread Michael Lesniak
Hi, another discussion) will tell you the number of capabilities (native threads) that have been given to the RTS. The measurement doesn't necessarily have any connection to the number of physical cores or processors in your machine. You're correct, should have clarified this more. Cheers,

Re: [Haskell-cafe] Is XHT a good tool for parsing web pages?

2010-04-27 Thread Malcolm Wallace
Is XHT a good tool for parsing web pages? I read that it fails if the XML isn't strict and I know a lot of web pages don't use strict XHTML. Do you mean HXT rather than XHT? I know that the HaXml library has a separate error-correcting HTML parser that works around most of the common

Re: [Haskell-cafe] Getting used and available memory

2010-04-27 Thread Mads Lindstrøm
Hi I was _not_ looking for the OS-level measure, but rather something reported by the run-time. Thanks you for the answer anyway. /Mads On Tue, 2010-04-27 at 15:32 -0400, Daniel Peebles wrote: It's not an easy measurement to even define. There was a huge debacle recently about a windows

Re: [Haskell-cafe] Getting used and available memory

2010-04-27 Thread Don Stewart
We could bind to Rts.c in the GHC runtime, and get all the stats programmatically that you can get with +RTS -s mads.lindstroem: Hi I was _not_ looking for the OS-level measure, but rather something reported by the run-time. Thanks you for the answer anyway. /Mads On Tue, 2010-04-27 at

Re: [Haskell-cafe] What do _you_ want to see in FGL?

2010-04-27 Thread Ivan Lazar Miljenovic
Henning Thielemann schlepp...@henning-thielemann.de writes: I was not happy with the way FGL handles lables so far: http://www.haskell.org/pipermail/libraries/2008-February/009241.html Not sure I follow what you want there: you want to remove the whole concept of labels and replace it with

Re: [Haskell-cafe] What do _you_ want to see in FGL?

2010-04-27 Thread Henning Thielemann
Ivan Lazar Miljenovic schrieb: Henning Thielemann schlepp...@henning-thielemann.de writes: I was not happy with the way FGL handles lables so far: http://www.haskell.org/pipermail/libraries/2008-February/009241.html Not sure I follow what you want there: you want to remove the whole

Re: [Haskell-cafe] What do _you_ want to see in FGL?

2010-04-27 Thread Ivan Miljenovic
On 28 April 2010 08:48, Henning Thielemann schlepp...@henning-thielemann.de wrote: Ivan Lazar Miljenovic schrieb: Henning Thielemann schlepp...@henning-thielemann.de writes: I was not happy with the way FGL handles lables so far:  

[Haskell-cafe] A newbie question ?

2010-04-27 Thread zaxis
newtype TypeMap = TypeMap (Map.Map TypeRep Dynamic) lookup :: Typeable a = TypeMap - Maybe a lookup (TypeMap mp) = res where res = liftM (fromJust . fromDynamic) $ Map.lookup (typeOf $ fromJust res) mp It seems that the `res` in `fromJust res` has not been defined ? Sincerely! - fac

Re: [Haskell-cafe] A newbie question ?

2010-04-27 Thread Ivan Miljenovic
On 28 April 2010 10:17, zaxis z_a...@163.com wrote: newtype TypeMap = TypeMap (Map.Map TypeRep Dynamic) lookup :: Typeable a = TypeMap - Maybe a lookup (TypeMap mp) = res    where res = liftM (fromJust . fromDynamic) $ Map.lookup (typeOf $ fromJust res) mp It seems that the `res` in  

Re: [Haskell-cafe] Seeking the correct quote

2010-04-27 Thread Sterling Clover
I first encountered this quip on ltu: http://lambda-the-ultimate.org/node/1926#comment-23411 However, that comment doesn't give a source either. Cheers, Sterl. On Tue, Apr 27, 2010 at 4:23 PM, Jacques Carette care...@mcmaster.ca wrote: I have heard generic programming described tongue-in-cheek

[Haskell-cafe] mtl design (was ``What do _you_ want to see in FGL?'')

2010-04-27 Thread Bradford Larsen
On Mon, Apr 26, 2010 at 7:35 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Whilst freezing it is an option, I feel that this will lead to the same problems that we already face with mtl: most people agree/know that the approach/design is bad, but we keep using it because there's no

Re: [Haskell-cafe] Seeking the correct quote

2010-04-27 Thread Bradford Larsen
On Tue, Apr 27, 2010 at 4:23 PM, Jacques Carette care...@mcmaster.ca wrote: I have heard generic programming described tongue-in-cheek as the kind of polymorphism that a language does not (yet) have.  I find this description rather apt, and it matches fairly what I see called 'generic' in

[Haskell-cafe] Re: mtl design (was ``What do _you_ want to see in FGL?'')

2010-04-27 Thread Ivan Miljenovic
On 28 April 2010 11:22, Bradford Larsen brad.lar...@gmail.com wrote: Could you elaborate on what you mean regarding the mtl approach design?  What makes them bad? Neil seems to have summed up the detractors opinions of mtl quite well at

Re: [Haskell-cafe] Seeking the correct quote

2010-04-27 Thread Jacques Carette
Bradford Larsen wrote: On Tue, Apr 27, 2010 at 4:23 PM, Jacques Carette care...@mcmaster.ca wrote: I have heard generic programming described tongue-in-cheek as the kind of polymorphism that a language does not (yet) have. I find this description rather apt, and it matches fairly what I

Re: [Haskell-cafe] Getting used and available memory

2010-04-27 Thread Bernie Pope
On 27 April 2010 17:55, Don Stewart d...@galois.com wrote: We could bind to Rts.c in the GHC runtime, and get all the stats programmatically that you can get with +RTS -s A long time ago I made a simple binding which has been packaged for cabal by Gwern Branwen. The package is called

Re: [Haskell-cafe] Seeking the correct quote

2010-04-27 Thread Jacques Carette
Sterling Clover wrote: I first encountered this quip on ltu: http://lambda-the-ultimate.org/node/1926#comment-23411 However, that comment doesn't give a source either. Probably where I remembered it from too. I'll continue searching - it's a good quote! Jacques

Re: [Haskell-cafe] A newbie question ?

2010-04-27 Thread Ryan Ingram
Remember, fromJust res won't be evaluated unless typeOf needs it. But it does get typechecked at compile time, and the type is used to select which instance of typeOf to call. Fortunately, legal instances of Typeable require typeOf to not inspect its argument. This is a somewhat old design;

Re: [Haskell-cafe] A newbie question ?

2010-04-27 Thread zaxis
proxy type is indeed much clear! thanks Ryan Ingram wrote: Remember, fromJust res won't be evaluated unless typeOf needs it. But it does get typechecked at compile time, and the type is used to select which instance of typeOf to call. Fortunately, legal instances of Typeable require

Re: [Haskell-cafe] Re: FRP for game programming / artifical life simulation

2010-04-27 Thread Christopher Lane Hinson
I'm not sure exactly what you want to do. It should certainly be easy to freeze an FRP program by lying about the amount of time that is passing and witholding all events. Do you want to save an FRP system instance to disk (generally unwise), or something else (what?). Friendly, --Lane On

Re: [Haskell-cafe] Haskell Weekly News?

2010-04-27 Thread David Sankel
I'm wondering if a monetary incentive would keep the person who does this work more accountable. I personally would be willing to contribute to continue getting this service. I wonder if there are others as well. David On Mon, Apr 26, 2010 at 9:32 PM, Joe Fredette jfred...@gmail.com wrote: