Re: [Haskell-cafe] Linker problems linking FFI import call in Windows

2008-07-15 Thread Olivier Boudry
On Tue, Jul 15, 2008 at 11:51 PM, PJ Durai <[EMAIL PROTECTED]> wrote: > I am trying to import some functions from a windows DLL. I am getting > strange errors. (This used to work with previous versions of GHC. 6.6 > I think.). You may have to create an import library for the DLL. I had a similar

[Haskell-cafe] Euler 201 performance mystery

2008-07-15 Thread nadine . and . henry
Dear Group, I've spend the last few days figuring out the solution to Euler Problem 201 in haskell. I first tried a relatively elegant approach based on Data.Map but the performance was horrible. I never actually arrived at the answer. I then rewrote the same algorithm using STUArrays and it w

Re: [Haskell-cafe] Getting latest GHC-head/libraries takes forever

2008-07-15 Thread Duncan Coutts
On Tue, 2008-07-15 at 19:45 -0500, Austin Seipp wrote: > For the purpose of experimenting with NDP I went through the > process of getting the GHC head from darcs.haskell.org. As > specified in the developer wiki[1], using darcs get is basically > not possible because there're so many patches. So

Re: [Haskell-cafe] Getting latest GHC-head/libraries takes forever

2008-07-15 Thread Brandon S. Allbery KF8NH
On 2008 Jul 15, at 20:45, Austin Seipp wrote: For the purpose of experimenting with NDP I went through the process of getting the GHC head from darcs.haskell.org. As specified in the developer wiki[1], using darcs get is basically not possible because there're so many patches. So I downloaded

[Haskell-cafe] Getting latest GHC-head/libraries takes forever

2008-07-15 Thread Austin Seipp
For the purpose of experimenting with NDP I went through the process of getting the GHC head from darcs.haskell.org. As specified in the developer wiki[1], using darcs get is basically not possible because there're so many patches. So I downloaded http://darcs.haskell.org/ghc-HEAD-2008-06-06-ghc-

Re: [Haskell-cafe] Mutually recursive modules and google protocol-buffers

2008-07-15 Thread Jason Dusek
John Meacham <[EMAIL PROTECTED]> wrote: > Chris Kuklewicz wrote: > > I have reached an impasse in designing a Haskell API for the > > google's The messages in protobuf are defined in a namespace > > that nests in the usual hierarchical OO style that Java > > encourages. > > > To avoid namespace con

Re: [Haskell-cafe] Can't get Haddock 2.0 anchor reference to work

2008-07-15 Thread Gwern Branwen
On 2008.07.15 13:59:32 -0700, Mike Gunter <[EMAIL PROTECTED]> scribbled 0.2K characters: > > How are anchor references in Haddock supposed to work? > > When I use "Dir.Mod#foo", the resulting HTML contains: > > instead of the more desirable: > > > User error or bug? > > thanks, > -m For w

[Haskell-cafe] Linker problems linking FFI import call in Windows

2008-07-15 Thread PJ Durai
Greetings I am trying to import some functions from a windows DLL. I am getting strange errors. (This used to work with previous versions of GHC. 6.6 I think.). This is my import statement: foreign import stdcall "ace.h AdsConnect" adsConnect' :: CString -> Ptr CInt -> IO CInt This is the bui

Re: [Haskell-cafe] Mutually recursive modules and google protocol-buffers

2008-07-15 Thread John Meacham
On Tue, Jul 15, 2008 at 12:21:16PM +0100, Chris Kuklewicz wrote: > I have reached an impasse in designing a Haskell API for the google's > The messages in protobuf are defined in a namespace that nests in the usual > hierarchical OO style that Java encourages. > > To avoid namespace conflicts, I ma

[Haskell-cafe] Can't get Haddock 2.0 anchor reference to work

2008-07-15 Thread Mike Gunter
How are anchor references in Haddock supposed to work? When I use "Dir.Mod#foo", the resulting HTML contains: instead of the more desirable: User error or bug? thanks, -m ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskel

Re: [Haskell-cafe] CAL (OpenQuark) and enterprise

2008-07-15 Thread Daniil Elovkov
fero wrote: And what if writing new application? Has anybody experience with enterprise application in functional language? Is it really clearer? I can see a advantage in using Scala but it doesn't have some features from Haskell or CAL or requires more code to write. Or better has anybody experi

Re: [Haskell-cafe] CAL (OpenQuark) and enterprise

2008-07-15 Thread fero
And what if writing new application? Has anybody experience with enterprise application in functional language? Is it really clearer? I can see a advantage in using Scala but it doesn't have some features from Haskell or CAL or requires more code to write. Or better has anybody experience with the

Re: [Haskell-cafe] Remote control of firefox through Haskell?

2008-07-15 Thread Jefferson Heard
Thanks, Rahul, Don. These work... ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Remote control of firefox through Haskell?

2008-07-15 Thread Don Stewart
jefferson.r.heard: > Is there a library out there that will allow me to remote-control the > firefox or mozilla browsers, e.g. change the current page, open a new > tab? Yeah, use the haskell selenium bindings, on hackage.haskell.org --- Don ___ Haskell

Re: [Haskell-cafe] Remote control of firefox through Haskell?

2008-07-15 Thread Rahul Kapoor
Selenium (http://selenium.openqa.org/) might do what you want. The bindings were announced on this list a little while ago (http://tinyurl.com/se-bindings) On Tue, Jul 15, 2008 at 3:12 PM, Jefferson Heard <[EMAIL PROTECTED]> wrote: > Is there a library out there that will allow me to remote-contro

[Haskell-cafe] Remote control of firefox through Haskell?

2008-07-15 Thread Jefferson Heard
Is there a library out there that will allow me to remote-control the firefox or mozilla browsers, e.g. change the current page, open a new tab? -- I try to take things like a crow; war and chaos don't always ruin a picnic, they just mean you have to be careful what you swallow. -- Jessica Edwar

Re: [Haskell-cafe] Mutually recursive modules and google protocol-buffers

2008-07-15 Thread Stuart Cook
On Wed, Jul 16, 2008 at 12:54 AM, Henning Thielemann <[EMAIL PROTECTED]> wrote: > Sooner or later you want generalize your datatypes. Then you can define > data A b = A b > and you do not need to import B any longer. I do not know if this is a > generally applicable approach, but it helped me in

Re: [Haskell-cafe] Mutually recursive modules and google protocol-buffers

2008-07-15 Thread Sterling Clover
What about generating the verbose accessor/single module code, and then creating a hierarchical module space as well, all importing your Base module, and reexporting the data types you want as well as less verbosely named accessor functions? Of course, this will break record update syntax,

Re: [Haskell-cafe] Mutually recursive modules and google protocol-buffers

2008-07-15 Thread Roberto Zunino
Chris Kuklewicz wrote: There is no way to create a "A.hs-boot" file that has all of (1) Allows A.hs-boot to be compiled without compiling B.hs first (2) Allows B.hs (with a {-# SOURCE #-} pragma) to be compiled after A.hs-boot (3) Allows A.hs to compiled after A.hs-boot with a consistent

Re: [Haskell-cafe] Mutually recursive modules and google protocol-buffers

2008-07-15 Thread Henning Thielemann
On Tue, 15 Jul 2008, Chris Kuklewicz wrote: Consider these 3 files: A.hs: module A(A) where import B(B) data A = A B B.hs module B(B) where import A(A) data B = B A Main.hs module Main where import A import B main = return () Sooner or later you want generalize your datatypes. Then y

[Haskell-cafe] Re: ANN: haskell-src-exts 0.3.5

2008-07-15 Thread ChrisK
Thanks for the fix. I have gotten the darcs version and I am compiling... Niklas Broberg wrote: Hi all, I'm pleased to report that haskell-src-exts is now updated to understand Template Haskell syntax (it used to understand pre-6.4 TH, but now it works with the current version). At least I hop

Re: [Haskell-cafe] Mutually recursive modules and google protocol-buffers

2008-07-15 Thread Chris Kuklewicz
Ah, a teachable moment. One of us is not entirely correct about what GHC can do with this example. Hopefully I am wrong, but my experiments... Max Bolingbroke wrote: And there is no way ghc can compile these in separate modules. I may be being redundant here, but you may not know that GHC a

Re: [Haskell-cafe] Type level sets with GADTs, fundeps etc

2008-07-15 Thread Jeff Polakow
Hello, > data LSet t where > Nil :: LSet Nil > Ins :: (Member a t b > , If b t (a ::: t) r) > => L a -> LSet t -> LSet r > Try replacing both original occurrences of r, i.e. (untested) Ins :: (Member a t b, If b t (a ::: t) (LSet r)) => L a -> LSet t -> LSet r

Re: [Haskell-cafe] Type level sets with GADTs, fundeps etc

2008-07-15 Thread J . Burton
At Tue, 15 Jul 2008 10:02:23 -0400, Jeff Polakow wrote: [...] > > > Type classes are open so there is nothing to prevent you from adding another > instance for If, perhaps in a different module, which returns some arbitrary > type. I see what you mean...so I tried to make Ins return an LSet of "so

Re: [Haskell-cafe] Type level sets with GADTs, fundeps etc

2008-07-15 Thread Jeff Polakow
Hello, > > > data LSet t where > > > Nil :: LSet Nil > > > --either add the new element or do nothing > > > Ins :: (Member a t b > > > , If b (LSet t) (LSet (a ::: t)) r) > > > => L a -> LSet t -> r > > > > > The constructor Ins needs to return an LSet. Maybe try re

Re: [Haskell-cafe] Type level sets with GADTs, fundeps etc

2008-07-15 Thread J . Burton
At Tue, 15 Jul 2008 09:43:40 -0400, Jeff Polakow wrote: > Hello, Hi Jeff, > > > data LSet t where > > Nil :: LSet Nil > > --either add the new element or do nothing > > Ins :: (Member a t b > > , If b (LSet t) (LSet (a ::: t)) r) > > => L a -> LSet t -> r > > > Th

Re: [Haskell-cafe] Type level sets with GADTs, fundeps etc

2008-07-15 Thread Jeff Polakow
Hello, > data LSet t where > Nil :: LSet Nil > --either add the new element or do nothing > Ins :: (Member a t b > , If b (LSet t) (LSet (a ::: t)) r) > => L a -> LSet t -> r > The constructor Ins needs to return an LSet. Maybe try replacing occurrences of r with

[Haskell-cafe] Type level sets with GADTs, fundeps etc

2008-07-15 Thread J . Burton
I have a problem with applying a type constraint in the constructor of a GADT...I wrote some type level code for sets using empty types and fundeps, along the lines of Conrad Parker's Instant Insanity and Oleg's Lightweight Static Resources. At this level things works OK so I have empty types A

Re: [Haskell-cafe] Mutually recursive modules and google protocol-buffers

2008-07-15 Thread Max Bolingbroke
> And there is no way ghc can compile these in separate modules. I may be being redundant here, but you may not know that GHC actually can compile mutually recursive modules. See http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html#mutual-recursion . Of course, this is

[Haskell-cafe] Mutually recursive modules and google protocol-buffers

2008-07-15 Thread Chris Kuklewicz
I have reached an impasse in designing a Haskell API for the google's protocol-buffers data language / format. ( http://code.google.com/apis/protocolbuffers/docs/overview.html ) The messages in protobuf are defined in a namespace that nests in the usual hierarchical OO style that Java encourages.