[Haskell-cafe] Parsing problem

2008-06-26 Thread Eric
Hi all, I'm using the Parsec library to parse the following grammar expr = atom+ atom = integer | var | (expr) The input to the parser is a list of (Token, SourcePos). I have the following code for atom: atom = try variable <|> try integerr <|> do{sat(== Reserved "("); (e,pos) <- expre

Re: [Haskell-cafe] history of tuples vs pairs

2008-06-26 Thread Isaac Dupree
Lennart Augustsson wrote: Yes, early ML had nested pairs. We introduced n-tuples in Lazy ML because in a lazy language n-tuples are not isomorphic to nested pairs (whereas they are in a strict language). So n-tuples are nasty because they are not inductive, but they are in many ways much more r

[Haskell-cafe] Stupid question about Cabal file

2008-06-26 Thread Fernand
Hi, Excuse me in advance if this is a trivial question, but I have been unable to find (understand?) the answer in Cabal's documentation. My issue is simple : I build a Cabal package named, let's say, "foo". That package is a library (libHSfoo.a, something like that), which exposes its Foo.Bar

Re: [Haskell-cafe] ghc-HEAD: build succeeds, but install fails with linker errors?

2008-06-26 Thread Gwern Branwen
On 2008.06.26 03:00:27 -0400, Reid Barton <[EMAIL PROTECTED]> scribbled 1.4K characters: > I'm trying to install GHC from the darcs repository for the first > time, so I'm hoping someone here can tell me if I'm doing something > wrong before I bother cvs-ghc. > > I'm currently running ghc 6.8.2 on

Re: [Haskell-cafe] Stupid question about Cabal file

2008-06-26 Thread Daniel Fischer
Am Donnerstag, 26. Juni 2008 14:01 schrieb Fernand: > Hi, > > Excuse me in advance if this is a trivial question, but I have been > unable to find (understand?) the answer in Cabal's documentation. > My issue is simple : I build a Cabal package named, let's say, "foo". > That package is a library (

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-26 Thread Henning Thielemann
On Thu, 26 Jun 2008, Alistair Bayley wrote: Try this version of configOracle in Setup.hs: configOracle verbose buildtools = do if not (sqlplusProgram `isElem` buildtools) then return Nothing else do path <- getEnv "ORACLE_HOME" info verbose ("Using Oracle: " ++ path) make

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-26 Thread Alistair Bayley
> Now I can start GHCi with the example program you gave me. However I have to > start with -lclntsh, otherwise symbol OCIEnvCreate cannot by found. > I thought I do not need this option, because the installed Takusen package > contains the library name: > > $ grep clntsh dist/installed-pkg-config

Re: [Haskell-cafe] Stupid question about Cabal file

2008-06-26 Thread Fernand
Daniel Fischer пишет: Did you create your package using Cabal, i.e. have a module Setup.(l)hs in the same directory as the .cabal file and then runhaskell Setup.hs configure --prefix=WhereYouWantIt runhaskell Setup.hs build runhaskell Setup.hs haddock (optionally) runhaskell Setup.hs install ?

Re: [Haskell-cafe] Stupid question about Cabal file

2008-06-26 Thread Daniel Fischer
Am Donnerstag, 26. Juni 2008 14:56 schrieb Fernand: > Daniel Fischer пишет: > > Did you create your package using Cabal, i.e. have a module Setup.(l)hs > > in the same directory as the .cabal file and then > > > > runhaskell Setup.hs configure --prefix=WhereYouWantIt > > runhaskell Setup.hs build >

Re: [Haskell-cafe] Stupid question about Cabal file

2008-06-26 Thread Fernand
I had a look at the Distribution.Make import, which may be the answer. Thank you for pointing the GHC documentation : I found a way to have the build process work, but after having patched my local package.conf file by hand, and installed manually the interfaces files accordingly. I now just ne

Re: [Haskell-cafe] Parsing problem

2008-06-26 Thread Daniel Fischer
Am Donnerstag, 26. Juni 2008 12:40 schrieb Eric: > Hi all, > > I'm using the Parsec library to parse the following grammar > > expr = atom+ > atom = integer | var | (expr) > > The input to the parser is a list of (Token, SourcePos). I have the > following code for atom: > > atom > = try variable

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-26 Thread Henning Thielemann
On Thu, 26 Jun 2008, Alistair Bayley wrote: Yes, puzzling. I don't know why you need to say -lclntsh, because that's the point of all of this Setup shenanigans: to get things set up so that ghci works nicely. That's why we have flags that expose/hide modules in the API: ghci has a custom linke

[Haskell-cafe] hxt and pickler combinations

2008-06-26 Thread Andrea Rossato
Hello, I'm using HXT for writing a Citation Style Language (http://xbiblio.sourceforge.net) implementation in Haskell and I'm trying to use the hxt pickler library to parse XML data contained in elements that can be interleaved, that is to say, elements that can appear in any order within other el

Re: Haskell on ARM (was Re: [Haskell-cafe] ANN: Topkata)

2008-06-26 Thread Ian Lynagh
On Tue, Jun 24, 2008 at 11:27:03AM -0700, Jeremy Shaw wrote: > > The unregisterised build is not that useful because: > > 1. no FFI If libffi supports it then this should now work. > 1. add ARM support to the evil mangler (basically, a few regexps to > strip prolog and epilogue stuff from th

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-26 Thread Henning Thielemann
On Wed, 25 Jun 2008, John Goerzen wrote: Henning Thielemann wrote: On Wed, 25 Jun 2008, John Goerzen wrote: I haven't read this entire thread, but I might also just interject here that HDBC supports ODBC (on Windows, and on Linux/Posix platforms via unixODBC, iODBC, or similar), which may be

Re: [Haskell-cafe] Haskell, Microsoft, and interview questions

2008-06-26 Thread Andrew Wagner
> Did they score you on coding or on geometry? > It was definitely more on coding and my ability to think about the problem. > For what it's worth, a 3-dimensional kd tree really flew on this problem. > I did some reading up on this, and it seems interesting. It would be need to implement someth

[Haskell-cafe] Call Graph Tool?

2008-06-26 Thread C.M.Brown
Hi, I have approx. 100+ source files and I was wondering if anyone has a tool that would let me see a visual call graph for the source files; i.e. a visual hierarchy of which module is imported by what, and so forth. Kind regards, Chris. ___ Haskell-Caf

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-26 Thread John Goerzen
Henning Thielemann wrote: > On Wed, 25 Jun 2008, John Goerzen wrote: > > $ iodbctest NMR2 > iODBC Demonstration program > This program shows an interactive SQL processor > Driver Manager: 03.52.0607.1008 > 1: SQLDriverConnect = [iODBC][Driver > Manager]/usr/lib/oracle/10.2.0.4/client/lib/libsqora

Re: [Haskell-cafe] ghc-HEAD: build succeeds, but install fails with linker errors?

2008-06-26 Thread Ian Lynagh
On Thu, Jun 26, 2008 at 03:00:27AM -0400, Reid Barton wrote: > > but during the "make install" step I get the error "make install" is probably broken at the moment. You should be able to use it in-place, though (run compiler/stage2/ghc-inplace). Thanks Ian _

Re: [Haskell-cafe] Call Graph Tool?

2008-06-26 Thread Claus Reinke
I have approx. 100+ source files and I was wondering if anyone has a tool that would let me see a visual call graph for the source files; i.e. a visual hierarchy of which module is imported by what, and so forth. Hi Chris, Programatica used to have such a thing for the module graph (tools/base/

Re: [Haskell-cafe] Parsing problem

2008-06-26 Thread Eric
Daniel Fischer wrote: Am Donnerstag, 26. Juni 2008 12:40 schrieb Eric: What does the tokeniser return? I would have to see more of the code to diagnose it. Here is the code for the tokenizer: type Scanner a = GenParser Char () a data Token = INum Integer | FNum Double | Varid Stri

Re: [Haskell-cafe] Parsing problem

2008-06-26 Thread Eric
Eric wrote: Daniel Fischer wrote: Am Donnerstag, 26. Juni 2008 12:40 schrieb Eric: What does the tokeniser return? I would have to see more of the code to diagnose it. Thunderbird mangled my code. I've attached it as a pdf file. E. H0help.pdf Description: Adobe PDF document ___

[Haskell-cafe] Internet Communications Engine and Haskell

2008-06-26 Thread Mitar
Hi! Has been any work on implementing Internet Communications Engine in Haskell already done? Any other suggestions how could I use ICE in Haskell? Through FFI calls to its C++ version? http://www.zeroc.com/ice.html Mitar ___ Haskell-Cafe mailing list

[Haskell-cafe] haskell and dockapps

2008-06-26 Thread Martin DeMello
Anyone written a windowmaker dockapp in Haskell? I thought it'd be a fun project, but I don't quite know where to start. martin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] hxt and pickler combinations

2008-06-26 Thread Andrea Rossato
On Thu, Jun 26, 2008 at 04:11:58PM +0200, Andrea Rossato wrote: > Hello, > > I'm using HXT for writing a Citation Style Language > (http://xbiblio.sourceforge.net) implementation in Haskell and I'm > trying to use the hxt pickler library to parse XML data contained in > elements that can be interl

Re: [Haskell-cafe] haskell and dockapps

2008-06-26 Thread Don Stewart
martindemello: > Anyone written a windowmaker dockapp in Haskell? I thought it'd be a > fun project, but I don't quite know where to start. > Might be fun to take hsclock, the gtk/cairo based clock, http://haskell.org/gtk2hs/archives/2006/01/26/cairo-eye-candy/ and turn it into a beautiful

Re: [Haskell-cafe] Internet Communications Engine and Haskell

2008-06-26 Thread Don Stewart
mmitar: > Hi! > > Has been any work on implementing Internet Communications Engine in > Haskell already done? Any other suggestions how could I use ICE in > Haskell? Through FFI calls to its C++ version? > > http://www.zeroc.com/ice.html I think FFI would be the cheapest solution. There's likely

Re: [Haskell-cafe] haskell and dockapps

2008-06-26 Thread Martin DeMello
On Thu, Jun 26, 2008 at 10:31 AM, Don Stewart <[EMAIL PROTECTED]> wrote: > martindemello: >> Anyone written a windowmaker dockapp in Haskell? I thought it'd be a >> fun project, but I don't quite know where to start. >> > > Might be fun to take hsclock, the gtk/cairo based clock, > >http://hask

Re: [Haskell-cafe] Haskell, Microsoft, and interview questions

2008-06-26 Thread Sebastian Sylvan
On 6/26/08, Andrew Wagner <[EMAIL PROTECTED]> wrote: > > > Did they score you on coding or on geometry? > > > > > It was definitely more on coding and my ability to think about the problem. > > > > For what it's worth, a 3-dimensional kd tree really flew on this problem. > > > > > I did some readin

Re: [Haskell-cafe] Re: Haskell on ARM (was Re: ANN: Topkata)

2008-06-26 Thread Jeremy Shaw
At Tue, 24 Jun 2008 20:43:45 -0400, Braden Shepherdson wrote: > I recently acquired the ARM-based Nokia N810 (and <3 it), powered by > Maemo. Running a uname -a on it: > I might be one to attempt this, as I know C and ARM-ish asm decently > well and have a powerful desktop to compile on. I have

Re: [Haskell-cafe] Parsing problem

2008-06-26 Thread Daniel Fischer
Am Donnerstag, 26. Juni 2008 12:40 schrieb Eric: > Hi all, > > I'm using the Parsec library to parse the following grammar > > expr = atom+ > atom = integer | var | (expr) > > The input to the parser is a list of (Token, SourcePos). I have the > following code for atom: > > atom > = try variable

Re: [Haskell-cafe] Parsing problem

2008-06-26 Thread Daniel Fischer
Am Donnerstag, 26. Juni 2008 23:22 schrieb Eric: > Daniel Fischer wrote: > > Can't be exactly that, though because then removing sat (== Reserved ")") > > shouldn't help. > > Anyway, I need at least the failure message, better the complete code, to > > diagnose. > > I've attached the complete code.

Re: [Haskell-cafe] Haskell, Microsoft, and interview questions

2008-06-26 Thread Richard A. O'Keefe
On 27 Jun 2008, at 3:11 am, Andrew Wagner wrote: For what it's worth, a 3-dimensional kd tree really flew on this problem. I did some reading up on this, and it seems interesting. It would be need to implement something like this in Haskell, but I can't seem to find any detailed specs on the

Re: [Haskell-cafe] Haskell, Microsoft, and interview questions

2008-06-26 Thread Adam Langley
On Thu, Jun 26, 2008 at 8:11 AM, Andrew Wagner <[EMAIL PROTECTED]> wrote: > I did some reading up on this, and it seems interesting. It would be > need to implement something like this in Haskell, but I can't seem to > find any detailed specs on the data-structure. Got any > recommendations? Speci

[Haskell-cafe] Re: Haskell on ARM (was Re: ANN: Topkata)

2008-06-26 Thread Jeremy Apthorp
2008/6/25 Braden Shepherdson <[EMAIL PROTECTED]>: > Jeremy Shaw wrote: >> >> If any does attempt to build for the ARM, please, please, please, >> document what you do in the wiki. And, if you do, edit the wiki as you >> go, you definitely won't be able to remember what you did after the >> fact. (O

[Haskell-cafe] Re: Call Graph Tool?

2008-06-26 Thread Ivan Miljenovic
C.M.Brown kent.ac.uk> writes: > I have approx. 100+ source files and I was wondering if anyone has a tool > that would let me see a visual call graph for the source files; i.e. a > visual hierarchy of which module is imported by what, and so forth. For my maths honours thesis, I'll be writing a t

Re: [Haskell-cafe] Haskell, Microsoft, and interview questions

2008-06-26 Thread Richard A. O'Keefe
On 27 Jun 2008, at 11:36 am, Adam Langley wrote: Specialised for 2d only, but: http://www.imperialviolet.org/binary/NearestNeighbour2D.hs In my C code for this, specialised to 3D, - dimension numbers were never stored - no arrays were used - the "search in x" function called the "search

Re: [Haskell-cafe] Re: Call Graph Tool?

2008-06-26 Thread Jeremy Apthorp
2008/6/27 Ivan Miljenovic <[EMAIL PROTECTED]>: > C.M.Brown kent.ac.uk> writes: >> I have approx. 100+ source files and I was wondering if anyone has a tool >> that would let me see a visual call graph for the source files; i.e. a >> visual hierarchy of which module is imported by what, and so fort

Re: [Haskell-cafe] Re: Call Graph Tool?

2008-06-26 Thread Ivan Lazar Miljenovic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 27 Jun 2008 15:18:45 +1000 "Jeremy Apthorp" <[EMAIL PROTECTED]> wrote: > 2008/6/27 Ivan Miljenovic <[EMAIL PROTECTED]>: > > C.M.Brown kent.ac.uk> writes: > >> I have approx. 100+ source files and I was wondering if anyone has a tool > >> that