Re: [Haskell-cafe] ANNOUNCE: Data.IVar 0.1

2008-10-08 Thread Sean Leather
>forkIO $ threadDelay 1000 >> writeIVar iv' "my spoon is too big" > writeIVar iv' "i am a banana" -- throws error "IVar written twice" > Nice Don Hertzfeldt reference. ;) If this means nothing to you, here's the animated film from whence this came: http://www.youtube.com/watch

[Haskell-cafe] RE: I'll do USB in Haskell - tips?

2008-10-08 Thread Galchin, Vasili
Hello, I am also interested in SCSI, PCI, etc. I think the main problem/issue vis-a-vis USB/SCSI/PCI et. al. for Haskell is does (or will there exist) a Posix API and a Windows API for these buses/protocols? I read one URL but it will only support Linux. Ok .. maybe there API will be implemen

Re: [Haskell-cafe] Hoogle? [Stacking monads]

2008-10-08 Thread Ryan Ingram
On Tue, Oct 7, 2008 at 7:09 PM, Andrew Coppin <[EMAIL PROTECTED]> wrote: > For my current troubles, it would be really useful if there were some > program that you could feed some source code to, and it would tell you what > the inferred types of each subexpression are. (Ideally it would be nice if

RE: [Haskell-cafe] Darcs / Git

2008-10-08 Thread Mitchell, Neil
> Yes, I've used SSH key. Didn't think it would be different > with a password. It really is! :-) Thanks Neil > > On 7 Oct 2008, at 20:19, Mitchell, Neil wrote: > > > > > > >>> I use darcs on Windows every day and it works well. The > >> only problem > >>> is that it is not very usable if y

[Haskell-cafe] [hmatrix] build error

2008-10-08 Thread Xiao-Yong Jin
Hi, looks like I hit a bug, but I'm not sure which software it belongs to, gcc, ghc or atlas? -- error doing "runhaskell Setup build" -- Preprocessing library hmatrix-0.4.1.0... /usr/bin/ld: dist/build/Numeric/GSL/Special/Internal_hsc_make: hidden symbol `__powidf2' in /usr/lib/gc

Re: [Haskell-cafe] [hmatrix] build error

2008-10-08 Thread Xiao-Yong Jin
Xiao-Yong Jin <[EMAIL PROTECTED]> writes: > Hi, looks like I hit a bug, but I'm not sure which software > it belongs to, gcc, ghc or atlas? > > -- error doing "runhaskell Setup build" -- > Preprocessing library hmatrix-0.4.1.0... > /usr/bin/ld: dist/build/Numeric/GSL/Special/Intern

[Haskell-cafe] Functional dependencies and incoherent instances

2008-10-08 Thread Tobias Bexelius
Hi, Im trying to overload a multiplication operator for scalars and vectors, but keep running into the error message "Functional dependencies conflict". What I think is going on is that the dependency check doesn't work with incoherent (or overlapping) instances. In the example below, the two inst

[Haskell-cafe] OT: Haskell desktop wallpaper?

2008-10-08 Thread Magnus Therning
This morning I got tired of my desktop wallpaper (one that ships with Debian's Gnome packages). Typing "haskell desktop wallpaper" yeilded a lot of links to wallpapers with Colleen Haskell, while she's a beautiful lady it wasn't exactly what I was hoping to find. Hence this email. Where can I fi

[Haskell-cafe] Re: Type classes question

2008-10-08 Thread Roly Perera
Ryan Ingram gmail.com> writes: > [...] > > Here's another possible solution: > > > newtype AsFunctor s a = AF { fstream :: (s a) } > > instance (Stream f) => Functor (AsFunctor f) where > > fmap f (AF s) = AF (fmapStreamDefault f s) > > Now to use fmap you wrap in AF and unwrap with fstrea

Re: [Haskell-cafe] ANNOUNCE: Data.IVar 0.1

2008-10-08 Thread Jake Mcarthur
On Oct 8, 2008, at 1:36 AM, Luke Palmer wrote: What's the background for this abstraction? So like I said, I'm not too sure, I just stole the name and vague idea from discussions about it. I believe IVar or something similar used to be in the standard GHC libraries a long time ago. Conal

Re: [Haskell-cafe] ANNOUNCE: Data.IVar 0.1

2008-10-08 Thread Jake Mcarthur
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Oct 8, 2008, at 7:28 AM, Jake Mcarthur wrote: I'm attaching one of the more well-known variants in case anybody is interested, although to be honest I can't remember which one was actually the best as I have moved on from this approach. I j

Re: [Haskell-cafe] OT: Haskell desktop wallpaper?

2008-10-08 Thread Dougal Stanton
2008/10/8 Magnus Therning <[EMAIL PROTECTED]>: > This morning I got tired of my desktop wallpaper (one that ships with > Debian's Gnome packages). Typing "haskell desktop wallpaper" yeilded > a lot of links to wallpapers with Colleen Haskell, while she's a > beautiful lady it wasn't exactly what I

[Haskell-cafe] Re: I'll do USB in Haskell - tips?

2008-10-08 Thread Mauricio
Looking for "Posix Linux API", I found www.linux-usb.org. It has a lot (I think all I need) to start in Linux. Does anyone knows where can I find related information for Windows, so I can start without writing something that would be difficult to support there? Best, Maurício Hello, I am a

Re: [Haskell-cafe] OT: Haskell desktop wallpaper?

2008-10-08 Thread Svein Ove Aas
2008/10/8 Magnus Therning <[EMAIL PROTECTED]>: > This morning I got tired of my desktop wallpaper (one that ships with > Debian's Gnome packages). Typing "haskell desktop wallpaper" yeilded > a lot of links to wallpapers with Colleen Haskell, while she's a > beautiful lady it wasn't exactly what I

[Haskell-cafe] Call for Contributions - Haskell Communities and Activities Report, November 2008 edition

2008-10-08 Thread Janis Voigtlaender
Dear Haskellers, so much has happened in the Haskell world in the past months. Therefore, I would very much like to collect contributions for the 15th edition of the Haskell Communities & Activities Report

Re: [Haskell-cafe] Functional dependencies and incoherent instances

2008-10-08 Thread Joel Björnson
Hi, On Wed, Oct 8, 2008 at 2:31 PM, Tobias Bexelius <[EMAIL PROTECTED]> wrote: > Hi, > > Im trying to overload a multiplication operator for scalars and vectors, > but keep running into the error message "Functional dependencies > conflict". What I think is going on is that the dependency check do

RE: [Haskell-cafe] Functional dependencies and incoherent instances

2008-10-08 Thread Tobias Bexelius
Yeah, I realized that. But heres where I would like the undecidable incoherent instances to kick in, i.e. as long as I haven't got any NumVec instances GHC should be able to choose only one of the Mult instances. Or do I have too much faith in the -fallow-incoherent-instances flag now? :/ I wo

[Haskell-cafe] Simple Table Update

2008-10-08 Thread Paul Keir
Hi, I'd like to create a new list based on an original list, using information from a second (symbol) list. That second list should be updated as each element in the new list is added. I've been using map a lot, but that's not an option here, and I'm having trouble obtaining a good recursive st

Re: [Haskell-cafe] monadic parser with Happy and Alex

2008-10-08 Thread Manlio Perillo
Timothy Goddard ha scritto: On Sun, 05 Oct 2008 04:05:51 Manlio Perillo wrote: Hi. I have completed a draft of a CSS lexer, using Alex. http://hg.mperillo.ath.cx/haskell/webtools/file/tip/src/CSS/Lexer.x The lexer use the posn wrapper. Now I'm starting to write the parser with Happy, however

Re: [Haskell-cafe] OT: Haskell desktop wallpaper?

2008-10-08 Thread Brandon S. Allbery KF8NH
On Oct 8, 2008, at 05:12 , Magnus Therning wrote: This morning I got tired of my desktop wallpaper (one that ships with Debian's Gnome packages). Typing "haskell desktop wallpaper" yeilded a lot of links to wallpapers with Colleen Haskell, while she's a beautiful lady it wasn't exactly what I wa

[Haskell-cafe] Re: [hmatrix] build error

2008-10-08 Thread Alberto Ruiz
Hi Xiao-Yong, In i686 Arch linux, with the normal blas and lapack, I need: extra-libraries: gsl lapack blas gslcblas gfortran But using atlas-lapack: extra-libraries: gsl lapack f77blas gslcblas atlas gcc_s I don't know how I found that "__powidf2" is in libgcc_s :) I will a

[Haskell-cafe] Bluetooth libraries

2008-10-08 Thread Creighton Hogg
Hello, In the interest of not duplicating any effort, I wanted to ask if anyone was aware of/working on libraries for doing bluetooth programming from Haskell. I didn't find any on hackage nor did The Google indicate that this was a filled niche. Cheers, Creighton

Re: [Haskell-cafe] Functional dependencies and incoherent instances

2008-10-08 Thread Ryan Ingram
On Wed, Oct 8, 2008 at 2:59 PM, Tobias Bexelius <[EMAIL PROTECTED]> wrote: > Or do I have too much faith in the -fallow-incoherent-instances flag now? :/ Overlapping instances are an "instance definition"-time feature; incoherent instances only become applicable at the call site for polymorphic fu

Re: [Haskell-cafe] Simple Table Update

2008-10-08 Thread Ryan Ingram
Prelude> :t Data.List.mapAccumL Data.List.mapAccumL :: (acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y]) I'm sure you can fill in the details :) -- ryan 2008/10/8 Paul Keir <[EMAIL PROTECTED]>: > Hi, > > I'd like to create a new list based on an original list, using information > from a secon

Re: [Haskell-cafe] Functional dependencies and incoherent instances

2008-10-08 Thread Emil Axelsson
I think the technique described at http://haskell.org/haskellwiki/GHC/AdvancedOverlap may give you what you want. I've never tried it myself though. / Emil Tobias Bexelius skrev: Yeah, I realized that. But heres where I would like the undecidable incoherent instances to kick in, i.e. as

Re: [Haskell-cafe] Bluetooth libraries

2008-10-08 Thread Mattias Bengtsson
On Wed, 2008-10-08 at 11:41 -0500, Creighton Hogg wrote: > In the interest of not duplicating any effort, I wanted to ask if > anyone was aware of/working on libraries for doing bluetooth > programming from Haskell. I didn't find any on hackage nor did The > Google indicate that this was a filled

Re: [Haskell-cafe] Hoogle? [Stacking monads]

2008-10-08 Thread Andrew Coppin
Ryan Ingram wrote: There is such a tool, it's called ghci :) It just takes a bit of massaging to do what you want: ghci> :set -fglasgow-exts ghci> :t (?f some_func [?a .. ?b]) Here's an example: Prelude> :t ?f map [?a .. ?b] ?f map [?a .. ?b] :: forall t a b t1. (Enum t1,

[Haskell-cafe] Re: [Haskell] Catching error / making library functions monadic (in failure)

2008-10-08 Thread Duncan Coutts
On Wed, 2008-10-08 at 18:07 +0200, Philip K.F. Hölzenspies wrote: > I think this is the core problem I have. Really, error should be implemented > as fail, rather than vice versa. I see why this doesn't work, because it > would type > > error :: Monad m => String -> m a > > even though the who

[Haskell-cafe] Re: [hmatrix] build error

2008-10-08 Thread Xiao-Yong Jin
Alberto Ruiz <[EMAIL PROTECTED]> writes: > Hi Xiao-Yong, > > In i686 Arch linux, with the normal blas and lapack, I need: > > extra-libraries: gsl lapack blas gslcblas gfortran > > But using atlas-lapack: > > extra-libraries: gsl lapack f77blas gslcblas atlas gcc_s I guess you want cb

RE: [Haskell-cafe] Simple Table Update

2008-10-08 Thread Paul Keir
It brings tears to my eyes to see such a beautiful function ;) You've hit the nail on the head Ryan. The new version of my second previous code snippet now no longer requires "fixpu*", and is: typeCheckAST (Program pus) = Program $ snd $ mapAccumL f [] pus where f st pu = (st ++ [("",[])],pu)

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

2008-10-08 Thread Gwern Branwen
On 2008.10.06 22:40:21 +1000, Ivan Miljenovic <[EMAIL PROTECTED]> scribbled 1.6K characters: ... > Gwern: I think I've found why it never ends on xmonad-contrib (it > happens for me here on the Grahpalyze library as well): when doing > clique/cycle detection, if a function recurses on itself more

Re: [Haskell-cafe] OT: Haskell desktop wallpaper?

2008-10-08 Thread Derek Elkins
On Wed, 2008-10-08 at 10:12 +0100, Magnus Therning wrote: > This morning I got tired of my desktop wallpaper (one that ships with > Debian's Gnome packages). Typing "haskell desktop wallpaper" yeilded > a lot of links to wallpapers with Colleen Haskell, while she's a > beautiful lady it wasn't exa

Re: [Haskell-cafe] OT: Haskell desktop wallpaper?

2008-10-08 Thread R . Emre Başar
Hi, I created a wallpaper from The.Monad.Reader logo. You can find two versions here: http://tonguc.name/images/lambda-1280x800.png http://tonguc.name/images/lambda-1024x768.png Magnus Therning der ki: > This morning I got tired of my desktop wallpaper (one that ships with > Debian's Gnome packa

[Haskell-cafe] synchronous channels in STM

2008-10-08 Thread roger peppe
I was wondering if it was possible to implement synchronous channels within STM. In particular, I'd like to have CSP-like send and recv primitives on a channel that each block until the other side arrives to complete the transaction. I think I've convinced myself that it's not possible, but anyone

[Haskell-cafe] ghc 6.10 and parsec

2008-10-08 Thread Jason Dusek
Which Parsec is GHC 6.10 going to ship with -- Parsec 2 or Parsec 3? -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] synchronous channels in STM

2008-10-08 Thread Jake McArthur
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 roger peppe wrote: > I was wondering if it was possible to implement synchronous channels > within STM. In particular, I'd like to have CSP-like send and recv primitives > on a channel that each block until the other side arrives to complete > the tran

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

2008-10-08 Thread Ivan Miljenovic
2008/10/8 Gwern Branwen <[EMAIL PROTECTED]>: > > So it'll be fixed for the next release? Cool then; I look forward to seeing > my XMC modules' analysis. > Yeah, I was planning on making a new release some time this week... and then I somehow accidentally uninstalled just about everything on my sy

Re: [Haskell-cafe] ghc 6.10 and parsec

2008-10-08 Thread Paulo Tanimoto
Jason, If this is representative of what it will be, here's what I have: $ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.10.0.20081007 $ ghc-pkg list parsec /usr/local/lib/ghc-6.10.0.20081007/./package.conf: parsec-2.1.0.1 Paulo On Wed, Oct 8, 2008 at 5:14 PM,

Re: [Haskell-cafe] Hoogle? [Stacking monads]

2008-10-08 Thread Reiner Pope
The syntax is for the implicit parameter extension[1]. I think you would write your example as foo (undefined :: Bar x) ?z :: Bar y Then querying the type of that whole expression with :t will list ?z's type in the expression's constraints. (Of course, you should turn off the monomorphism restric

Re: [Haskell-cafe] synchronous channels in STM

2008-10-08 Thread Claus Reinke
I was wondering if it was possible to implement synchronous channels within STM. In particular, I'd like to have CSP-like send and recv primitives on a channel that each block until the other side arrives to complete the transaction. Assuming that retry blocks until something changes, you could

Re: [Haskell-cafe] synchronous channels in STM

2008-10-08 Thread Levi Stephen
On Thu, Oct 9, 2008 at 9:40 AM, roger peppe <[EMAIL PROTECTED]> wrote: > I was wondering if it was possible to implement synchronous channels > within STM. In particular, I'd like to have CSP-like send and recv > primitives > on a channel that each block until the other side arrives to complete >

Re: [Haskell-cafe] ghc 6.10 and parsec

2008-10-08 Thread Jason Dusek
Aye, I have that as well, but you never know :) -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] parsec 3 & parsec 2

2008-10-08 Thread Jason Dusek
I recently took a look at the new Yi, and it looks neat but I am hesitant to install it -- it require Parsec 3. What will happen to my system, carefully maintained, if I unleash this new Parsec on my programs and the programs of others? Can I expect total breakage, coexistence or...? --

Re: [Haskell-cafe] ghc 6.10 and parsec

2008-10-08 Thread agentzh
On Thu, Oct 9, 2008 at 6:14 AM, Jason Dusek <[EMAIL PROTECTED]> wrote: > Which Parsec is GHC 6.10 going to ship with -- Parsec 2 or > Parsec 3? > I do hope it will be 2. Parsec 3 is significantly slower than 2 in my SQL parser. Cheers, -agentzh ___ Ha

Re: [Haskell-cafe] parsec 3 & parsec 2

2008-10-08 Thread wman
Shouldn't hiding the package stop it from causing possible mayhem, yet it be accessible to those packages depending on the new version explicitly ? On Thu, Oct 9, 2008 at 2:53 AM, Jason Dusek <[EMAIL PROTECTED]> wrote: > I recently took a look at the new Yi, and it looks neat but I > am hesitan

Re: [Haskell-cafe] synchronous channels in STM

2008-10-08 Thread Andrea Vezzosi
2008/10/9 Claus Reinke <[EMAIL PROTECTED]> > I was wondering if it was possible to implement synchronous channels >> within STM. In particular, I'd like to have CSP-like send and recv >> primitives >> on a channel that each block until the other side arrives to complete >> the transaction. >> > >

Re: [Haskell-cafe] parsec 3 & parsec 2

2008-10-08 Thread Jason Dusek
I don't know anything about how to do that. Is this a Cabal thing? A GHC package registration thing? -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] parsec 3 & parsec 2

2008-10-08 Thread Alfonso Acosta
ghc-pkg hide {pkg-id} On Thu, Oct 9, 2008 at 5:53 AM, Jason Dusek <[EMAIL PROTECTED]> wrote: > I don't know anything about how to do that. Is this a Cabal > thing? A GHC package registration thing? > > -- > _jsn > ___ > Haskell-Cafe mailing list > Has

Re: [Haskell-cafe] Simplifying a IsFunction type class using type equality constraints

2008-10-08 Thread Manuel M T Chakravarty
Corey O'Connor: I recently had a need to use the IsFunction typeclass described by Oleg here: http://okmij.org/ftp/Haskell/isFunction.lhs and am wondering if the use of the TypeCast class can be correctly replaced by a type equality constraint. The IsFunction and TypeCast classes were defined

Re: [Haskell-cafe] OT: Haskell desktop wallpaper?

2008-10-08 Thread Jim Snow
Ray tracing about a million spheres in a regular grid with reflections: lattice = let n = 50 :: Flt in bih [sphere (vec x y z) 0.2 | x <- [(-n)..n], y <- [(-n)..n], z <- [(-n)..n]] http://syn.cs.pdx.edu/~jsnow/glome/Glome.hs-latti