[Haskell-cafe] hOp

2004-02-19 Thread sebc
The RTS of GHC is truly an amazing piece of software. By removing the system-specific bits, and just adding a few lines of C and assembly code, we were able to turn it into a standalone micro-kernel that can be extended in our favorite language. A screenshot is available here:

Re: [Haskell-cafe] hOp

2004-02-19 Thread sebc
The first source release of hOp, a micro-kernel based on GHC's RTS that runs Haskell code natively, is available here: http://www.macs.hw.ac.uk/~sebc/hOp/ -- Sébastien Carlier Jérémy Bobbio signature.asc Description: Digital signature ___ Haskell

Re: looking for System.Console.Readline example

2003-12-02 Thread sebc
A minor modification to Martin's code gives you laziness: import System.IO.Unsafe import System.Console.Readline readlines :: String - IO [String] readlines prompt = do input - readline prompt case input of Nothing - return [] Just str -

Re: System.Posix (symbolic links)

2003-11-29 Thread sebc
You need to use getSymbolicLinkStatus instead of getFileStatus, which always follows symbolic links (I guess getSymbolicLinkStatus uses the stat system call, while getSymbolicLinkStatus uses lstat). -- Sebastien On Sat, Nov 29, 2003 at 08:24:08PM +0100, Johannes Goetz wrote: Hi! Sorry for

Re: Why are strings linked lists?

2003-11-28 Thread sebc
On Fri, Nov 28, 2003 at 12:37:30PM +0100, Wolfgang Jeltsch wrote: So, what is happening that there is 1 cell in the heap containing the representation of 'a', and then a linked list of length 500, where each element points to that cell. Yes, you're right. But if you choose the array

Re: lifting functions to tuples?

2003-11-19 Thread sebc
On Tue, Nov 18, 2003 at 05:56:19PM -0800, [EMAIL PROTECTED] wrote: Abraham Egnor wrote: The classic way to write a lift function for tuples is, of course: liftTup f (a, b) = (f a, f b) which has a type of (a - b) - (a, a) - (b, b). I've been wondering if it would be possible to

Re: lifting functions to tuples?

2003-11-19 Thread sebc
Again, I think what you propose is different from what was asked. On 2003-11-18 at 10:46EST Abraham Egnor wrote: The classic way to write a lift function for tuples is, of course: liftTup f (a, b) = (f a, f b) which has a type of (a - b) - (a, a) - (b, b). I've been wondering if it

Re: lifting functions to tuples?

2003-11-18 Thread sebc
On Tue, Nov 18, 2003 at 04:34:43PM +, Jon Fairbairn wrote: On 2003-11-18 at 10:46EST Abraham Egnor wrote: The classic way to write a lift function for tuples is, of course: liftTup f (a, b) = (f a, f b) which has a type of (a - b) - (a, a) - (b, b). I've been wondering if it

Re: bracket, (un)block and MonadIO

2003-09-04 Thread sebc
Hi, On Thu, Sep 04, 2003 at 10:45:17AM +0100, Simon Marlow wrote: Would anything prevent block, unblock, bracket (and other similar functions working on IO actions) from being generalized to all intances of MonadIO? I'm afraid I can't see a way to generalise the types of block and