Re: [Haskell-cafe] Associated Types and several Classes

2008-10-13 Thread Martin Hofmann
Hi Ryan. Thanks a lot, that was exactly the information I needed. Concerning the type classes, there are methods, but I dropped them, because they were not necessary for the problem. However, you are right. Implementation hiding is what I need. One suggestion. Maybe a HaskellWiki page on design

Re: [Haskell-cafe] There is something wrong in derive-0.1.2 package.

2008-10-13 Thread Austin Seipp
Excerpts from Magicloud Magiclouds's message of Mon Oct 13 23:58:58 -0500 2008: > Hi, > I wanted to install it with cabal. Well > $ cabal install derive > Resolving dependencies... > cabal: Couldn't read cabal file "./derive/0.1.2/derive.cabal" > As I traced a little, it seemed that line: '

Re: [Haskell-cafe] There is something wrong in derive-0.1.2 package.

2008-10-13 Thread Duncan Coutts
On Tue, 2008-10-14 at 13:51 +0800, Magicloud wrote: > Sigh again, something that always makes me think that cabal is unusable > ~/.cabal/lib/HTTP-3001.1.3/ghc-6.8.3/libHSHTTP-3001.1.3.a(Browser.o)(.text+0x5aa6): > In function `rp46_info': > : undefined reference to > `mtlzm1zi1zi0zi1_Control

Re: [Haskell-cafe] There is something wrong with hprotoc-0.3.1 package.

2008-10-13 Thread Magicloud
$ cabal --version cabal-install version 0.5.2 using version 1.4.0.2 of the Cabal library $ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.8.3 Don Stewart wrote: magicloud.magiclouds: Hi, I wanted to install this package. Well, Building hprotoc-0.3.1... ... [3 of

Re: [Haskell-cafe] There is something wrong with hprotoc-0.3.1 package.

2008-10-13 Thread Don Stewart
magicloud.magiclouds: > Hi, >I wanted to install this package. Well, > Building hprotoc-0.3.1... > ... > [3 of 7] Compiling Text.ProtocolBuffers.ProtoCompile.Parser ... > > Text/ProtocolBuffers/ProtoCompile/Parser.hs:48:0: >Type synonym `GenParser' should have 2 arguments, but has been giv

Re: [Haskell-cafe] There is something wrong in derive-0.1.2 package.

2008-10-13 Thread Magicloud
Sigh again, something that always makes me think that cabal is unusable $ cabal install cabal-install Resolving dependencies... 'cabal-install-0.6.0' is cached. Configuring cabal-install-0.6.0... Preprocessing executables for cabal-install-0.6.0... Building cabal-install-0.6.0... [ 1 of 29] C

Re: [Haskell-cafe] Very silly

2008-10-13 Thread Brad Larsen
On Mon, 13 Oct 2008 23:32:30 -0400, Tommy M. McGuire <[EMAIL PROTECTED]> wrote: > Andrew Coppin wrote: >> Bulat Ziganshin wrote: >>> people that make critique on haskell type classes, don't take into >>> account that it's unlike C++ templates, implemented via run-time >>> dictionaries and other mo

Re: [Haskell-cafe] There is something wrong in derive-0.1.2 package.

2008-10-13 Thread Duncan Coutts
On Tue, 2008-10-14 at 12:58 +0800, Magicloud wrote: > Hi, > I wanted to install it with cabal. Well > $ cabal install derive > Resolving dependencies... > cabal: Couldn't read cabal file "./derive/0.1.2/derive.cabal" > As I traced a little, it seemed that line: 'build-depends: base == > 4.

[Haskell-cafe] Re: 2008-10-13 Hackage status with GHC 6.10 release candidate

2008-10-13 Thread Duncan Coutts
On Mon, 2008-10-13 at 22:08 -0700, Don Stewart wrote: > Using GHC 6.10 RC from today, Cabal 1.6 and cabal-install 1.16, of 682 > libraries and apps tried in total, Note that's cabal-install-0.6 :-) > 1 UnpackFailed I've diagnosed this one. It will be fixed in the next cabal-install point

[Haskell-cafe] 2008-10-13 Hackage status with GHC 6.10 release candidate

2008-10-13 Thread Don Stewart
Hey all. The GHC 6.10 RCs are out, and we're preparing the release of GHC proper. To help manage the transistion to GHC 6.10 it is now possible to actually build all the 3rd party Haskell packages, and publish their results wrt. the release candidate. For the first time ever, we're able to have a

[Haskell-cafe] There is something wrong with hprotoc-0.3.1 package.

2008-10-13 Thread Magicloud
Hi, I wanted to install this package. Well, Building hprotoc-0.3.1... ... [3 of 7] Compiling Text.ProtocolBuffers.ProtoCompile.Parser ... Text/ProtocolBuffers/ProtoCompile/Parser.hs:48:0: Type synonym `GenParser' should have 2 arguments, but has been given 1 In the type synonym declarati

[Haskell-cafe] There is something wrong in derive-0.1.2 package.

2008-10-13 Thread Magicloud
Hi, I wanted to install it with cabal. Well $ cabal install derive Resolving dependencies... cabal: Couldn't read cabal file "./derive/0.1.2/derive.cabal" As I traced a little, it seemed that line: 'build-depends: base == 4.*, syb' was wrong. ___

Re: [Haskell-cafe] Very silly

2008-10-13 Thread Jason Dagit
On Mon, Oct 13, 2008 at 8:32 PM, Tommy M. McGuire <[EMAIL PROTECTED]> wrote: > > Java (and presumably C#) "generics" are very much like a weakened version > of normal parametric polymorphism. I'm curious, in what way are they weakened? thanks, Jason _

Re: [Haskell-cafe] Very silly

2008-10-13 Thread Tommy M. McGuire
Andrew Coppin wrote: Bulat Ziganshin wrote: people that make critique on haskell type classes, don't take into account that it's unlike C++ templates, implemented via run-time dictionaries and other modules may define new instances Personally, I have no clue how C++ templates work [yet]. (As i

Re: [Haskell-cafe] Re: Ubuntu Haskell

2008-10-13 Thread Ariel J. Birnbaum
> Pray tell, what kind of feats are expected of such a champion? No answer. I guess my failed attempt at chivalrous-sounding wit killed the message. I'll rephrase: Does the job consist of: Maintaining an independent repository of Haskell packages configured and compiled for the current (probabl

Re: [Haskell-cafe] Multi-line string literals are both easy /and/elegant in Haskell

2008-10-13 Thread L.Guo
Oh, that's so cool. But, this feather is too difficult to be configured in UE32 -- my costom IDE. Pity. Hopes I wouldn't forget it later. -- L.Guo 2008-10-14 - From: Matt Morrow At: 2008-1

Re: [Haskell-cafe] Improving MTL instances (was: Overlapping/Incoherent instances)

2008-10-13 Thread Luke Palmer
On Mon, Oct 13, 2008 at 1:29 AM, Ryan Ingram <[EMAIL PROTECTED]> wrote: > Of course, the point of this message isn't just to complain. The > overlap implementation was abhorrent and it *is* better now than it > was before. But perhaps there is an abstraction we are missing that > would allow for

Re: [Haskell-cafe] couple of questions on monads

2008-10-13 Thread Iavor Diatchki
Hello, On Mon, Oct 13, 2008 at 3:16 PM, Stephen Hicks <[EMAIL PROTECTED]> wrote: > 2008/10/13 Daryoush Mehrtash <[EMAIL PROTECTED]>: >> Is there a write up on what makes an implementation lazy vs strict? > > I would be interested in seeing this, too! Typically it has to do with the strictness of

Re: [Haskell-cafe] Congrats. to wxHaskell

2008-10-13 Thread Henk-Jan van Tuyl
On Sun, 12 Oct 2008 03:45:17 +0200, Don Stewart <[EMAIL PROTECTED]> wrote: I just want to congratulate the wxHaskell team on their new release. With GHC 6.10 RC, cabal 1.6, and cabal-install 0.6, I was able to simply, cabal install wxcore wx And it all worked. Well done! -- Don I wish

Re: [Haskell-cafe] Very silly

2008-10-13 Thread Tony Morris
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bulat Ziganshin wrote: > Hello Andrew, > > Tuesday, October 14, 2008, 12:15:04 AM, you wrote: > >>> people that make critique on haskell type classes, don't take into >>> account that it's unlike C++ templates, implemented via run-time >>> dictionaries

Re: Re[2]: [Haskell-cafe] Very silly

2008-10-13 Thread David Leimbach
On Mon, Oct 13, 2008 at 1:31 PM, Bulat Ziganshin <[EMAIL PROTECTED]>wrote: > Hello Andrew, > > Tuesday, October 14, 2008, 12:15:04 AM, you wrote: > > >> people that make critique on haskell type classes, don't take into > >> account that it's unlike C++ templates, implemented via run-time > >> dic

Re: [Haskell-cafe] couple of questions on monads

2008-10-13 Thread Stephen Hicks
2008/10/13 Daryoush Mehrtash <[EMAIL PROTECTED]>: > Is there a write up on what makes an implementation lazy vs strict? I would be interested in seeing this, too! > I like to better understand the trade off between the two and use cases > where one is better than the other. > > I noticed that so

Re: [Haskell-cafe] Re: Improving MTL instances (was: Overlapping/Incoherent instances)

2008-10-13 Thread Iavor Diatchki
Hello, The currently released version of monadLib does not use overlapping instances, indeed. However, in the monadLib repo (http://github.com/yav/monadlib) there is a file called "MonadLib4.hs" which contains a version of the library that is implemented with overlapping instances, so you can play

Re: [Haskell-cafe] Query regarding Type classes

2008-10-13 Thread Stephen Hicks
(First of all, sorry for the double reply...) 2008/10/13 Arun Suresh <[EMAIL PROTECTED]>: > Now my client want to write another subclass for Drawable... > He can do that in any other file... package.. whatever... > > How would he do that in Haskell ??? > considering he may not modify the source fi

Re: [Haskell-cafe] Improving MTL instances (was: Overlapping/Incoherent instances)

2008-10-13 Thread Stephen Hicks
On Mon, Oct 13, 2008 at 3:29 AM, Ryan Ingram <[EMAIL PROTECTED]> wrote: > On Mon, Oct 13, 2008 at 2:04 AM, J. Garrett Morris > <[EMAIL PROTECTED]> wrote: >> Indeed - MTL seems to have been rewritten at some point in the past to >> prefer exhaustive enumeration to overlap. > > Indeed, and I actually

Re: [Haskell-cafe] Re: Interesting new user perspective

2008-10-13 Thread Anton Tayanovskyy
If you want to make Haskell more widely used, do pick a name for Haskell Prime that starts with an A. I first heard of Haskell when exploring the list of computer languages that Gedit could highlight. Just imagine going through all those A,B,C,D,E,F,G before I came to Haskell. Those programmers wh

Re: [Haskell-cafe] Re: Interesting new user perspective

2008-10-13 Thread Claus Reinke
If you want to make Haskell more widely used, do pick a name for Haskell Prime that starts with an A. I first heard of Haskell when exploring the list of computer languages that Gedit could highlight. Just imagine going through all those A,B,C,D,E,F,G before I came to Haskell. That is a simple s

Re: [Haskell-cafe] couple of questions on monads

2008-10-13 Thread Daryoush Mehrtash
Is there a write up on what makes an implementation lazy vs strict? I like to better understand the trade off between the two and use cases where one is better than the other. I noticed that some functions in the lazy implementation uses "~" .For example evalStateT :: (Monad m) => StateT s

[Haskell-cafe] Re: Multi-line string literals are both easy /and/ elegant in Haskell

2008-10-13 Thread Mauricio
The new QuasiQuotes extension arriving with ghc 6.10 is very exciting, and handling multi-line string literals is like stealing candy from a baby. ;) > (...) Cool!!! How exactly QuasiQuote behave, and what is available to handle them? (Or: can I find information already on the web?) Sugestion:

Re: [Haskell-cafe] couple of questions on monads

2008-10-13 Thread Jonathan Cast
On Mon, 2008-10-13 at 13:37 -0700, Daryoush Mehrtash wrote: > Question 1: Why are there lazy and strict modules of some monads? > (e.g. Control.Monad.State) Because both are useful, for different purposes. (For the same reason that it's helpful, in general, to have both eager and lazy evaluation

Re: [Haskell-cafe] Very silly

2008-10-13 Thread Andrew Coppin
Bulat Ziganshin wrote: Hello Andrew, Tuesday, October 14, 2008, 12:15:04 AM, you wrote: people that make critique on haskell type classes, don't take into account that it's unlike C++ templates, implemented via run-time dictionaries and other modules may define new instances

[Haskell-cafe] couple of questions on monads

2008-10-13 Thread Daryoush Mehrtash
Question 1: Why are there lazy and strict modules of some monads? (e.g. Control.monad.State) Question 2: If I define a new monad (say xyz), does it have to be as control.monad.xyz module? daryoush ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.or

Re[2]: [Haskell-cafe] Very silly

2008-10-13 Thread Bulat Ziganshin
Hello Andrew, Tuesday, October 14, 2008, 12:15:04 AM, you wrote: >> people that make critique on haskell type classes, don't take into >> account that it's unlike C++ templates, implemented via run-time >> dictionaries and other modules may define new instances >> > Personally, I have no clue

[Haskell-cafe] Re: Hackage and GUI (was Hackage status with GHC 6.10 release candidate)

2008-10-13 Thread Matti Niemenmaa
Hans van Thiel wrote: > Secondly, has Gtk2Hs compatibility been tested with GHC 6.10? In the > past there have sometimes been problems with new GHC releases and > Gtk2Hs. These have always been addressed, but it usually took a few > months.. I just built Gtk2Hs with the 6.10-rc on Windows, and it

Re: [Haskell-cafe] Very silly

2008-10-13 Thread Andrew Coppin
Jonathan Cast wrote: Flexible instances are extroardinarily useful: I'm sure the GHC team wouldn't have bothered otherwise. ;-) AFAIK, "flexible instances" just means that absolutely anything can be a class instance, right? instance Monad m => MonadState s (StateT s m) instance MonadSta

Re: [Haskell-cafe] Still stacking monad transformers

2008-10-13 Thread Tillmann Rendel
Dino Morelli wrote: > I was wishing I could do this: > >let foo = str `or-if-empty` default > > > If it was a Maybe, this works with mplus: > >(Just "foo") `mplus` (Just "bar") == Just "foo" >Nothing `mplus` (Just "bar") == Just "bar" > > > But not so much for list, mplus just ain'

Re: [Haskell-cafe] Very silly

2008-10-13 Thread Andrew Coppin
Bulat Ziganshin wrote: people that make critique on haskell type classes, don't take into account that it's unlike C++ templates, implemented via run-time dictionaries and other modules may define new instances Personally, I have no clue how C++ templates work [yet]. (As in, I'm learning C+

Re: [Haskell-cafe] Very silly

2008-10-13 Thread Jonathan Cast
On Mon, 2008-10-13 at 19:51 +0100, Andrew Coppin wrote: > {-# LANGUAGE FlexibleInstances #-} > > module Overload where > > class Silly s where > go :: s > > instance Silly ([x] -> [x]) where > go = reverse > > instance Silly (Int -> Int) where > go = (+1) > > > > > > Don't even ask.

Re: [Haskell-cafe] ANNOUNCE: Salsa: A .NET Bridge for Haskell

2008-10-13 Thread Alex Sandro Queiroz e Silva
Hallo, Andrew Coppin wrote: >> >> In what alternate universe? >> > > One with a 3-day time dilation, apparently... > > > > [Sorry, couldn't resist. ;-) ] > No problem, I didn't get your point anyway. -alex http://www.ventonegro.org/ _

Re: [Haskell-cafe] Could not build win32 dll..

2008-10-13 Thread Yakov ZAYTSEV
Thanks a lot Ian! I was with abstracted eyes after day of work Luckily after your hint I've finished my haskell MEX file experiment in few minutes! Thanks! On Mon, Oct 13, 2008 at 9:47 PM, Ian Lynagh <[EMAIL PROTECTED]> wrote: > > Hi Yakov, > > On Mon, Oct 13, 2008 at 07:47:15PM +0400, Yakov ZAYTS

Re: [Haskell-cafe] Haskell on the JVM

2008-10-13 Thread frantisek kocun
Sorry, as Chris Eidhof replied to me CAL is not pure. I was only playing with GemCutter, I don't use CAL so I didn't know. Fero On Sun, Oct 12, 2008 at 5:32 PM, frantisek kocun <[EMAIL PROTECTED]>wrote: > There is CAL language (purely functional, very Haskell like, the most I > have seen). CAL E

Re: [Haskell-cafe] Very silly

2008-10-13 Thread Bulat Ziganshin
Hello Andrew, Monday, October 13, 2008, 10:51:43 PM, you wrote: > Suffice it to say, you *can* make Haskell support arbitrary overloading > of function names like C++ has, _if_ you abuse the type system violently > enough. Please, won't somebody think of the children?!? people that make critique

Re[2]: [Haskell-cafe] Could not build win32 dll..

2008-10-13 Thread Bulat Ziganshin
Hello Ian, Monday, October 13, 2008, 9:47:12 PM, you wrote: > http://www.haskell.org/ghc/docs/6.8.3/html/users_guide/win32-dlls.html this page says "Since this Haskell DLL depends on a couple of the DLLs that come with GHC, make sure that they are in scope/visible." i just checked 6.8.3 install

[Haskell-cafe] Very silly

2008-10-13 Thread Andrew Coppin
{-# LANGUAGE FlexibleInstances #-} module Overload where class Silly s where go :: s instance Silly ([x] -> [x]) where go = reverse instance Silly (Int -> Int) where go = (+1) Don't even ask. Suffice it to say, you *can* make Haskell support arbitrary overloading of function names li

Re: [Haskell-cafe] Multi-line string literals are both easy /and/ elegant in Haskell

2008-10-13 Thread Andrew Coppin
Matt Morrow wrote: The new QuasiQuotes extension arriving with ghc 6.10 is very exciting, and handling multi-line string literals is like stealing candy from a baby. ;) Cool. Is there any progress on getting GHC to *not* freak out when you ask it to compile a CAF containing several hundred

Re: [Haskell-cafe] ANNOUNCE: Salsa: A .NET Bridge for Haskell

2008-10-13 Thread Creighton Hogg
On Mon, Oct 13, 2008 at 1:35 PM, Albert Y. C. Lai <[EMAIL PROTECTED]> wrote: > Alex Queiroz wrote: >> >> On Fri, Oct 10, 2008 at 5:48 PM, Andrew Coppin >>> >>> In what way? As far as I'm aware, .NET never really caught on and has >>> long >>> since become obsolete. >> >> In what alternate unive

Re: [Haskell-cafe] ANNOUNCE: Salsa: A .NET Bridge for Haskell

2008-10-13 Thread Andrew Coppin
Alex Queiroz wrote: Hallo, On Fri, Oct 10, 2008 at 5:48 PM, Andrew Coppin <[EMAIL PROTECTED]> wrote: In what way? As far as I'm aware, .NET never really caught on and has long since become obsolete. Or do you just mean the type system machinery that has been developed could be used for othe

Re: [Haskell-cafe] ANNOUNCE: Salsa: A .NET Bridge for Haskell

2008-10-13 Thread Albert Y. C. Lai
Alex Queiroz wrote: On Fri, Oct 10, 2008 at 5:48 PM, Andrew Coppin In what way? As far as I'm aware, .NET never really caught on and has long since become obsolete. In what alternate universe? Anthropic Principle: Everyone is in a different bubble of observable reality. __

Re: [Haskell-cafe] Hackage and GUI (was Hackage status with GHC 6.10 release candidate)

2008-10-13 Thread Duncan Coutts
On Mon, 2008-10-13 at 16:15 +0200, Hans van Thiel wrote: > What's the status of Gtk2Hs with regard to Cabal? Is it correct that not > one of the applications on Hackage, and there are some, uses or can use > a GUI at this point in time? Gtk2Hs still does not use Cabal as its build system. With th

[Haskell-cafe] Re: 2008-10-12 Hackage status with GHC 6.10 release candidate

2008-10-13 Thread Duncan Coutts
On Mon, 2008-10-13 at 10:54 -0700, Don Stewart wrote: > marlowsd: > > Don Stewart wrote: > > > > >Note that these builds are with "soft deps", provided on hackage, > > > > > >base < 4 > > >parsec < 3 > > >HaXml == 1.13.* > > >QuickCheck < 2 > > > > > >which train cabal-install to b

Re: [Haskell-cafe] Still stacking monad transformers

2008-10-13 Thread Arnar Birgisson
Hi Andrew, On Mon, Oct 13, 2008 at 19:58, Andrew Coppin <[EMAIL PROTECTED]> wrote: > Right. OK. So... isn't there a class somewhere called MonadChoice or > similar, which defines (<|>)? Just to pitch in a helpful tip, Hoogle is excellent for these kind of questions (which come up very often): ht

Re: [Haskell-cafe] Still stacking monad transformers

2008-10-13 Thread Dino Morelli
On Mon, 13 Oct 2008, Andrew Coppin wrote: Reid Barton wrote: It's not difficult: the operation is called mplus :: MyMonad a -> MyMonad a -> MyMonad a and already exists (assuming the author of ListT has not forgotten to write a MonadPlus instance). I see... I was under the impression that

[Haskell-cafe] Multi-line string literals are both easy /and/ elegant in Haskell

2008-10-13 Thread Matt Morrow
The new QuasiQuotes extension arriving with ghc 6.10 is very exciting, and handling multi-line string literals is like stealing candy from a baby. ;) - -- Here.hs module Here (here) where import Language.Haskell.TH.Quote

Re: [Haskell-cafe] Still stacking monad transformers

2008-10-13 Thread Jonathan Cast
On Mon, 2008-10-13 at 18:58 +0100, Andrew Coppin wrote: > Jonathan Cast wrote: > >> I see... I was under the impression that "mplus" is just any arbitrary > >> binary operation over a given monad. How do you know what it does for a > >> specific monad? > >> > > > > Process of elimination. S

Re: [Haskell-cafe] Still stacking monad transformers

2008-10-13 Thread Andrew Coppin
Jonathan Cast wrote: I see... I was under the impression that "mplus" is just any arbitrary binary operation over a given monad. How do you know what it does for a specific monad? Process of elimination. Sometimes, this doesn't narrow things down to a single operation, but it gives you a

[Haskell-cafe] Re: 2008-10-12 Hackage status with GHC 6.10 release candidate

2008-10-13 Thread Don Stewart
marlowsd: > Don Stewart wrote: > > >Note that these builds are with "soft deps", provided on hackage, > > > >base < 4 > >parsec < 3 > >HaXml == 1.13.* > >QuickCheck < 2 > > > >which train cabal-install to build a larger set of packages. > > Will this happen automatically somehow,

Re: [Haskell-cafe] Still stacking monad transformers

2008-10-13 Thread Andrew Coppin
Reid Barton wrote: It's not difficult: the operation is called mplus :: MyMonad a -> MyMonad a -> MyMonad a and already exists (assuming the author of ListT has not forgotten to write a MonadPlus instance). I see... I was under the impression that "mplus" is just any arbitrary binary oper

Re: [Haskell-cafe] Could not build win32 dll..

2008-10-13 Thread Ian Lynagh
Hi Yakov, On Mon, Oct 13, 2008 at 07:47:15PM +0400, Yakov ZAYTSEV wrote: > > Sadly, I've found --mk-dll option unrecognized by latest stable GHC 6.8.3.. > I'm new to win32 development > How one can make win32 dll at the moment? > I've successfully compiled Adder sources from example from section

Re: [Haskell-cafe] Re: Interesting new user perspective

2008-10-13 Thread Jonathan Cast
On Mon, 2008-10-13 at 18:38 +0100, Andrew Coppin wrote: > Ryan Ingram wrote: > > I would go further than that. To Andrew's question, I say: > > > > Yes, we want to encourage "these people" to learn Haskell. We want to > > smash all their expectations into tiny little pieces. We want their > > br

Re: [Haskell-cafe] Still stacking monad transformers

2008-10-13 Thread Jonathan Cast
On Mon, 2008-10-13 at 18:28 +0100, Andrew Coppin wrote: > Reid Barton wrote: > > It's not difficult: the operation is called > > > > mplus :: MyMonad a -> MyMonad a -> MyMonad a > > > > and already exists (assuming the author of ListT has not forgotten to > > write a MonadPlus instance). > > >

Re: [Haskell-cafe] Re: Interesting new user perspective

2008-10-13 Thread Andrew Coppin
Ryan Ingram wrote: I would go further than that. To Andrew's question, I say: Yes, we want to encourage "these people" to learn Haskell. We want to smash all their expectations into tiny little pieces. We want their brains to explode. And after that, we want to take what is left, pick it up

Re: [Haskell-cafe] Query regarding Type classes

2008-10-13 Thread Andrew Coppin
Arun Suresh wrote: Hello folks, Im kinda new to haskell. Ive only been fiddling around with it for bout 3 - 4 weeks now. And for the life of me... i cant seem to figure out why this doesnt work : class Foo a where fooFunc :: a -> Int data FooData = FData instance Foo FooData where

Re: [Haskell-cafe] Re: Interesting new user perspective

2008-10-13 Thread Ryan Ingram
On Mon, Oct 13, 2008 at 6:02 PM, Mauricio <[EMAIL PROTECTED]> wrote: > On Fri, Oct 10, 2008 at 10:49 PM, Andrew Coppin <[EMAIL PROTECTED]> wrote: >> _Some_ newcommers flounder because they expect Haskell to be just another >> VB / C++ / Java / whatever. (Do we really want to encourage these people

Re: [Haskell-cafe] Associated Types and several Classes

2008-10-13 Thread Ryan Ingram
First, a comment. I don't understand why you have so many classes! What proof invariants are they helping you enforce? Do you really a constraint that says that something is a "Rule"? Are you going to write functions that are polymorphic over CRule? How can you do so when CRule has no methods?

[Haskell-cafe] Re: Interesting new user perspective

2008-10-13 Thread Mauricio
_Some_ newcommers flounder because they expect Haskell to be just another VB / C++ / Java / whatever. (Do we really want to encourage these people to be learning Haskell in the first place?) (...) I hope so. One of my most important motivations to try Haskell was that I thought it was radically

[Haskell-cafe] Could not build win32 dll..

2008-10-13 Thread Yakov ZAYTSEV
Hello, Sadly, I've found --mk-dll option unrecognized by latest stable GHC 6.8.3.. I'm new to win32 development How one can make win32 dll at the moment? I've successfully compiled Adder sources from example from section 11.5.4 of user guide I need to build dll to be called from foreign applicatio

[Haskell-cafe] Associated Types and several Classes

2008-10-13 Thread Martin Hofmann
> {-# OPTIONS_GHC -fglasgow-exts #-} > module Test where >import qualified Data.Set as S Hi. I try to model the following: Hypotheses are build up from Rules, which itself are made of the type Rule. Because I may change the implementation later, I want to use type classes, which define the signa

Re: [Haskell-cafe] Re: Interesting new user perspective

2008-10-13 Thread Niklas Broberg
> > *HTML> toString $ tag "b" [] [tag "i" [] [text "<>"], text "test"] > > "<>test" > > I'd say the big problem is that your embedded language for describing > HTML is way more complex for a domain expert than > > doc = renderHTML $(q "#{v1}#{v2}") >where >v1 = "<>" >v2 =

[Haskell-cafe] Hackage and GUI (was Hackage status with GHC 6.10 release candidate)

2008-10-13 Thread Hans van Thiel
On Sun, 2008-10-12 at 14:46 -0700, Don Stewart wrote: > Hey all. > > The GHC 6.10 RCs are out, and we're preparing the release. To help manage the > transistion to GHC 6.10 it is now possible to actually build all the 3rd party > Haskell packages, and publish their results wrt. the release cand

Re: [Haskell-cafe] Re: Interesting new user perspective

2008-10-13 Thread Ryan Ingram
Normally I agree with you, apfelmus, but here at least I have to differ! On Mon, Oct 13, 2008 at 11:50 AM, apfelmus <[EMAIL PROTECTED]> wrote: > *HTML> toString $ tag "b" [] [tag "i" [] [text "<>"], text "test"] > "<>test" I'd say the big problem is that your embedded language for describing HT

Re: [Haskell-cafe] Overlapping/Incoherent instances

2008-10-13 Thread Sean Leather
> As part of a project to formalize the theory of overlapping instances, > I'm looking for examples of overlapping and incoherent instances and > their usage. EMGM [1] uses overlapping instances to make it more convenient to use extensible, generic functions on arbitrary datatypes. They're not ab

Re: [Haskell-cafe] ANNOUNCE: Salsa: A .NET Bridge for Haskell

2008-10-13 Thread Alex Queiroz
Hallo, On Fri, Oct 10, 2008 at 5:48 PM, Andrew Coppin <[EMAIL PROTECTED]> wrote: > Don Stewart wrote: >> >> This could be a game changer. >> > > In what way? As far as I'm aware, .NET never really caught on and has long > since become obsolete. Or do you just mean the type system machinery that >

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Graphalyze-0.4 and SourceGraph-0.2

2008-10-13 Thread Niklas Broberg
Ivan: > In this case, it isn't SourceGraph's fault: Haskell-Src-Exts can't parse it. > Maybe it doesn't parse CPP stuff properly? I'm not sure how I can get > SourceGraph to parse files only after they've been pre-processed... haskell-src-exts doesn't include a CPP processor no, but will discar

Re[2]: [Haskell-cafe] Query regarding Type classes

2008-10-13 Thread Bulat Ziganshin
Hello Arun, Monday, October 13, 2008, 2:50:27 PM, you wrote: > I agree that this does look more succinct... but what if I write some generic > code for the > in the render method of the Drawable class and package it into a library.. i recommend you to read http://haskell.org/haskellwiki/OOP_vs_

[Haskell-cafe] Re: Interesting new user perspective

2008-10-13 Thread apfelmus
Devin Mullins wrote: > apfelmus wrote: >> Yes. "Just" an injection problem is an understatement. And its the >> implementation of the abstract data type that determines how fast things >> are. Who said that it may not simply be a newtyped String ? > > I think the attraction to the SafeString examp

Re: [Haskell-cafe] Query regarding Type classes

2008-10-13 Thread Arun Suresh
On Mon, Oct 13, 2008 at 4:08 PM, Ryan Ingram <[EMAIL PROTECTED]> wrote: > On Mon, Oct 13, 2008 at 11:18 AM, Arun Suresh <[EMAIL PROTECTED]> > wrote: > ] you seem to have read my mind [:)].. i actaually hit upon this issue > while > ] trying to "transcode" some C++ to Haskell.. > > (literate haskel

Re: [Haskell-cafe] Query regarding Type classes

2008-10-13 Thread Ryan Ingram
Step 1: Forget everything you know about OO classes, then try again :) 2008/10/13 Arun Suresh <[EMAIL PROTECTED]>: > class Foo a where > fooFunc :: a -> Int > > data FooData = FData > > instance Foo FooData where > fooFunc _ = 10 So far so good. > class Bar a where > barFunc :: (Foo

Re: [Haskell-cafe] Query regarding Type classes

2008-10-13 Thread Ryan Ingram
On Mon, Oct 13, 2008 at 11:18 AM, Arun Suresh <[EMAIL PROTECTED]> wrote: ] you seem to have read my mind [:)].. i actaually hit upon this issue while ] trying to "transcode" some C++ to Haskell.. (literate haskell post, save it into "draw.lhs" and you can load it in ghci!) What you usually want w

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Graphalyze-0.4 and SourceGraph-0.2

2008-10-13 Thread Malcolm Wallace
Ivan Lazar Miljenovic <[EMAIL PROTECTED]> wrote: > In this case, it isn't SourceGraph's fault: Haskell-Src-Exts can't > parse it. Maybe it doesn't parse CPP stuff properly? I'm not sure how > I can get SourceGraph to parse files only after they've been > pre-processed... You could try using the

Re: [Haskell-cafe] Query regarding Type classes

2008-10-13 Thread Arun Suresh
Hello Ryan.. On Mon, Oct 13, 2008 at 3:33 PM, Ryan Ingram <[EMAIL PROTECTED]> wrote: > Step 1: Forget everything you know about OO classes, then try again :) you seem to have read my mind [:)].. i actaually hit upon this issue while trying to "transcode" some C++ to Haskell.. > > > 2008/10/13

Re: [Haskell-cafe] Haskell in Artificial Intelligence

2008-10-13 Thread Chryssochoidis Christos
On 13 Οκτ 2008, at 9:41 ΠΜ, Martin Hofmann wrote: Hi Christos, We and a colleague from Japan use Haskell for Inductive Functional Programming, i.e. learn programs from examples. However, we just have started to port our program to Haskell: http://www.cogsys.wiai.uni-bamberg.de/effalip/ Susum

[Haskell-cafe] Query regarding Type classes

2008-10-13 Thread Arun Suresh
Hello folks, Im kinda new to haskell. Ive only been fiddling around with it for bout 3 - 4 weeks now. And for the life of me... i cant seem to figure out why this doesnt work : class Foo a where fooFunc :: a -> Int data FooData = FData instance Foo FooData where fooFunc _ = 10 class

[Haskell-cafe] Re: 2008-10-12 Hackage status with GHC 6.10 release candidate

2008-10-13 Thread Simon Marlow
Don Stewart wrote: Note that these builds are with "soft deps", provided on hackage, base < 4 parsec < 3 HaXml == 1.13.* QuickCheck < 2 which train cabal-install to build a larger set of packages. Will this happen automatically somehow, or will users have to do this manually?

[Haskell-cafe] Haskell on mobile platforms

2008-10-13 Thread Janis Voigtlaender
Hi all, there were several discussions on this list about different implementations of Haskell running on the iPhone and other mobile platforms over the last three months or so. I would very much like to see the current state of what is and is not yet possible here reflected in the "Platforms" se

[Haskell-cafe] Re: Improving MTL instances (was: Overlapping/Incoherent instances)

2008-10-13 Thread J. Garrett Morris
On Mon, Oct 13, 2008 at 12:29 AM, Ryan Ingram <[EMAIL PROTECTED]> wrote: > Of course, the point of this message isn't just to complain. The > overlap implementation was abhorrent and it *is* better now than it > was before. I'm curious what you find abhorrent about the overlap implementation that

[Haskell-cafe] Re: Improving MTL instances (was: Overlapping/Incoherent instances)

2008-10-13 Thread Don Stewart
ryani.spam: > On Mon, Oct 13, 2008 at 2:04 AM, J. Garrett Morris > <[EMAIL PROTECTED]> wrote: > > Indeed - MTL seems to have been rewritten at some point in the past to > > prefer exhaustive enumeration to overlap. > > Indeed, and I actually think this is a weakness of the current > implementation

Re: [Haskell-cafe] Re: Interesting new user perspective

2008-10-13 Thread Devin Mullins
On Mon, Oct 13, 2008 at 08:43:48AM +0200, apfelmus wrote: > Yes. "Just" an injection problem is an understatement. And its the > implementation of the abstract data type that determines how fast things > are. Who said that it may not simply be a newtyped String ? I think the attraction to the Safe

[Haskell-cafe] Improving MTL instances (was: Overlapping/Incoherent instances)

2008-10-13 Thread Ryan Ingram
On Mon, Oct 13, 2008 at 2:04 AM, J. Garrett Morris <[EMAIL PROTECTED]> wrote: > Indeed - MTL seems to have been rewritten at some point in the past to > prefer exhaustive enumeration to overlap. Indeed, and I actually think this is a weakness of the current implementation. Anyone who comes up wit

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Graphalyze-0.4 and SourceGraph-0.2

2008-10-13 Thread Ivan Lazar Miljenovic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, 12 Oct 2008 20:01:32 -0400 Gwern Branwen <[EMAIL PROTECTED]> wrote:> > 'K. So SourceGraph doesn't do any error reporting? I'll keep that in mind. In this case, it isn't SourceGraph's fault: Haskell-Src-Exts can't parse it. Maybe it doesn't pa