[Haskell-cafe] Internships on GHC and Haskell at MSR Cambridge

2006-07-25 Thread Simon Peyton-Jones
Gentle Haskellers Would you be interested in working for three months at Microsoft Research, Cambridge, on a project related to GHC or Haskell? MSR Cambridge now takes interns *year-round*, not just in the summer months. Simon Marlow and I are keen to attract motivated and well-qualified folk

[Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-25 Thread Dmitri O.Kondratiev
I am trying to derive MyOrd class from Eq (Prelude): class Eq a = MyOrd a where (%=), (%), (%=) :: a - a - Bool x %= y = (x y || x == y) x % y = y x x %= y = (y x || x == y) I get these errors: ClassTest.hs:28:21: Could not deduce (Ord a) from the context

Re: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-25 Thread Jared Updike
I am trying to derive MyOrd class from Eq (Prelude): class Eq a = MyOrd a where (%=), (%), (%=) :: a - a - Bool x %= y = (x y || x == y) x % y = y x x %= y = (y x || x == y) Q: What's wrong? Why 'Ord' gets into play here? You are using which is a function

Re: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-25 Thread Jared Updike
Sorry, left out an important verb, *hide*: You can the prelude and thus the Ord class and make your own and You can *hide* the prelude and thus the Ord class and make your own and Jared. -- http://www.updike.org/~jared/ reverse )-: ___

Re: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-25 Thread Bulat Ziganshin
Hello Dmitri, Tuesday, July 25, 2006, 8:15:41 PM, you wrote: class Eq a = MyOrd a where (%=), (%), (%=) :: a - a - Bool x %= y = (x y || x == y) x % y = y x x %= y = (y x || x == y) you are mixing definition of class and its (default) instance. try the

[Haskell-cafe] ghc hackathon start time?

2006-07-25 Thread Greg Fitzgerald
What time on September 14th will the GHC Hackathon begin? I don't need a precise answer, just a quick one. Plus or minus an hour will do.Thanks,Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

RE: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-25 Thread Ralf Lammel
Bulat, Dmitri is not necessarily mixing [...] class and its (default) instance. Bulat, one could suspect a reasonable use of default class methods: http://www.haskell.org/onlinereport/decls.html#overloading Indeed, Dmitri's declarations make sense as default class methods. ... except for Jared's

Re: [Haskell-cafe] ghc hackathon start time?

2006-07-25 Thread Malcolm Wallace
What time on September 14th will the GHC Hackathon begin? I don't need a precise answer, just a quick one. Plus or minus an hour will do. Morning certainly. In the absence of a more definite answer from the Simons (or the Galois hosts), I would guess 0900-1000hrs local time. Regards,

Re[2]: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-25 Thread Bulat Ziganshin
Hello Ralf, Tuesday, July 25, 2006, 9:59:58 PM, you wrote: Dmitri is not necessarily mixing [...] class and its (default) instance. sorry, i was thoughtless. it really seems like a mistake in use MyOrd class instead of attempt to use Ord operations. Dmitri should know better :) -- Best

[Haskell-cafe] scripting in haskell

2006-07-25 Thread mvanier
Hi, I was playing around with runhaskell (runghc to be precise), and I discovered the limitation wherein you have to use the file suffix .hs. Don't get me wrong, runhaskell is great, but if you didn't have that restriction it would make haskell much more attractive to many programmers who

Re: [Haskell-cafe] Why Haskell?

2006-07-25 Thread Matthew Bromberg
Well now that I understand how it works, I'm perfectly happy with the current functionality. As long as I put all my FFI imports into one module and compile that, then I can load the other modules into GHCi at will during development and testing. I was going to do some FFI imports into another

Re: [Haskell-cafe] Why Haskell?

2006-07-25 Thread Matthew Bromberg
vim has been my choice as well. Now that vim 7.0 has tabbed windows it's better than ever. All they need now is a way to integrate it with a console window I guess you can find scite/scintilla settings for Haskell as well http://www4.in.tum.de/~haftmann/resources/haskell.properties Marc

Re: [Haskell-cafe] scripting in haskell

2006-07-25 Thread Marc Weber
Looking through the mailing list I see something from May 2005 on this topic about adding the equivalent of gcc's -x option to ghc. What's the status of that? You should always be able to do something like this: #!/usr/bin/runfileAsHSFile $@ module Main where import blah

Re: [Haskell-cafe] RE: ANN: System.FilePath 0.9

2006-07-25 Thread Andrew Pimlott
[Sorry for the late reply.] On Wed, Jul 19, 2006 at 03:16:48AM +0100, Neil Mitchell wrote: I want to make sure a filename is valid. For example, prn and con This is another rat's nest, so I suggest that it be dealt with separately from the basic filepath module. The notion of valid is

[Haskell-cafe] StablePtr's and castStablePtrToPtr

2006-07-25 Thread DeeJay-G615
I have a query which is asked out of interest's sake... I'm essentially looking for an affirmation of what I think I already understand (or some info if I'm deluded ;)). To put this in context... I have some C code... typedef int func(void *); void from_maybe_int(void *val, func

[Haskell-cafe] Re: ANN: System.FilePath 0.9

2006-07-25 Thread Neil Mitchell
Hi It's already there - see System.Directory.createDirectoryIfMIssing. I'd missed that one entirely, and I think other people had (because I added ensureDirectory at a request of several people), will go. If we have shortPath at all, perhaps it would be better named

Re: [Haskell-cafe] RE: ANN: System.FilePath 0.9

2006-07-25 Thread Neil Mitchell
Hi Its a rats nest to do it properly, but some very basic idea of does this path have things which there is no way could possibly be in a file - for example c:\|file is a useful thing to have. This seems to encourage the classic mistake of checking not known bad rather than known good.