Re: [Haskell-cafe] parser

2007-12-06 Thread Thomas Hartman
you need to write a parser. Parser is a popular library on hackage that should do what you want. (I have never used it though.) Or read http://citeseer.ist.psu.edu/50754.html and adopt the code from there to your purposes. I found this paper extremely helpful when I needed to build a

[Haskell-cafe] regex package for yhc?

2007-12-06 Thread Thomas Hartman
Is there some way to use any of the various regex packages on hackage via yhc? Has anyone installed one them successfully? I'd like regex-tdfa, but would settle for regex-posix, or really, anything that brings the convenience of regex to yhc. In general, is there a straightforward way to

[Haskell-cafe] how to compile this in yhc?

2007-12-06 Thread Thomas Hartman
Is there some way to compile the following function in yhc? works in ghc with glasgow exts deactivated, yhc complains context for Prelude.read needed (in final line) readfloat :: String - Maybe Float readfloat x | null parse || not (null leftover) = fail $ myRead: ++x | otherwise =

Re: [Haskell-cafe] An interesting monad: Prompt

2007-12-04 Thread Thomas Hartman
Thank you! I really appreciate your explanation, and I hope this will enable me to do some interesting and usefull stuff, in addition to firming up my understanding of some of the more advanced haskell type system features. MACID is a sort of RDBMS replacement used as a backend by the HAppS web

Re: [Haskell-cafe] isSpace

2007-12-04 Thread Thomas Hartman
look at the examples of dropWhile usage you got from the first result when you get when you google on dropWhile. t. 2007/12/4, Ryan Bloor [EMAIL PROTECTED]: HI I will try and explain it better. I am meaning to write a function that takes a string, apple and eliminates the spaces at

Re: [Haskell-cafe] An interesting monad: Prompt

2007-12-03 Thread Thomas Hartman
I've been playing with MonadPrompt for about ten days now, trying to get it to do something useful for me. Specifically, I'm trying to implement guess a number since that's the hello world of haskell state programs, or so it seems to me. I want to have this with scripting / replay / undo and

Fw: [Haskell-cafe] Re: do

2007-12-03 Thread Thomas Hartman
It took me forever to get comfortable with monads. I think it helps if you've seen continuations, or done FP before, or a variety of things that build familiarity. But probably the only thing that I think will work for the masses of plodders (there are always a few stars to crash the curve) is

Re: [Haskell-cafe] Progress indications

2007-11-29 Thread Thomas Hartman
@haskell.org cc Subject Re: [Haskell-cafe] Progress indications On Wed, Nov 28, 2007 at 05:58:07PM -0500, Thomas Hartman wrote: maybe Debug.Trace? like... import Debug.Trace t = foldr debugf 0 [1..1] f :: Int - Int - Int f = (+) -- same typesig as f debugf :: Int - Int - Int debugf

Re: [Haskell-cafe] Re: Strings and utf-8

2007-11-29 Thread Thomas Hartman
A translation of http://www.ahinea.com/en/tech/perl-unicode-struggle.html from perl to haskell would be a very useful piece of documentation, I think. That explanation really helped me get to grips with the encoding stuff, in a perl context. thomas. Duncan Coutts [EMAIL PROTECTED] Sent

Re: [Haskell-cafe] Progress indications

2007-11-29 Thread Thomas Hartman
] ) monitorprogress f xs = map g $ zip [1..] xs where g (i,a) | f i == True = trace (show i) a | otherwise = a f x | x `mod` 1000 == 0 = True | otherwise = False Thomas Hartman/ext/[EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 11/29/2007 10:43 AM To haskell-cafe@haskell.org

Re: [Haskell-cafe] Progress indications

2007-11-29 Thread Thomas Hartman
but there's no risk using trace is there? t. The unsafe... functions are called that for a reason, and their use should be highly discouraged, except in cases where there is absolutely no other reasonable way. Yitzchak Gale [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 11/29/2007 05:01 PM

Re: [Haskell-cafe] RFI: HDBC-1.1.3 build error

2007-11-28 Thread Thomas Hartman
put {-# OPTIONS_GHC -fglasgow-exts #-} at the the top of the file that complains. Jim Stuttard [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 11/28/2007 08:06 AM Please respond to [EMAIL PROTECTED] To Haskell-Cafe@haskell.org cc Subject [Haskell-cafe] RFI: HDBC-1.1.3 build error

Re: [Haskell-cafe] New demo/test program for Yhc Javascript backend

2007-11-26 Thread Thomas Hartman
It would be really helpful if you could include this (and other) examples in an /examples directory under src/translator/js in the yhc darcs distribution, with working makefiles that validate against the buildbot. Something seems a bit off for me, probably forgot a tilde somewheres. t.

[Haskell-cafe] getDirectoryContents still causing problems Re: problems building ycr2js (hopefully fixed)

2007-11-26 Thread Thomas Hartman
/Directory.hs src/tester/Main.hs tests/conformance98/Directory/getDirContents/Main.hs best, thomas. 2007/11/25, Dimitry Golubovsky [EMAIL PROTECTED]: Thomas, On Nov 25, 2007 5:50 PM, Thomas Hartman [EMAIL PROTECTED] wrote: Thanks Dmitri, I also had to fix an issue with System.FilePath, there's

[Haskell-cafe] Re: getDirectoryContents still causing problems Re: problems building ycr2js (hopefully fixed)

2007-11-26 Thread Thomas Hartman
it fails. Thank you. On 11/26/07, Thomas Hartman [EMAIL PROTECTED] wrote: still having problems darcs pulling your updates, related to System.FilePath. did you make clean and then make again? I darcs pulled everything. (cd src/translator/js; make all install) ... ... (cd

[Haskell-cafe] Re: getDirectoryContents still causing problems Re: problems building ycr2js (hopefully fixed)

2007-11-26 Thread Thomas Hartman
mailing list: pull patches, then do scons fullclean. Or re-check the whole repo out, which is basically the same. Thanks. On 11/26/07, Thomas Hartman [EMAIL PROTECTED] wrote: False alarm. I rm -rf ed yhhc, fresh darcs got the latest yhc, reinstalled yhc, and redid (cd src/translator

Re: [Haskell-cafe] New demo/test program for Yhc Javascript backend

2007-11-26 Thread Thomas Hartman
that I'll roll back to plain CPS. On 11/26/07, Thomas Hartman [EMAIL PROTECTED] wrote: It would be really helpful if you could include this (and other) examples in an /examples directory under src/translator/js -- Dimitry Golubovsky Anywhere on the Web

[Haskell-cafe] idea for ycr2js demo, actually meant for an in-house project. is this realistic?

2007-11-26 Thread Thomas Hartman
As I mentioned in a previous post, I've been spending quite some time trying to get live with ycr2js because there's a project it would be useful for for my day job, as well as making another nice demo to add to the list. Basically, I have some functionality that does client-side filtering of

Re: [Haskell-cafe] New demo/test program for Yhc Javascript backend

2007-11-26 Thread Thomas Hartman
Fair enough, I can wait for a couple of days. You might want to fix [EMAIL PROTECTED]:~/haskell-installs/yhc-install/yhc/src/translator/js/testdarcs whatsnew { hunk ./src/translator/js/test/Makefile 12 - $(YHC) -includes ../lib/haskell -linkcore $ + $(YHC) --includes ../lib/haskell

Re: [Haskell-cafe] problems building ycr2js

2007-11-25 Thread Thomas Hartman
the makefile. I'll also volunteer to the buildbot. FWIW, this shouldn't affect ubuntu dapper (long term support) as they still do the expected thing with sh. thomas. 2007/11/24, Brandon S. Allbery KF8NH [EMAIL PROTECTED]: On Nov 24, 2007, at 17:07 , Thomas Hartman wrote: ltag

Re: [Haskell-cafe] problems building ycr2js

2007-11-25 Thread Thomas Hartman
, version 6.8.1 [EMAIL PROTECTED]:~/haskell-installs/yhc-install/yhc/src/translator/jsghc-pkg list | grep -i filepath filepath-1.1.0.0, (ghc-6.8.1), haskell-src-1.0.1.1, 2007/11/25, Brandon S. Allbery KF8NH [EMAIL PROTECTED]: On Nov 25, 2007, at 9:45 , Thomas Hartman wrote: Feisty devs

Re: [Haskell-cafe] problems building ycr2js

2007-11-25 Thread Thomas Hartman
- return $ getDirectory $ getDirectory x +Just x - return $ dropFileName x } 2007/11/25, Thomas Hartman [EMAIL PROTECTED]: I got through this hurdle following suggestions at https://wiki.ubuntu.com/DashAsBinSh SHELL = /bin/bash at the top of the main makefile did not work, and I

Re: [Haskell-cafe] Call external program and get stdout

2007-11-24 Thread Thomas Hartman
dons did a blog post about a shell monad which I think does what you ask. http://cgi.cse.unsw.edu.au/~dons/blog/2007/03 very nice, I use it myself. t. 2007/11/22, Maurí­cio [EMAIL PROTECTED]: Hi, How can I call a program (like, for instance, 'grep text *') and get the standard output? All

[Haskell-cafe] is there a more concise way to generate helper functions for a datatype built on records?

2007-11-24 Thread Thomas Hartman
I think I'm running into more or less the same issue discussed at http://bloggablea.wordpress.com/2007/04/24/haskell-records-considered-grungy/ Just wondering if I missed anything, or if any of the ideas considering better records setter/getters have been implemented in the meantime. t.

Re: [Haskell-cafe] An interesting monad: Prompt

2007-11-24 Thread Thomas Hartman
Looks very cool. So I tried playing with this code, unfortunately couldn't get it to compile. Could you double check that what you posted compiles, and if it does, any idea what I'm doing wrong? This is with {-# OPTIONS -fglasgow-exts -fallow-undecidable-instances #-} thanks, t. Prelude :r

Re: [Haskell-cafe] An interesting monad: Prompt

2007-11-24 Thread Thomas Hartman
fwiw, if I comment those two lines around 141 out, it compiles. t. 2007/11/24, Thomas Hartman [EMAIL PROTECTED]: Looks very cool. So I tried playing with this code, unfortunately couldn't get it to compile. Could you double check that what you posted compiles, and if it does, any idea what

Re: [Haskell-cafe] An interesting monad: Prompt

2007-11-24 Thread Thomas Hartman
that did it, thanks. 2007/11/24, Brent Yorgey [EMAIL PROTECTED]: -- Just for fun, make it work with StateT as well -- (needs -fallow-undecidable-instances) instance (Monad (t m), MonadTrans t, MonadPrompt p m) = MonadPrompt p (tm) where prompt = lift . prompt Looks like

Re: [Yhc] Re: [Haskell-cafe] yhc install fails

2007-11-24 Thread Thomas Hartman
wrote: Yhc people: On Nov 21, 2007 8:46 PM, Thomas Hartman [EMAIL PROTECTED] wrote: I'm having the devil of a time getting yhc to install. http://hpaste.org/4028 or for posterity [EMAIL PROTECTED]:~/yhc-install/yhcscons ... blah blah blah... Compiling PreludeAux ( src

[Haskell-cafe] problems building ycr2js

2007-11-24 Thread Thomas Hartman
OK, I struggled through the instructions at http://haskell.org/haskellwiki/Yhc/Javascript/Users_guide#Downloading and am getting tripped up at (cd src/translator/js; make all install) any advice? ... blah blah blah ghc --make -i../../../depends/filepath splitter.hs -o

[Haskell-cafe] yhc install fails

2007-11-21 Thread Thomas Hartman
I'm having the devil of a time getting yhc to install. http://hpaste.org/4028 or for posterity [EMAIL PROTECTED]:~/yhc-install/yhcscons ... blah blah blah... Compiling PreludeAux ( src/packages/yhc-base-1.0/PreludeAux.hs ) YHC_build([src/packages/yhc-base-1.0/Foreign/Util.hbc],

Re: [Haskell-cafe] The Yampa Arcade: source code available?

2007-11-20 Thread Thomas Hartman
I was able to compile and play space invaders on linux. Hours of fun for the whole family :) thomas. Peter Verswyvelen [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 11/20/2007 06:46 AM Please respond to [EMAIL PROTECTED] To Don Stewart [EMAIL PROTECTED] cc Haskell-Cafe

[Haskell-cafe] HDBC-ODBC crashes on ghc 6.8

2007-11-19 Thread Thomas Hartman
This minimal program below fails in 6.8.1, works for 6.6.1, for up to date HDBC-ODBC-1.1.3. (I tried installing both from package and from darcs head) Installed and running from cygwin. When I run it as runghc fail.hs I get a windows popup error ghc.exe has encountered a problem and needs to

Re: [Haskell-cafe] expanded standard lib

2007-11-19 Thread Thomas Hartman
Batteries included, I could take it or leave it. Where I think hackage could really benefit from copying perl strategy is automated testing of *all* packages under hackage darcs, not just blessed packages. If this could be integrated into the buildbot of whatever ghc is under development

Re: [Haskell-cafe] expanded standard lib

2007-11-19 Thread Thomas Hartman
the php documentation has user contributed notes where people can leave sniplets of useful code as comments, eg http://www.php.net/manual/en/introduction.php I think this is a very nice feature. Henning Thielemann [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 11/19/2007 05:21 PM To Haskell

[Haskell-cafe] does the order of splice definitions matter in template haskell, or is this a bug?

2007-10-31 Thread Thomas Hartman
I have a situation where ... stuff... $(expose ['setState, 'getState] f = SetState compiles but f = SetState $(expose ['setState, 'getState] doesn't compile, with error: Not in scope: data constructor 'SetState. Is this a bug? expose is defined in HAppS.State.EventTH t,. --- This e-mail

Re: [Haskell-cafe] viewing HS files in Firefox

2007-10-29 Thread Thomas Hartman
I would love an answer to this as well. Isaac Dupree [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 10/27/2007 06:48 PM To Haskell-cafe haskell-cafe@haskell.org cc Subject [Haskell-cafe] viewing HS files in Firefox When I try to go to one of the Module.hs files, e.g. on

Re: [Haskell-cafe] List comprehension order of evaluation

2007-10-25 Thread Thomas Hartman
If I understand list comprehensions correctly, what you wrote is the same as do a - ab; b - 12; [a:[b]] which is the same as ab == \a - do b - 12; [a:[b]] which is the same as ab = \a - 12 = \b - [a:[b]] which is the same as concat $ map ( \a - 12 = \b - [a:[b]] ) ab

[Haskell-cafe] will the real quicksort please stand up? (or: sorting a million element list)

2007-10-22 Thread Thomas Hartman
It has been noted in a few places that the 2 line quicksort demo in the Introduction section of the haskell wiki http://www.haskell.org/haskellwiki/Introduction isn't a real quicksort, and wouldn't scale well with longer lists. Interested, and wanting to put my recently learned test data

Re: [Haskell-cafe] will the real quicksort please stand up? (or: sorting a million element list)

2007-10-22 Thread Thomas Hartman
another point: deforested treesort is slower. [EMAIL PROTECTED]:~/ProjectRepos/learning/quicksorttime ghc -e test treeSort' 6 quicksort 100 real4m3.615s user1m59.525s sys 0m0.587s The commented indicated that -- If you deforest this algorithm (removing the intermediate tree

Re: [Haskell-cafe] Re: Suspected stupid Haskell Question

2007-10-18 Thread Thomas Hartman
PM To Thomas Hartman/ext/[EMAIL PROTECTED] cc haskell-cafe@haskell.org, [EMAIL PROTECTED] Subject Re: [Haskell-cafe] Re: Suspected stupid Haskell Question Hmm, is insertWith' new? If I remember right, I think the stack overflows were happening because Map.insertWith isn't strict enough

Re: [Haskell-cafe] Re: Suspected stupid Haskell Question

2007-10-17 Thread Thomas Hartman
Since I'm interested in the stack overflow issue, and getting acquainted with quickcheck, I thought I would take this opportunity to compare your ordTable with some code Yitzchak Gale posted earlier, against Ham's original problem. As far as I can tell, they're the same. They work on lists up

Re: [Haskell-cafe] Help parsing dates and times

2007-10-16 Thread Thomas Hartman
dons's blog entry on parsing dates might point somewhere useful http://cgi.cse.unsw.edu.au/~dons/blog/2006/11/12#rpn-reloaded t. Don Stewart [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 10/15/2007 08:25 PM To Justin Bailey [EMAIL PROTECTED] cc Haskell-Cafe haskell-cafe@haskell.org Subject

Re: [Haskell-cafe] Equality Question

2007-10-16 Thread Thomas Hartman
not quite the same issue, but you might be interested by http://people.cs.uu.nl/stefan/blog/00012.html which notes: Prelude let apply = \f x - f x Prelude let apply' = \f - f Prelude apply undefined `seq` () () Prelude apply' undefined `seq` () *** Exception: Prelude.undefined mulling

Re: [Haskell-cafe] Equality Question

2007-10-16 Thread Thomas Hartman
a good sanity check for saneness of two fxs is to quickcheck them, as I believe I provided an example to for a previous question of yours. Though I think in this case that's impossible because, as someone else pointed out, not even the function tyes agree. t. PR Stanley [EMAIL PROTECTED]

RE: [Haskell-cafe] How to thoroughly clean up Haskell stuff on linux

2007-10-16 Thread Thomas Hartman
Indeed, I don't want to waste time but have no choice (rpm needs root), not sure if this'll help (never tried it myself) but this claims there's a non-root way to use rpm http://www.techonthenet.com/linux/build_rpm.php cheers, t. --- This e-mail may contain confidential and/or privileged

[Haskell-cafe] using quickcheck to generate test (table) data

2007-10-16 Thread Thomas Hartman
I wanted to generate some random table data, and decided to use quickcheck to do this. I didn't want to be checking properties, I actually wanted to output the examples that quickcheck came up with using arbitrary. In this case, I wanted to generate lists of lists of strings. In case this is

Re: [Haskell-cafe] more functions to evaluate

2007-10-12 Thread Thomas Hartman
how about this, for wordSize? I used quickcheck to verify that my wordSize2 is the same as yours. Actually, it's not! if you allow negative integers in the list, it's not at any rate. (falsifiable after 50 tries) I haven't thought through what this means... if your function isn't quite right,

Re: [Haskell-cafe] How to thoroughly clean up Haskell stuff on linux

2007-10-12 Thread Thomas Hartman
not trying to start a flame war here, but I had pretty good success with apt-get and ubuntu. however, I admit I never really got lambdabot to work. if you install from source you can have 6.6, 6.6.1 and 6.4 all installed at the same time. you just need to create simlinks for the old versions.

RE: [Haskell-cafe] How to thoroughly clean up Haskell stuff on linux

2007-10-12 Thread Thomas Hartman
stuff from source :) t. Lihn, Steve [EMAIL PROTECTED] 10/12/2007 05:38 PM To Thomas Hartman/ext/[EMAIL PROTECTED] cc haskell-cafe@haskell.org, [EMAIL PROTECTED] Subject RE: [Haskell-cafe] How to thoroughly clean up Haskell stuff on linux are you certain haddock depends on lambdabot

[Haskell-cafe] are some of these reverse algos better than others? is there a quick and dirty way to reveal this fact?

2007-09-22 Thread Thomas Hartman
I came up with the following functions to do reverse. The first one is obviously bad, because of the expensive list concat. The last one, myreverse, I think is the reference implementation you get in the prelude. The ones between, I'm not so sure. I suspect they're naive as the name indicates, but

Re: [Haskell-cafe] Missing Symbol (2)

2007-09-19 Thread Thomas Hartman
as provided, this won't compile because v hasn't been defined. f [] = 0 f (x:xs) = x . f xs compiles but gives f :: (Num (a - c)) = [c - c] - a - c which seems wrong. maybe I'm not understanding what v is not supposed to be. I am thinking maybe you want iterate *Main take 5 $ iterate (+1)

Re: [Haskell-cafe] Library Process (was Building production stable software in Haskell)

2007-09-18 Thread Thomas Hartman
Instead, I think several people should make their own personal list of libraries they would vouch for Ideally along with a cabal (or otherwise) install script that would set everything up in one step. Neil Mitchell [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 09/18/2007 09:02 AM To

Re: [Haskell-cafe] Re: [Haskell] (no subject)

2007-09-06 Thread Thomas Hartman
I think at some intermediate stage that flag helped me compile, but in the final version it's unnecessary. my bad. Thomas Hartman [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 09/05/2007 06:29 PM To [EMAIL PROTECTED] cc [EMAIL PROTECTED], haskell-cafe@haskell.org, Tomi Owens [EMAIL

Re: [Haskell-cafe] Re: wanted: HAppS example combining state and io

2007-09-06 Thread Thomas Hartman
+ newlinetobr x = [x] + +f =^ g = f = return . g } Martin Lütke [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 09/01/2007 07:04 PM To haskell-cafe@haskell.org cc Subject [Haskell-cafe] Re: wanted: HAppS example combining state and io Thomas Hartman thomas.hartman at db.com

Re: [Haskell-cafe] Re: [Haskell] (no subject)

2007-09-05 Thread Thomas Hartman
I think you want something like this {-# OPTIONS -fglasgow-exts #-} f :: (Integer, Float) - Integer f (a,b) = a * floor (10/b) lst :: [(Integer, Integer)] lst = [(a ^ 2 + b ^ 2, a) | a - [1..4], b - [1..4], a^2 + b^2 20, b = a] lst3 = map (f) ( map ( intTupToFloatTup ) lst )

Re: [Haskell-cafe] GHC 6.6.1 binary package for Ubuntu available?

2007-08-31 Thread Thomas Hartman
you may find this helpful. Sukit Tretriluxana [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 08/31/2007 12:19 PM To haskell-cafe@haskell.org cc Subject [Haskell-cafe] GHC 6.6.1 binary package for Ubuntu available? Hi, I am wondering if there is the binary package for GHC 6.6.1 for

Re: [Haskell-cafe] GHC 6.6.1 binary package for Ubuntu available?

2007-08-31 Thread Thomas Hartman
you may find this helpful. (with link) http://www.haskell.org/pipermail/haskell-cafe/2007-April/024137.html Sukit Tretriluxana [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 08/31/2007 12:19 PM To haskell-cafe@haskell.org cc Subject [Haskell-cafe] GHC 6.6.1 binary package for Ubuntu

Re: [Haskell-cafe] trying to install gutsy's libghc6-mtl-dev from source on feisty

2007-08-31 Thread Thomas Hartman
you may want to generate the .deb rather than take the deb that was packaged for gutsy. http://www.haskell.org/pipermail/haskell-cafe/2007-April/024137.html pupeno's guide to do this: http://pupeno.com/2006/12/17/unstable-packages-on-ubuntu/ Anatoly Yakovenko [EMAIL PROTECTED] Sent by:

Re: [Haskell-cafe] trying to install gutsy's libghc6-mtl-dev from source on feisty

2007-08-31 Thread Thomas Hartman
did you have a look at the pupeno blog link? He suggests using fakeroot apt-get source build. Not sure why the fakeroot, but perhaps it makes a difference. thomas. Anatoly Yakovenko [EMAIL PROTECTED] 08/31/2007 01:56 PM To Thomas Hartman/ext/[EMAIL PROTECTED] cc haskell-cafe@haskell.org

[Haskell-cafe] wanted: HAppS example combining state and io

2007-08-31 Thread Thomas Hartman
In the latest happs (darcs pulled, updated head is 0.9.1 iirc), I am experimenting with the example file in src/HAppS/Examples/HTTP1.hs. I would like to combine state with io. Eventually io will mean stuff like reading from a database, but for now I'm just reading a file. The example file

Re: [Haskell-cafe] darcs behind firewall

2007-08-30 Thread Thomas Hartman
If you are on linux (I'm on ubuntu) you should be able to set export http_proxy=http://proxyserver.com:1234 export https_proxy=http://proxyserver.com:123 vars, per what your sysadmin says. In my case, these are set to the same var that permits me to use firefox via the proxy, in firefox -

[Haskell-cafe] happs on ghc 6.7 won't work because of dependency on Data.Binary (everything that depends on Data.Binary broken at present) ( unknown symbol `stg_uncheckedShiftRL64' )

2007-08-30 Thread Thomas Hartman
happs on ghc 6.7 won't work because of dependency on Data.Binary, since everything that depends on Data.Binary is broken at present. This is for Data.Binary installed via cabal from darcs get --partial http://darcs.haskell.org/binary . Cabal installed without any errors, but perhaps there

[Haskell-cafe] Re: trouble compiling regex posix head (I think 0.92) on ghc 6.7

2007-08-30 Thread Thomas Hartman
: include +Include-Dirs: include/regex } Chris Kuklewicz [EMAIL PROTECTED] 08/30/2007 12:34 PM To Thomas Hartman/ext/[EMAIL PROTECTED] cc haskell-cafe@haskell.org, [EMAIL PROTECTED] [EMAIL PROTECTED] Subject Re: trouble compiling regex posix head (I think 0.92) on ghc 6.7 Thomas

Re: [Haskell-cafe] cabal install of HDBC-odbc fails on ghc 6.7, -I flag causes problems

2007-08-29 Thread Thomas Hartman
,[-D__GLASGOW_HASKELL__=606,--cflag=-I,--lflag=-lodbc,-o,dist/build/Database/HDBC/ODBC/Connection.hs,Database/HDBC/ODBC/Connection.hsc]) *** Exception: exit: ExitFailure 1 *Main Leaving GHCi. Duncan Coutts [EMAIL PROTECTED] 08/28/2007 08:08 PM To Thomas Hartman/ext/[EMAIL PROTECTED] cc haskell-cafe

Re: [Haskell-cafe] runInteractiveCommand behaves differently on linux and windows

2007-08-29 Thread Thomas Hartman
I probably should have also mentioned that the fail on windows is for me ssh-ed to that box remotely, where the sshd program is cygwin. Thomas Hartman [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 08/28/2007 06:03 PM To haskell-cafe@haskell.org cc Subject [Haskell-cafe

[Haskell-cafe] trouble compiling regex posix head (I think 0.92) on ghc 6.7

2007-08-29 Thread Thomas Hartman
I'm trying to compile regex-posix on ghc 6.7. (Ultimate goal: happs on 6.7). First, I patched by changing the cabal file to be compatible with the new libraries broken out of base. I also had to add HsRegexPosixConfig.h to include/regex (I just copied it from somewhere else on my hard drive

[Haskell-cafe] compiling happs under 6.7 (unbound implicit parameter error)

2007-08-29 Thread Thomas Hartman
After much progress and learning, I'm stuck again trying to get happs to compile under ghc 6.7. (Hoping that running happs under the new ghc debugger will help me understand it better.) I was trying to compile from the stable 8.8 version, unzipped and with just a few modifications. (see

[Haskell-cafe] runInteractiveCommand behaves differently on linux and windows

2007-08-28 Thread Thomas Hartman
Maybe this is by design, but I just thought I would point this behavior out and ask for comment. test1 merely shows that runInteractiveCommand reacts differently to perl warnings than perl errors. Okay, maybe the inconsistency in that case is due to perl and not haskell. test2 behaves the

Re: [Haskell-cafe] cabal install of HDBC-odbc fails on ghc 6.7, -I flag causes problems

2007-08-28 Thread Thomas Hartman
was: ghc -c -I dist/build/Database/HDBC/ODBC/Connection_hsc_make.c -o dist/build/Database/HDBC/ODBC/Connection_hsc_make.o *** Deleting temp files: Deleting: *** Deleting temp dirs: Deleting: Duncan Coutts [EMAIL PROTECTED] 08/22/2007 04:53 PM To Thomas Hartman/ext/[EMAIL PROTECTED] cc haskell

[Haskell-cafe] -f flag to runghc broken, or is it just me? (because trying switch elegantly between ghc 6.6 and ghc 6.7)

2007-08-22 Thread Thomas Hartman
I'm doing a lot of switching between ghc 6.6 and ghc 6.7 on the same computer. I install modules using $ runghc Setup.hs configure etc. I would like to specify which version of ghc should be getting the package installed via the f flag to runghc $

workaround found, pipe it through ghci Re: [Haskell-cafe] -f flag to runghc broken, or is it just me? (because trying switch elegantly between ghc 6.6 and ghc 6.7)

2007-08-22 Thread Thomas Hartman
Main ( arghandling-nice.hs, interpreted ) Ok, modules loaded: Main. *Main Loading package haskell98 ... linking ... done. 1 2 3 *Main Leaving GHCi. Thomas Hartman [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 08/22/2007 01:38 PM To haskell-cafe@haskell.org haskell-cafe@haskell.org cc

[Haskell-cafe] is there a way to patch the build-depends line of a cabal file without breaking backwards compatibility?

2007-08-20 Thread Thomas Hartman
cafe, is there a way to patch the build-depends line of a cabal file without breaking backwards compatibility? I just patched HDBC head to compile under ghc 6.7. Unfortunately it now won't compile in 6.6.1. is there a way for build-depends to detect which version of ghc you're on? also I

[Haskell-cafe] cabal install of HDBC-odbc fails on ghc 6.7, -I flag causes problems

2007-08-20 Thread Thomas Hartman
problemw with the -I flag to ghc are causing cabal install to fail for hdbc-odbc (darcs head). man ghc still reports that -I is a valid flag after installing ghc 6.7 from darcs head a couple days ago. I think the problem might be the space after the -I flag (which is bad for both 6.6.1 and

Re: [Haskell-cafe] can't build haxml under ghc 6.7, says HughesPJ is hidden... but ghc-pkg doesn't say it's hidden...

2007-08-20 Thread Thomas Hartman
so you get $ runghc Setup.hs configure Setup.hs: Multiple description files found. Please use only one of : [HaXml.cabal,HaXml-darcs.cabal] is there a way to specify which cabal file should be used, or do you just have to move a file out out the way with eg mv HaXml.cabal HaXml.cabal.tmp

Re: [Haskell-cafe] is there a way to patch the build-depends line of a cabal file without breaking backwards compatibility?

2007-08-20 Thread Thomas Hartman
Thomas Schilling [EMAIL PROTECTED] 08/20/2007 01:37 PM To Thomas Hartman/ext/[EMAIL PROTECTED] cc haskell-cafe haskell-cafe@haskell.org Subject Re: [Haskell-cafe] is there a way to patch the build-depends line of a cabal file without breaking backwards compatibility? On 20 aug 2007, at 18.37

Re: [Haskell-cafe] Looking at program execution

2007-08-17 Thread Thomas Hartman
[EMAIL PROTECTED]:~cat test.hs import Debug.Trace foo = foldl (\first second - (trace ( first: ++ ( show first) ) first) + (trace ( second: ++ (show second) ) second) ) 0 [1,2,3] bar = foldl (+) traceIt x = trace (\nTraceIt:\n++show x++\n) x [EMAIL PROTECTED]:~ghc -e foo test.hs first:

Re: [Haskell-cafe] Looking at program execution

2007-08-17 Thread Thomas Hartman
or actually just... [EMAIL PROTECTED]:~cat test.hs import Debug.Trace foo = foldl (\first second - trace ( ( show first) ++ (+) ++ (show second ) ) ( first + second) ) 0 [1,2,3] [EMAIL PROTECTED]:~ghc -e foo test.hs 0+1 1+2 3+3 6 [EMAIL PROTECTED]:~ is probably better Thomas Hartman

[Haskell-cafe] trouble building regex-base 0.91 on ghc 6.7

2007-08-17 Thread Thomas Hartman
I'm trying to build the latest regex base, which is required for the other regex packages under ghc 6.7 It complains that it can't find Data.Sequence, because it's in a hidden module containers. I added containers to the cabal depends as can be seen in the grep below. And containers isn't

Re: [Haskell-cafe] trouble building regex-base 0.91 on ghc 6.7

2007-08-17 Thread Thomas Hartman
PROTECTED] 08/17/2007 03:00 PM To Thomas Hartman/ext/[EMAIL PROTECTED] cc haskell-cafe haskell-cafe@haskell.org Subject Re: [Haskell-cafe] trouble building regex-base 0.91 on ghc 6.7 On Fri, Aug 17, 2007 at 02:40:33PM -0400, Thomas Hartman wrote: I'm trying to build the latest regex base, which

[Haskell-cafe] trouble compiling import GHC.Prim(MutableByteArray#, ..... (building regex-tdfa from darcs) -- what's that # sign doing?

2007-08-17 Thread Thomas Hartman
trying to compile regex-tdfa, I ran into another issue. (earlier I had a cabal problem but that's resolved.) there's a line that won't compile, neither for ghc 6.6.1 nor 6.7 import GHC.Prim(MutableByteArray#,RealWorld,Int#,sizeofMutableByteArray#,unsafeCoerce#) so the fresh darcs regex tdfa

Re: [Haskell-cafe] trouble compiling import GHC.Prim(MutableByteArray#, ..... (building regex-tdfa from darcs) -- what's that # sign doing?

2007-08-17 Thread Thomas Hartman
, bytestring } Stefan O'Rear [EMAIL PROTECTED] 08/17/2007 04:47 PM To Thomas Hartman/ext/[EMAIL PROTECTED] cc haskell-cafe haskell-cafe@haskell.org Subject Re: [Haskell-cafe] trouble compiling import GHC.Prim(MutableByteArray#, . (building regex-tdfa from darcs) -- what's that # sign

[Haskell-cafe] trouble building 6.7 on ubuntu

2007-08-16 Thread Thomas Hartman
I have gotten ghc 6.7 to compile, but not with extra libs. I'm on linux x86, ubuntu. Can someone suggest a download date that worked for them, or how to fix one or more of the problems described below? When I build from source (this is for august 2, unknown linux, as conal spoke well of it

Re: [Haskell-cafe] monte carlo trouble

2007-08-15 Thread Thomas Hartman
have you looked at pfp, the haskell probabilistic functional programming library ? http://web.engr.oregonstate.edu/~erwig/pfp/ the paper http://web.engr.oregonstate.edu/~erwig/papers/abstracts.html#JFP06a describes modeling various statisticy things this way, like tree growth and the monty

Re: [Haskell-cafe] monte carlo trouble

2007-08-15 Thread Thomas Hartman
PROTECTED], Thomas Hartman/ext/[EMAIL PROTECTED] cc haskell-cafe@haskell.org Subject Re: [Haskell-cafe] monte carlo trouble Thanks for your replies. I actually starting out returning a single element instead. But a given lookup might return [], and the only way I could think of to handle

[Haskell-cafe] how can I get template haskell macro-expanded code from inferStartState? (repeated post, now with subject)

2007-08-09 Thread Thomas Hartman
(sorry, forgot the subject on my first post) In the following code which uses template haskell, how can I get back the macro-expanded code generated from $(inferStartState ''MyState) I *can* recover the macro-expanded code for $(cnst 1 x) using a debugging technique bulat describes on

Re: [Haskell-cafe] how can I get template haskell macro-expanded code from inferStartState? (repeated post, now with subject)

2007-08-09 Thread Thomas Hartman
To Thomas Hartman/ext/[EMAIL PROTECTED] cc haskell-cafe haskell-cafe@haskell.org, [EMAIL PROTECTED] Subject Re: [Haskell-cafe] how can I get template haskell macro-expanded code from inferStartState? (repeated post, now with subject) On 09/08/07, Thomas Hartman [EMAIL PROTECTED] wrote

[Haskell-cafe] can't build haxml under ghc 6.7, says HughesPJ is hidden... but ghc-pkg doesn't say it's hidden...

2007-08-09 Thread Thomas Hartman
Can I get some help building HaXml (from hackage) under ghc 6.7? I'm hoping to get HAppS running under 6.7, and use the new debugger to better understand what's going on under the hood. Eg, when I'm in the h function, I can take a look at the args and just see what types they are. (I am

Re: [Haskell-cafe] problem building lambdabot

2007-07-31 Thread Thomas Hartman
an idea for how to avoid the nasty dependency a few days ago, *tries to implement it*. Stefan [attachment signature.asc deleted by Thomas Hartman/ext/dbcom] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] ANN: Finance.Quote.Yahoo-0.2

2007-07-26 Thread Thomas Hartman
I installed this and ran the sample program at http://www.b7j0c.org/content/haddock/finance-quote-yahoo/Finance-Quote-Yahoo.html This timed out. I suspect, because I am behind a corporate proxy server. $ env | grep -i http http_proxy=http://myproxy.com:3128

Re: [Haskell-cafe] HDBC or HSQL

2007-07-26 Thread Thomas Hartman
I think we got this to work. We had to connect to MS SQL Server via odbc. Geoffrey Zhu [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 07/25/2007 06:11 PM To cc haskell-cafe@haskell.org Subject Re: [Haskell-cafe] HDBC or HSQL Hi, I use HSQL with PostgreSQL bindings. It works great

Re: [Haskell-cafe] Is this haskelly enough?

2007-07-17 Thread Thomas Hartman
[EMAIL PROTECTED]:~/ProjectRepos/learning$ ghc -fglasgow-exts -e 'main' maxSubArrays.hs should be [2,5,-1,3]: [2,5,-1,3] [EMAIL PROTECTED]:~/ProjectRepos/learning$ cat maxSubArrays.hs import Data.List -- maximum sub-array: [2, 5, -1, 3] main = do putStrLn $ should be ++ show [2, 5, -1, 3] ++ :

[Haskell-cafe] reimplementing break (incorrectly) quickcheck p list gives me feedback that it breaks on list, but not what predicate test caused the breakage

2007-07-05 Thread Thomas Hartman
I am a total quickcheck noob. Is there a way to find out what predicate test function is, below? Also, is there a way I can ask quickcheck to test lists of various built in types, not just Int? *** Falsifiable, after 4 tests: function [1] *Recursion testMyBreak Falsifiable, after 1

[Haskell-cafe] ghc-pkg list says a package is installed, but ghci won't load its exposed module (HDBC-ODBC)

2007-06-13 Thread Thomas Hartman
ghc-pkg list says a package is installed, but ghci won't load its module (HDBC-ODBC) Any advice? [EMAIL PROTECTED] ~/haskellInstalls/HDBC-odbc-1.0.1.0 $ ghc-pkg list c:/ghc/ghc-6.6.1\package.conf: Cabal-1.1.6.2, GLUT-2.1.1, HAppS-0.8.4, HDBC-1.0.1, HDBC-odbc-1.0.1.0, HUnit-1.1.1,

Re: [Haskell-cafe] [IO Int] - IO [Int]

2007-05-05 Thread Thomas Hartman
Hoogle is also helpful http://haskell.org/hoogle/?q=%5Bm+a%5D+-%3E+m+%5Ba%5D 2007/5/4, Phlex [EMAIL PROTECTED]: Hello all, I'm trying to learn haskell, so here's is my first newbie question. I hope this list is appropriate for such help requests. I'm trying to write a function with the

[Haskell-cafe] what exactly does deriving (Functor, Monad, MonadIO) do?

2007-05-01 Thread Thomas Hartman
I was trying to follow the reasoning in Don's article on using haskell for shell scripting http://cgi.cse.unsw.edu.au/~dons/blog/2007/03/10 In the source listing at the end we is newtype Shell a = Shell { runShell :: ErrorT String IO a } deriving (Functor, Monad, MonadIO) and I

Re: [Haskell-cafe] what exactly does deriving (Functor, Monad, MonadIO) do?

2007-05-01 Thread Thomas Hartman
Thanks Dons. There's also a short and sweet explanation here. http://hackage.haskell.org/trac/haskell-prime/wiki/NewtypeDeriving I am going to try and wrap my head around this, as I am very interested in solutions for haskell / shell interaction. Are there are any good examples of code

Re: [Haskell-cafe] Is there a best *nix or BSD distro for Haskell hacking?

2007-04-23 Thread Thomas Hartman
If you opt for ubuntu, have a look at http://groups.google.de/group/fa.haskell/browse_thread/thread/e63e73e7fc9e96c2/be76e381f8c33f39?lnk=stq=%22haskell+cafe%22+%22Trouble+trying+to+find+packages+for+ubuntu+linux%22rnum=1hl=en#be76e381f8c33f39 This little hack enabled me to do a sort of one

Re: [Haskell-cafe] Re: Translating perl - haskell, string fill ins with an error on invalid inputseems awfullycomplex. Is there a way to simplify?

2007-04-18 Thread Thomas Hartman
Looks like this needs to be run with #!/usr/lib/ghc-6.6/bin/runghc {-# OPTIONS_GHC -fglasgow-exts #-} to get instance MyString (Either String String) where mystr = id instance MyString String where mystr = Right to work. I'm curious if there is a community feeling on whether

Re: [Haskell-cafe] Re: Translating perl - haskell, string fill ins with an error on invalid inputseems awfullycomplex. Is there a way to simplify?

2007-04-18 Thread Thomas Hartman
String 62 where mystr = Right 63 64 x ++ y = do xv - mystr x 65yv - mystr y 66return $ xv ++ yv 67 2007/4/18, Thomas Hartman [EMAIL PROTECTED]: Looks like this needs to be run with #!/usr/lib/ghc-6.6/bin/runghc {-# OPTIONS_GHC -fglasgow

Re: [Haskell-cafe] Efficient use of ByteString and type classes in template system

2007-04-17 Thread Thomas Hartman
Created wiki page http://haskell.org/haskellwiki/String_Interpolation and referenced various topics mentioned in this thread, there. 2007/4/16, Donald Bruce Stewart [EMAIL PROTECTED]: johan.tibell: Hi Haskell Caf?! I'm writing a perl/python like string templating system which I plan to

<    1   2   3   4   >