[Haskell-cafe] Re: Packages and modules

2006-07-05 Thread Ian Lynagh
On Wed, Jul 05, 2006 at 01:03:01AM +0100, Brian Hulley wrote: Simon Peyton-Jones wrote: Concerning other mail on this subject, which has been v useful, I've revised the Wiki page (substantially) to take it into account. http://hackage.haskell.org/trac/ghc/wiki/GhcPackages Further input

[Haskell-cafe] Re: Packages and modules

2006-07-05 Thread Ketil Malde
Brian Hulley [EMAIL PROTECTED] writes: because if the suggested syntax is used, import directives come in two flavours: ones that use from to import from a different package and ones that don't use from and therefore must refer to the current package. What is the current package? My

[Haskell-cafe] RE: Packages and modules

2006-07-05 Thread Simon Peyton-Jones
In response to Brian and Ian's helpful comments, I've added a bunch more stuff to our proposal about packages. If I have missed anything, let me know. http://hackage.haskell.org/trac/ghc/wiki/GhcPackages If you or anyone else thinks the choices made there are poor ones, continue to say

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

2006-07-05 Thread Ian Lynagh
On Fri, Jun 30, 2006 at 03:45:57PM -0700, mvanier wrote: I'm at a loss here. Somehow, the SplitObjs option doesn't seem to be doing the job. Any suggestions would be appreciated. It looks like gcc 4.1 is floating all the __asm__(\n__stg_split_marker:); results to the top of the

[Haskell-cafe] Haskell as embedded DSL

2006-07-05 Thread Joel Reymont
Folks, Do you have examples of using Haskell as a DSL in an environment NOT targeted at people who know it already? I'm thinking of using Haskell to build my Mac trading app but I'm very concerned about dumping Haskell on the trading systems developers. It seems that using, say, Ruby as

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

2006-07-05 Thread Duncan Coutts
On Sat, 2006-07-01 at 16:36 +0100, Ian Lynagh wrote: [resending as the original seems to have been silently eaten; attachements are at http://urchin.earth.li/~ian/splitting/ ] On Fri, Jun 30, 2006 at 03:45:57PM -0700, mvanier wrote: I'm at a loss here. Somehow, the SplitObjs option

[Haskell-cafe] Clever generic ByteString hack?

2006-07-05 Thread John Goerzen
Hi, In MissingH, I have a bunch of little functions that operate on lists. Some, like uniq (which eliminates duplicate elements in a list), operate on (Eq a = [a]) lists. Others, like strip (which eliminates whitespace at the start and end), operate on Strings only. Most functions of both types

[Haskell-cafe] Strictness in do block

2006-07-05 Thread John Goerzen
Hi, One thing that seems to keep biting me is strictness in do blocks. What I want to know is the generic way to force an entire String (or other list, perhaps from hGetContents) to be evaluated (read into RAM, I guess) so the underlying file can be closed and do it right now. One quick

Re: [Haskell-cafe] Strictness in do block

2006-07-05 Thread Neil Mitchell
Hi, What I want to know is the generic way to force an entire String (or other list, perhaps from hGetContents) to be evaluated (read into RAM, I guess) so the underlying file can be closed and do it right now. What I have done in the past is to take the length of the string, and test the

Re: [Haskell-cafe] Strictness in do block

2006-07-05 Thread Duncan Coutts
On Wed, 2006-07-05 at 12:08 +0100, Neil Mitchell wrote: Hi, What I want to know is the generic way to force an entire String (or other list, perhaps from hGetContents) to be evaluated (read into RAM, I guess) so the underlying file can be closed and do it right now. What I have done

[Haskell-cafe] Re: Packages and modules

2006-07-05 Thread Simon Marlow
Ian Lynagh wrote: I think I missed where the plan to use quotes came from. What's the purpose? Package names already have a well-defined syntax with no spaces or other confusing characters in them, so why do we need the quotes? Or is it just so we can have packages with the same name as

[Haskell-cafe] Re: Packages and modules

2006-07-05 Thread Simon Marlow
Ketil Malde wrote: What is the current package? The package that you're currently compiling. This now must be known at compile time. My impression was that from would only be needed when there was ambiguity. (And if I wanted to type myself to death, I'd be using Java :-) If you *have*

Re: [Haskell-cafe] Clever generic ByteString hack?

2006-07-05 Thread Donald Bruce Stewart
duncan.coutts: On Wed, 2006-07-05 at 05:58 -0500, John Goerzen wrote: Hi, In MissingH, I have a bunch of little functions that operate on lists. Some, like uniq (which eliminates duplicate elements in a list), operate on (Eq a = [a]) lists. Others, like strip (which eliminates

Re: [Haskell-cafe] New Benchmark Under Review: Magic Squares

2006-07-05 Thread Malcolm Wallace
Daniel Fischer [EMAIL PROTECTED] wrote: Cool, though the problem of exploding runtime remains, it's only pushed a little further. Now I get a 5x5 magig square in 1 s, a 6x6 in 5.4 s, but 7x7 segfaulted after about 2 1/2 hours - out of memory, I note that your solution uses Arrays. I have

Re: [Haskell-cafe] Strictness in do block

2006-07-05 Thread Bulat Ziganshin
Hello John, Wednesday, July 5, 2006, 3:04:22 PM, you wrote: What I want to know is the generic way to force an entire String (or other list, perhaps from hGetContents) to be evaluated (read into RAM, I guess) so the underlying file can be closed and do it right now. eval [] = [] eval

Re[2]: [Haskell-cafe] Clever generic ByteString hack?

2006-07-05 Thread Bulat Ziganshin
Hello Duncan, Wednesday, July 5, 2006, 3:25:53 PM, you wrote: People sometimes talk about doing a type class to cover string like modules. class ListLike ce e | ce-e where head :: ce - e instance ListLike [a] a instance ListLike (Sequence a) a instance ListLike ByteString

Re[2]: [Haskell-cafe] New Benchmark Under Review: Magic Squares

2006-07-05 Thread Bulat Ziganshin
Hello Malcolm, Wednesday, July 5, 2006, 4:30:43 PM, you wrote: I note that your solution uses Arrays. I have recently discovered that the standard array implementations in GHC introduce non-linear performance profiles (wrt to the size of the array). None of the ordinary variations of

Re: [Haskell-cafe] Re: Packages and modules

2006-07-05 Thread Niklas Broberg
So here are some options: 1. the proposal as it is now, keeping exposed/hidden state in the package database, don't support available 2. Add support for available. Cons: yet more complexity! 3. Drop the notion of exposed/hidden, all packages are available. (except for

[Haskell-cafe] Re: Strictness in do block

2006-07-05 Thread John Goerzen
On 2006-07-05, Duncan Coutts [EMAIL PROTECTED] wrote: What I have done in the past is to take the length of the string, and test the length in some way - although I guess you could call seq on the length. evaluate is for just that purpose. evaluate (length input) from the docs:

Re: [Haskell-cafe] Clever generic ByteString hack?

2006-07-05 Thread John Goerzen
On Wed, Jul 05, 2006 at 09:38:44PM +1000, Donald Bruce Stewart wrote: What functions are you thinking of btw? We may want to include them in the ByteString modules anyway (possibly directly rather than in terms of other functions, to take advantage of tricks with the representation).

Re: [Haskell-cafe] Clever generic ByteString hack?

2006-07-05 Thread John Goerzen
On Wed, Jul 05, 2006 at 12:25:53PM +0100, Duncan Coutts wrote: different types of input? I'd rather avoid having 3 versions, that are exactly the same except for imports. People sometimes talk about doing a type class to cover string like modules. Yes, that makes sense to me. I was

Re: [Haskell-cafe] Re: Packages and modules

2006-07-05 Thread Simon Marlow
Niklas Broberg wrote: So here are some options: 1. the proposal as it is now, keeping exposed/hidden state in the package database, don't support available 2. Add support for available. Cons: yet more complexity! 3. Drop the notion of exposed/hidden, all packages are

Re[2]: [Haskell-cafe] Clever generic ByteString hack?

2006-07-05 Thread Bulat Ziganshin
Hello Donald, Wednesday, July 5, 2006, 3:38:44 PM, you wrote: In MissingH, I have a bunch of little functions that operate on lists. Some, like uniq (which eliminates duplicate elements in a list), operate on (Eq a = [a]) lists. Others, like strip (which eliminates whitespace at the

[Haskell-cafe] Re: New Benchmark Under Review: Magic Squares

2006-07-05 Thread Simon Marlow
Malcolm Wallace wrote: Daniel Fischer [EMAIL PROTECTED] wrote: Cool, though the problem of exploding runtime remains, it's only pushed a little further. Now I get a 5x5 magig square in 1 s, a 6x6 in 5.4 s, but 7x7 segfaulted after about 2 1/2 hours - out of memory, I note that your

Re: [Haskell-cafe] Haskell as embedded DSL

2006-07-05 Thread Niklas Broberg
On 7/5/06, Joel Reymont [EMAIL PROTECTED] wrote: Do you have examples of using Haskell as a DSL in an environment NOT targeted at people who know it already? Lava: http://www.cs.chalmers.se/~koen/Lava/ Lava is a hardware description language based upon the functional programming language

Re: [Haskell-cafe] Re: New Benchmark Under Review: Magic Squares

2006-07-05 Thread Bulat Ziganshin
Hello Simon, Wednesday, July 5, 2006, 5:50:58 PM, you wrote: Mutable, boxed arrays in GHC have a linear GC overhead in GHC unfortunately. This is partially fixed in GHC 6.6. You can work around it by using either immutable or unboxed arrays, or immutable boxed array can still have large

Re: [Haskell-cafe] Haskell as embedded DSL

2006-07-05 Thread Joel Reymont
On Jul 5, 2006, at 3:07 PM, Niklas Broberg wrote: Lava: http://www.cs.chalmers.se/~koen/Lava/ Excellent example, thank you Niklas! Are you using QuickCheck for verification? Thanks, Joel -- http://wagerlabs.com/ ___ Haskell-Cafe

[Haskell-cafe] Re: Packages and modules

2006-07-05 Thread Brian Hulley
Simon Peyton-Jones wrote: In response to Brian and Ian's helpful comments, I've added a bunch more stuff to our proposal about packages. If I have missed anything, let me know. http://hackage.haskell.org/trac/ghc/wiki/GhcPackages If you or anyone else thinks the choices made there are poor

[Haskell-cafe] RE: Packages and modules

2006-07-05 Thread Simon Peyton-Jones
| So instead of just taking this simple solution, the wiki proposal is instead | destroying the beauty of the per-package namespace idea by incorporating | into it the existing shared namespaces with their attendant problems, | instead of just letting the existing messy system die a natural death

Re: [Haskell-cafe] forall and a parse error

2006-07-05 Thread David House
On 03/07/06, Neil Mitchell [EMAIL PROTECTED] wrote: [1,2] /= [(1,2)] Ah, I figured we were talking at the type level. -- -David House, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Cyclic Type-synonyms

2006-07-05 Thread Christophe Poucet
Hello, I use the Indirect Composite pattern a lot, and this means that typically, especially with recursive types (such as an AST), you end up with a lot of data-constructors. I understand that it is not possible to have pure cyclic types (because haskell requires iso-recursive and not

Re: [Haskell-cafe] Trading with Haskell

2006-07-05 Thread David House
On 04/07/06, Joel Reymont [EMAIL PROTECTED] wrote: Is there anyone trading with Haskell or interested in doing it? Assuming you mean professional development and not Pokemon-style card swapping, you might want to check out the 'Commercial Users' section of the HCAR [1]. [1]:

[Haskell-cafe] Re: Cyclic Type-synonyms

2006-07-05 Thread Christophe Poucet
Addendum: (18:19:50) vincenz: anyways the haskell-cafe post is orthogonal to this safety issue (18:20:46) vincenz: it's about the inability to use a generic annotation data-type with any generic indirect composite ADT without introducing a third data constructor if one wants recursion (18:21:33)

Re: [Haskell-cafe] Haskell as embedded DSL

2006-07-05 Thread Emil Axelsson
Joel Reymont skrev: On Jul 5, 2006, at 3:07 PM, Niklas Broberg wrote: Lava: http://www.cs.chalmers.se/~koen/Lava/ Excellent example, thank you Niklas! Are you using QuickCheck for verification? I assume you're asking if Lava (rather than Niklas) uses QuickCheck. In Lava, you write

[Haskell-cafe] Re: Packages and modules

2006-07-05 Thread Brian Hulley
Simon Peyton-Jones wrote: So instead of just taking this simple solution, the wiki proposal is instead destroying the beauty of the per-package namespace idea by incorporating into it the existing shared namespaces with their attendant problems, instead of just letting the existing messy system

[Haskell-cafe] Darcs-synchronisation tool

2006-07-05 Thread Christophe Poucet
Hello,I typically back up my darcs repositories on different computers. However I do always use the same structure for the different forests of darcs repositories. Lately my laptop charger has died which has led me to constantly use a usbstick to move these repositories. Therefore I have started

Re: [Haskell-cafe] Re: New Benchmark Under Review: Magic Squares

2006-07-05 Thread Daniel Fischer
Am Mittwoch, 5. Juli 2006 15:50 schrieb Simon Marlow: Malcolm Wallace wrote: Daniel Fischer [EMAIL PROTECTED] wrote: Cool, though the problem of exploding runtime remains, it's only pushed a little further. Now I get a 5x5 magig square in 1 s, a 6x6 in 5.4 s, but 7x7 segfaulted after about

[Haskell-cafe] Re: Trading with Haskell

2006-07-05 Thread Ashley Yakeley
Joel Reymont wrote: Is there anyone trading with Haskell or interested in doing it? Trading financial instruments? You might be interested in the SPJ/Eber/Seward paper Composing contracts: http://research.microsoft.com/~simonpj/Papers/financial-contracts/contracts-icfp.htm and also Lexifi,

[Haskell-cafe] Windows Haskell GUI

2006-07-05 Thread Neil Mitchell
Hi, I want to develop a GUI using Haskell on Windows. As far as I can tell the options for a reasonably high level GUI toolkit are: * wxHaskell * Gtk2Hs Unfortunately I cannot find released packages for GHC 6.4.2 for either of them - Gtk supports only 6.4.1 and wx supports only 6.4.0. Does

Re: [Haskell-cafe] Windows Haskell GUI

2006-07-05 Thread Jason Dagit
I was able to build wxHaskell for ghc 6.5 that ships with VisualHaskell and I'd say it's worth the little bit of extra work. I followed the build instructions on the wxHaskell website plus a few modifications that you can find in this thread:

Re: [Haskell-cafe] Re: Trading with Haskell

2006-07-05 Thread Joel Reymont
On Jul 5, 2006, at 11:56 PM, Ashley Yakeley wrote: Trading financial instruments? You might be interested in the SPJ/ Eber/Seward paper Composing contracts: http://research.microsoft.com/~simonpj/Papers/financial-contracts/ contracts-icfp.htm Yes, that paper and an hour or so on the phone

Re: [Haskell-cafe] New Benchmark Under Review: Magic Squares

2006-07-05 Thread Daniel Fischer
Am Mittwoch, 5. Juli 2006 21:28 schrieben Sie: Hi Daniel, In the paragraph below it looks like you improved the performance of 5x5 from one and one half hours to one second. Is that a typo or should I be very, very impressed. :-) Cheers, David Err, neither, really. Apparently, I haven't

Re: [Haskell-cafe] Windows Haskell GUI

2006-07-05 Thread Duncan Coutts
On Wed, 2006-07-05 at 16:06 -0700, Jason Dagit wrote: I can't help with gtk2hs as I haven't tried it yet, but I hear the dev community is much more alive and very helpful. My main concerns with gtk2hs were 1) I need a native look 'n feel This is a common misconception. Gtk+ uses the windows

Re: [Haskell-cafe] Windows Haskell GUI

2006-07-05 Thread Jason Dagit
On 7/5/06, Duncan Coutts [EMAIL PROTECTED] wrote: On Wed, 2006-07-05 at 16:06 -0700, Jason Dagit wrote: I can't help with gtk2hs as I haven't tried it yet, but I hear the dev community is much more alive and very helpful. My main concerns with gtk2hs were 1) I need a native look 'n feel

Re: [Haskell-cafe] Windows Haskell GUI

2006-07-05 Thread shelarcy
On Thu, 06 Jul 2006 07:56:49 +0900, Neil Mitchell [EMAIL PROTECTED] wrote: I want to develop a GUI using Haskell on Windows. As far as I can tell the options for a reasonably high level GUI toolkit are: * wxHaskell * Gtk2Hs Unfortunately I cannot find released packages for GHC 6.4.2 for

Re: [Haskell-cafe] Re: Packages and modules

2006-07-05 Thread John Meacham
Package names should never appear in source files IMHO. if a package name is in the source file, then you might as well make it part of the module name. packages exist for 'meta-organization' of code. A way to deal with mapping code _outside_ of the language itself, putting packages inside the