Re: [Haskell-cafe] tuple and HList

2005-03-20 Thread John Meacham
This was brought up in passing in a recent conversation on haskell-cafe http://www.haskell.org//pipermail/haskell-cafe/2005-March/009321.html It certainly seems like an interesting idea, Would type inference still work okay? The other problem mentioned is that they are not quite isomorphic,

Re: [Haskell-cafe] invalid character encoding

2005-03-20 Thread Keean Schupke
One thing I don't like about this automatic conversion is that it is hidden magic - and could catch people out. Let's say I don't want to use it... How can I do the following (ie what are the new API calls): Open a file with a name that is invalid in the current locale (say a zip disc from

Re: [Haskell-cafe] tuple and HList

2005-03-20 Thread David Menendez
John Meacham writes: This was brought up in passing in a recent conversation on haskell-cafe http://www.haskell.org//pipermail/haskell-cafe/2005-March/009321.html It certainly seems like an interesting idea, Would type inference still work okay? The other problem mentioned is that

Re: [Haskell-cafe] invalid character encoding

2005-03-20 Thread ross
On Sun, Mar 20, 2005 at 12:59:52PM +, Keean Schupke wrote: How can I do the following (ie what are the new API calls): Open a file with a name that is invalid in the current locale (say a zip disc from a computer with a different locale setting). A new API is needed for this.

[Haskell-cafe] Parsec question: how to access parser state

2005-03-20 Thread Dimitry Golubovsky
Hi, I am trying to develop a parser with the Parsec library. At some point I need to do something with parser state, say, convert it to a string. I declared the type for the parser: type TParser a = GenParser Token (FiniteMap String Declaration) a The FiniteMap (which is the user state) is

Re: [Haskell-cafe] tuple and HList

2005-03-20 Thread Frederik Eaton
This was brought up in passing in a recent conversation on haskell-cafe Sorry, mairix was malfunctioning... It certainly seems like an interesting idea, Would type inference still work okay? I don't understand all of the issues. One is that in the HList paper, rather than constructing

Re: [Haskell-cafe] tuple and HList

2005-03-20 Thread Keean Schupke
Frederik Eaton wrote: Another thing which I don't think is mentioned in the paper, which is convenient, is that you can define HLists all of whose elements are members of a given class: class HListShow l instance HListShow HNil instance (Show a, HListShow l) = HListShow (a :* l) You can avoid

Re: [Haskell-cafe] tuple and HList

2005-03-20 Thread Frederik Eaton
That's a neat technique. Since it's so general it would be nice if there were a way to make it more automatic, could one use template haskell? It seems one should be able to write HListConstraint $(mkConstraint Show) l to generate the declarations automatically. Frederik On Sun, Mar 20, 2005

Re: [Haskell-cafe] tuple and HList

2005-03-20 Thread Keean Schupke
Frederik Eaton wrote: That's a neat technique. Since it's so general it would be nice if there were a way to make it more automatic, could one use template haskell? It seems one should be able to write HListConstraint $(mkConstraint Show) l to generate the declarations automatically. Frederik

[Haskell-cafe] Linux device drivers

2005-03-20 Thread Mark Carroll
I was wondering about the possibility of using Haskell for developing device drivers that would be kernel modules for Linux. If nothing else, it would be quite an educational experience for me, as I've not yet experimented with either the Linux kernel or Haskell FFI, nor have I had to learn how to

Re: [Haskell-cafe] Linux device drivers

2005-03-20 Thread Greg Buchholz
Mark Carroll wrote: I was wondering about the possibility of using Haskell for developing device drivers that would be kernel modules for Linux. If nothing else, it would be quite an educational experience for me, as I've not yet experimented with either the Linux kernel or Haskell FFI, nor

Re: [Haskell-cafe] Linux device drivers

2005-03-20 Thread Donald Bruce Stewart
mark: I was wondering about the possibility of using Haskell for developing device drivers that would be kernel modules for Linux. If nothing else, it would be quite an educational experience for me, as I've not yet experimented with either the Linux kernel or Haskell FFI, nor have I had to

Re: [Haskell-cafe] Parsec question: how to access parser state

2005-03-20 Thread Andrew Pimlott
On Sun, Mar 20, 2005 at 03:32:38PM -0500, Dimitry Golubovsky wrote: type TParser a = GenParser Token (FiniteMap String Declaration) a The FiniteMap (which is the user state) is expected to be updated during parsing whus building some internal lookup table. and in one of the parsing

Re: [Haskell-cafe] tuple and HList

2005-03-20 Thread David Menendez
Frederik Eaton writes: One way t make tuples into sugar for HLists would be to effectively have a series of declarations like these: type (a,b) = TCons a (TCons b HNil) type (a,b,c) = TCons a (TCons b (TCons c HNil)) But then we can't use tuples in instance declarations.

Re: [Haskell-cafe] Linux device drivers

2005-03-20 Thread S. Alexander Jacobson
Wow! Did you also implement tcp in Haskell? Does hOp or House also have the ability to write to disk? (With HAppS, I've gotten rid of the AMP part of LAMP, it would be really cool to get rid of the L as well!) -Alex- __ S. Alexander

Re: [Haskell-cafe] Linux device drivers

2005-03-20 Thread Donald Bruce Stewart
alex: Wow! Did you also implement tcp in Haskell? Does hOp or House also have the ability to write to disk? (With HAppS, I've gotten rid of the AMP part of LAMP, it would be really cool to get rid of the L as well!) Sorry! By We've got a few drivers written in Haskell, I meant the Haskell

Re: [Haskell-cafe] Linux device drivers

2005-03-20 Thread Donald Bruce Stewart
dons: alex: Wow! Did you also implement tcp in Haskell? On this topic, the following House code looks relevant: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/programatica/hOp/kernel/Net/ There's something satsifying about seeing 'instance Functor Packet' in IPv4.hs ;) Does hOp or House

Re: [Haskell-cafe] Linux device drivers

2005-03-20 Thread S. Alexander Jacobson
Very very cool. Has anyone written any storage drivers? If there is already TCP, has someone written an iscsi (RFC3720) driver? -Alex- On Mon, 21 Mar 2005, Donald Bruce Stewart wrote: dons: alex: Wow! Did you also implement tcp in Haskell? On this topic, the following House code looks