Re: Polymorphic kinds

2003-08-14 Thread Sebastien Carlier
On Tuesday 05 August 2003 4:00 pm, Simon Peyton-Jones wrote: | id# :: (a :: # ) - a | id# x = x That should really be rejected. You couldn't call it because you'd have to instantiate 'a' to Int# or Double#, and that would mean different code for different calls. GHC (after modifying the

Re: Polymorphic kinds

2003-08-14 Thread Sebastien Carlier
On Tuesday 05 August 2003 1:51 pm, Simon Peyton-Jones wrote: The real question is: why does GHC distinguish kind * from kind #? For example, Int has kind * Int# has kind # The main reason is this: a polymorphic function assumes that values of type 'a' are

Polymorphic kinds

2003-08-04 Thread Sebastien Carlier
Hello, I am experimenting with GHC to write low level code (e.g., device drivers, interrupt handlers). The ultimate goal is to write a prototype operating system in Haskell, using the GHC RTS as a kind of microkernel (this appears to be relatively easy by removing all the dependencies on an

Re: SubProcess.lhs

2002-05-22 Thread Sebastien Carlier
Hi, Jens, I think it would be useful to have this included in the Haskell libraries. I'd be happy to fold it into POpen too, though I rather like the name SubProcess. Sure, please do. I'm not overly fond of the name I gave it, popen is definitely better. Maybe it would be a good thing to

Re: convering Fds to Handles

2002-05-17 Thread Sebastien Carlier
Hi, I have had problems with pipes and runProcess, now I am using forkProcess/executeFile/getProcessStatus and it works properly. Non-lazy IO presumably? Do you have an example you can show? Sure: ---_%--- cut here ---_%--- module Main where import IO import Posix import System main =

Re: convering Fds to Handles

2002-05-17 Thread Sebastien Carlier
I meant do you have an example of your working code. Sure. SubProcess.lhs Description: Binary data localhost% cat Main.hs module Main where import SubProcess main = do cs - subprocess /bin/cat [] (Just $ replicate 1 $ 'a') putStrLn $ show $ length cs localhost%

Re: convering Fds to Handles

2002-05-17 Thread Sebastien Carlier
On Friday, May 17, 2002, at 11:58 AM, Jerry, JiJie wrote: SubProcess.lhs:5: failed to load interface for `Posix': Could not find interface file for `Posix' while my Posix library files found in /usr/lib/ghc-5.02.3/imports/posix/ and also my /usr/lib/ghc-5.02.3/package.conf

Re: preprocessing printf/regex strings (like ocaml)

2002-05-14 Thread Sebastien Carlier
On Tuesday, May 14, 2002, at 06:37 AM, anatoli wrote: Brian Huffman [EMAIL PROTECTED] wrote: Here is a printf-style function that I hacked up this morning; it uses type classes but it doesn't need functional dependencies: [snip] It's very nice and even extendable, though `class Printf

Re: preprocessing printf/regex strings (like ocaml)

2002-05-12 Thread Sebastien Carlier
the python string notation (str % tuple) would fit really well too... putStrLn "hello %s, you got %d right" % ("oliver", 5) Might be nice. What would be the type of putStrLn then? The type of putStrLn would remain unchanged. The idea would be to let the compiler translate the string "hello

Re: convering Fds to Handles

2002-04-25 Thread Sebastien Carlier
Is there a way to convert an Fd variable to a Handle variable? Specifically, I'd like to use pipe from the Posix library to create a pipe and then pass one end of it to runProcess as its stdin. You can use the (undocumented) function Posix.fdToHandle I have had problems with pipes and

Re: RFC: Syntax for implicit parameter bindings

2002-02-04 Thread Sebastien Carlier
Hi all, How about the following syntax: (addBase 5 | ?base = 10) This is quite unlike from other binding constructs in Haskell, so maybe something more similar to list comprehension would be better: (addBase 5 | ?base - 10) Cheers, Sebastien

Re: More 5.02 downloads

2001-10-01 Thread Sebastien Carlier
Is there any chance of a MacOSX binary release? We're not planning to make one ourselves, but hopefully one of our friends with MacOS X expertise will help out: Atze, Sebastien - any plans? I have started building one, it should be ready in a few days. -- Sebastien

Re: ghc 5 on mac os x

2001-07-03 Thread Sebastien Carlier
I was just wondering if you have tried to get the OS X port of GHC 5 to work. I tried compiling this monster with GHC 4.08.1, but could not get around what appeared to be syntax errors showing up in the source. Have you made any progress? I have built a binary distribution which is just

Re: GHC on MacOS X

2001-04-19 Thread Sebastien Carlier
in the RTS. A while ago I managed to get that working, but I stupidly lost some of the patches. I've been too busy to do it again recently, but I will have more time by the end of the month. -- Sebastien Carlier ___ Haskell mailing list [EMAIL PROTECTED

Re: The Do-Let-Braces problem

2001-02-14 Thread Sebastien Carlier
t wouldn't be adequate for Haskell, but it demonstrates the idea. By the way, with a proper editor, you wouldn't even need the layout rule. Source code would be stored with explicit bracing, and the editor could hide all these cluttering symbols, or display them in any fancy way you like. -- Sebasti

An Haskell compilation server

2001-01-17 Thread Sebastien Carlier
about (should the parsing be made locally by the driver, or remotely...). How does it sound ? -- Sebastien Carlier EPITA, Posse42 ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Extending the do-notation

2001-01-07 Thread Sebastien Carlier
Sometimes I need to write code which looks like this: do x - m1 let y = unzip x ... -- never using x anymore I thinks the following extension to do-notation would be useful: pat - exp1 # exp2 ; exp3 would be rewritten as exp2 = ((\pat - exp3) . exp1) so that the

Re: Extending the do-notation

2001-01-07 Thread Sebastien Carlier
import Monad ... do y - liftM unzip m1 Thanks. I'm constantly amazed by the number of tricks one has to know before he can write concise code using the do-notation (among other things, I used to write "x - return $ m" instead of "let x = m"). Is there a paper demonstrating the most

Excessive restriction in ghc ?

2000-12-19 Thread Sebastien Carlier
around rename/RnSource.lhs:249. Regards, Sebastien Carlier ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell