Re: [Haskell-cafe] Equality constraints in type families

2008-03-24 Thread Manuel M T Chakravarty
Manuel M T Chakravarty: again, i gave a concrete example of how ghc behaves as i would expect, not as that decomposition rule would suggest. Maybe you can explain why you think so. I didn't understand why you think the example is not following the decomposition rule. Actually, see http

[Haskell-cafe] Monad instance for Data.Set

2008-03-24 Thread oleg
The following code solves exactly the problem of implementing (restricted) MonadPlus in terms of Data.Set: http://okmij.org/ftp/Haskell/DoRestrictedM.hs The code is written to demonstrate the do-notation. We write the monadic code as usual: > test1s_do () = do > x <- return "a" > re

Re: [Haskell-cafe] Equality constraints in type families

2008-03-24 Thread Manuel M T Chakravarty
Claus Reinke: type family F a :: * -> * F x y ~ F u v <=> F x ~ F u /\ y ~ v why would F x and F u have to be the same functions? shouldn't it be sufficient for them to have the same result, when applied to y and v, respectively? Oh, yes, that is sufficient and exactly what is meant by F x ~ F

Re: [Haskell-cafe] Equality constraints in type families

2008-03-24 Thread Manuel M T Chakravarty
Claus Reinke: type family F a :: * -> * F x y ~ F u v <=> F x ~ F u /\ y ~ v words, in a type term like (F Int Bool), the two parameters Int and Bool are treated differently. Int is treated like a parameter to a function (which is what you where expecting), whereas Bool is treated li

[Haskell-cafe] [GSoC] Parallel Benchmarking and Profiling

2008-03-24 Thread Etienne Laurin
Hello, I am putting together a student proposal to participate in Google's Summer of Code with one of the following project ideas. Parallel programming benchmarking and benchmark suite - http://hackage.haskell.org/trac/summer-of-code/ticket/1544 Are there open source projects and real world appl

Re: [Haskell-cafe] Terminating GLUT/GLFW programs

2008-03-24 Thread hjgtuyl
Thanks for the info, but it doesn't solve my problem; I adjusted the path, reinstalled GLFW and recompiled the program, but it still does not terminate. Henk-Jan On Mon, 24 Mar 2008 08:58:05 +0100, Peter Verswyvelen <[EMAIL PROTECTED]> wrote: Hi, I had a similar (unsolved) problem w

Re: [Haskell-cafe] SoC project: Python-Haskell bridge - request for feedback

2008-03-24 Thread Don Stewart
westondan: > Bulat Ziganshin wrote: > >Hello Michal, > > > >Monday, March 24, 2008, 11:38:07 PM, you wrote: > > > >>Python-Haskell bridge > > > >seems interesting > > This is indeed interesting for those (like me) wanting to introduce > Haskell stealthily into a Python-based facility: essentially

Re[2]: [Haskell-cafe] SoC project: Python-Haskell bridge - request for feedback

2008-03-24 Thread Bulat Ziganshin
Hello Dan, Tuesday, March 25, 2008, 1:29:51 AM, you wrote: >> you forget about ability to use Python as scripting language inside >> Haskell programs. look at HsLua library as example of this > This is much less interesting for those (like me) who, once in Haskell, > don't feel the least incline

Re: [Haskell-cafe] SoC project: Python-Haskell bridge - request for feedback

2008-03-24 Thread Dan Weston
Bulat Ziganshin wrote: Hello Michal, Monday, March 24, 2008, 11:38:07 PM, you wrote: Python-Haskell bridge seems interesting This is indeed interesting for those (like me) wanting to introduce Haskell stealthily into a Python-based facility: essentially, leave the IO monad in Python but

[Haskell-cafe] Sorting with a weaker form of Ord (Re: Type constraints for class instances)

2008-03-24 Thread apfelmus
apfelmus wrote: Krzysztof Skrzętnicki wrote: class YOrd a where ycmp :: a -> a -> (a,a) Unfortunately, the performance of ysort is rather low. I believe that it is impossible to create any sorting algorithm that uses ycmp instead of compare, that is faster than O(n^2). It is possible, t

[Haskell-cafe] Re: Random Monad

2008-03-24 Thread apfelmus
Matthew Pocock wrote: Who currently maintains the Random monad code? /me whispers: have a look at http://code.haskell.org/monadrandom/MonadRandom.cabal Regards, apfelmus ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.or

[Haskell-cafe] Re: deconstruction of the list/backtracking applicative functor?

2008-03-24 Thread apfelmus
Conal Elliott wrote: Thanks for the reply. Here's the decomposition I had in mind. Start with type List a = Maybe (a, List a) Rewrite a bit type List a = Maybe (Id a, List a) Then make the type *constructor* pairing explicit type List a = Maybe ((Id :*: List) a) where new

Re: [Haskell-cafe] Random Monad

2008-03-24 Thread Bryan O'Sullivan
Matthew Pocock wrote: > On Monday 24 March 2008, Henning Thielemann wrote: >> On Mon, 24 Mar 2008, Matthew Pocock wrote: >>> Who currently maintains the Random monad code? I have some patches to >>> contribute. >> Do you refer to the code on the wiki? > > No, to the code in darcs at http://code.ha

[Haskell-cafe] Re: Type constraints for class instances

2008-03-24 Thread apfelmus
Krzysztof Skrzętnicki wrote: class YOrd a where ycmp :: a -> a -> (a,a) Unfortunately, the performance of ysort is rather low. I believe that it is impossible to create any sorting algorithm that uses ycmp instead of compare, that is faster than O(n^2). It is possible, the following impl

Re: [Haskell-cafe] SoC project: Python-Haskell bridge - request for feedback

2008-03-24 Thread Bulat Ziganshin
Hello Michal, Monday, March 24, 2008, 11:38:07 PM, you wrote: > Python-Haskell bridge seems interesting > Benefits for Haskell you forget about ability to use Python as scripting language inside Haskell programs. look at HsLua library as example of this -- Best regards, Bulat

[Haskell-cafe] SoC project: Python-Haskell bridge - request for feedback

2008-03-24 Thread Michał Janeczek
Hi, I am a student interested in participating in this year's SoC. At http://tsk.ch.uj.edu.pl/~janeczek/socapp.html (and also below in this email) you can find a draft of my project proposal. I'd like to ask you to comment on it, especially the deliverables part. Are you interested in such a proj

Re: [Haskell-cafe] ghc warn-unused-imports

2008-03-24 Thread Henning Thielemann
On Mon, 24 Mar 2008, Evan Laforge wrote: So it appears that GHC will warn about "unused" imports when you import qualified if you could have gotten the symbol from somewhere else. For instance, if you write: import qualified Control.Monad.Trans as Trans import qualified Control.Monad.Writer a

Re: [Haskell-cafe] Random Monad

2008-03-24 Thread Matthew Pocock
On Monday 24 March 2008, Henning Thielemann wrote: > On Mon, 24 Mar 2008, Matthew Pocock wrote: > > Who currently maintains the Random monad code? I have some patches to > > contribute. > > Do you refer to the code on the wiki? No, to the code in darcs at http://code.haskell.org/monadrandom Matth

Re: [Haskell-cafe] Haddock Help Required

2008-03-24 Thread David Waern
2008/3/24, Dominic Steinitz <[EMAIL PROTECTED]>: > What should I be using for the file name for the read-interface option > in haddock? You must use a file that is on your own hard drive and that is generated with version 2.0 of Haddock, since that is what you're using. The interface file format

Re: [Haskell-cafe] Random Monad

2008-03-24 Thread Henning Thielemann
On Mon, 24 Mar 2008, Matthew Pocock wrote: Who currently maintains the Random monad code? I have some patches to contribute. Do you refer to the code on the wiki? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/

[Haskell-cafe] BUG: genObjectNames dies on Win32

2008-03-24 Thread Jefferson Heard
Could this get forwarded on to another more appropriate maling list? Confirmed on GHC and GHCi 6.6 and 6.8, Graphics.Rendering.OpenGL.GL.genObjectNames n is dying if I ask it to return an IO :: [DisplayList] For an example, just open GHCI and change context to Graphics.Rendering.OpenGL.GL and do

[Haskell-cafe] Monad instance for Data.Set, again

2008-03-24 Thread Henning Thielemann
The blog article http://www.randomhacks.net/articles/2007/03/15/data-set-monad-haskell-macros describes a variant of the Monad class which allows to restrict the type of the monadic result, in order to be able to make Data.Set an instance of Monad (requiring Ord constraint for the monadic re

Re: [Haskell-cafe] Re: deconstruction of the list/backtracking applicative functor?

2008-03-24 Thread Conal Elliott
Thanks for the reply. Here's the decomposition I had in mind. Start with type List a = Maybe (a, List a) Rewrite a bit type List a = Maybe (Id a, List a) Then make the type *constructor* pairing explicit type List a = Maybe ((Id :*: List) a) where newtype (f :*: g) a = Prod

[Haskell-cafe] ghc warn-unused-imports

2008-03-24 Thread Evan Laforge
So it appears that GHC will warn about "unused" imports when you import qualified if you could have gotten the symbol from somewhere else. For instance, if you write: import qualified Control.Monad.Trans as Trans import qualified Control.Monad.Writer as Writer and use "Trans.lift", it will compl

[Haskell-cafe] Haddock Help Required

2008-03-24 Thread Dominic Steinitz
What should I be using for the file name for the read-interface option in haddock? Trying to use the file on www.haskell.org gives this: [EMAIL PROTECTED]:~/asn15/asn1> haddock -html -o hdoc Pretty.hs -B /usr/lib/ghc-6.8.2 --optghc="-fglasgow-exts" --read-interface=http://www.haskell.org/ghc/docs/

[Haskell-cafe] Random Monad

2008-03-24 Thread Matthew Pocock
Hi, Who currently maintains the Random monad code? I have some patches to contribute. Matthew ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] HXT and types in Control.Arrow.ArrowTree

2008-03-24 Thread Robert Vollmert
Hello, On Mar 23, 2008, at 18:53, Albert Y. C. Lai wrote: You are right, there is no harm generalizing deep, since a related combinator, multi, has the more general type. thanks for the reply! Perhaps I'll suggest the generalization to the HXT authors. Meanwhile, I've discovered examples

[Haskell-cafe] Re: deconstruction of the list/backtracking applicative functor?

2008-03-24 Thread apfelmus
(Sorry for the late reply) Conal Elliott wrote: Is there a known deconstruction of the list/backtracking applicative functor (AF)? If I decompose the list type into pieces (Maybe, product, composition), I think I can see where the ZipList AF comes from, but not the list/backtracking AF. So, y

Re: [Haskell-cafe] more on FFI build error

2008-03-24 Thread Claude Heiland-Allen
Galchin Vasili wrote: line #102 ... allocaBytes (#const sizeof(struct mq_attr)) $ \ p_attrs -> do definition of struct mq_attr on Linux ... struct mq_attr { long int mq_flags;/* Message queue flags. */ long int mq_maxmsg; /* Maximum number of messages. */ long int mq_msgs

Re: [Haskell-cafe] Gtk2hs on GHC6.8.2?

2008-03-24 Thread Duncan Coutts
In message <[EMAIL PROTECTED]> "Ryan Ingram" <[EMAIL PROTECTED]> writes: > The WinXP binary release of Gtk2hs won't install for me; it seems to > expect GHC6.8.1 and refuses to install on 6.8.2. Right. It does that on purpose and with good reason. Do you think the error message could be improved

Re: [Haskell-cafe] Equality constraints in type families

2008-03-24 Thread Claus Reinke
type family F a :: * -> * F x y ~ F u v <=> F x ~ F u /\ y ~ v why would F x and F u have to be the same functions? shouldn't it be sufficient for them to have the same result, when applied to y and v, respectively? Oh, yes, that is sufficient and exactly what is meant by F x ~ F u. It mea

Re: [Haskell-cafe] Equality constraints in type families

2008-03-24 Thread Claus Reinke
type family F a :: * -> * F x y ~ F u v <=> F x ~ F u /\ y ~ v words, in a type term like (F Int Bool), the two parameters Int and Bool are treated differently. Int is treated like a parameter to a function (which is what you where expecting), whereas Bool is treated like a parameter to

[Haskell-cafe] RE: How to implement Read instance for user defined type

2008-03-24 Thread Verma Anurag-VNF673
That works, but is probably not what you want. You can use the lex function to parse identifiers not enclosed in quotes: > instance Read Mark where > readsPrec _ str = [(Mark x, t') | ("mark",t) <- lex str, > (x,t') <- reads t I played a bit around w

Re: [Haskell-cafe] Re: Libraries need a new owner

2008-03-24 Thread Matthew Pocock
On Monday 24 March 2008, Don Stewart wrote: > Let's get a new faster Data.Map and other containers ready to go by the > end of the northern summer? And while we are visiting this, can I put in a vote for a seperation between the default Data.* container concrete implementations and associated cla

Re: [Haskell-cafe] Re: HFuse: ls fails in HelloFS

2008-03-24 Thread Jason Dusek
What about System.FUSE then? -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Terminating GLUT/GLFW programs

2008-03-24 Thread Peter Verswyvelen
Hi, I had a similar (unsolved) problem with GLUT but on my system (Windows XP + GHC 6.8.2) GLFW works fine, exiting is no problem at all. But when building GLFW, make sure that the GHC gcc-lib directory comes *before* the MinGW/Cygwin directory in your PATH environment variable, since when

[Haskell-cafe] Re: Libraries need a new owner

2008-03-24 Thread Don Stewart
ahey: > Hello Folks, > > As some of you will be aware, I have been working on various Map > implementations that currently live here.. > > http://code.haskell.org/collections/collections-ghc6.8 > > The libs in question being Data.Tree.AVL, Data.Trie.General and a few > other bits like Data.COrde

[Haskell-cafe] Gtk2hs on GHC6.8.2?

2008-03-24 Thread Ryan Ingram
The WinXP binary release of Gtk2hs won't install for me; it seems to expect GHC6.8.1 and refuses to install on 6.8.2. Is there any significant difference in the compilers that would cause it not to work on 6.8.2? Is there a way I can trick it into installing? I really don't want to have to build