Re: [Haskell] Unnamed fields

2004-11-16 Thread Martin Sjögren
On Tue, 16 Nov 2004 15:04:02 +, Ian Lynagh [EMAIL PROTECTED] wrote: Hi all, Is there a good reason why I can't say data Bar = Bar { _ :: Int, _ :: Char, x :: Bool } ? (Or data Bar = Bar { Int, Char, x :: Bool } if you prefer, but that's susceptible to typos of the x, y, z ::

Re: deriving...

2004-10-20 Thread Martin Sjögren
On Tue, 19 Oct 2004 15:56:01 +0100 (BST), MR K P SCHUPKE [EMAIL PROTECTED] wrote: * I'm not at all keen on making '..deriving( Foo )' mean $(derive 'Foo) or something like that. Just make the TH call yourself! The current situation is that the code that generates the derived

Re: Mutually recursive modules and derived instances of Data

2004-10-13 Thread Martin Sjögren
On Wed, 13 Oct 2004 13:21:26 +0100, Simon Peyton-Jones [EMAIL PROTECTED] wrote: 1. Separate 'deriving' from the data type decl, so you can say derive( Data TA, Typeable TA ) anywhere. People sometimes ask for this for other reasons. 2. Allow instances in hi-boot files You might

Re: [Haskell-cafe] QuickCheck - Extracting data values from tests

2004-09-03 Thread Martin Sjögren
On Fri, 3 Sep 2004 01:35:45 +0100, Jorge Adriano Aires [EMAIL PROTECTED] wrote: Not sure which part is not clear... I'll just try to explain each of them. Lets say I'm implementing a generators for Graphs. Also, even when I'm implementing a generator, I want to see how it is working. I

Re: [Haskell-cafe] Haskell extension/improvement

2004-08-16 Thread Martin Sjögren
On Mon, 16 Aug 2004 09:01:45 -0700 (PDT), Ron de Bruijn [EMAIL PROTECTED] wrote: I was playing with QuickCheck and I just wanted to put all of my tests in a list, but that's not possible, because of the fact that a list can only contain values of the same type. So concrete I would like to

Re: [Haskell-cafe] Hiding functions

2004-08-14 Thread Martin Sjögren
On Fri, 13 Aug 2004 15:32:51 -0700, Lyle Kopnicky [EMAIL PROTECTED] wrote: Simon, That makes good sense, as it's hard to read code that contains standard terms used in a nonstandard way. I was just concerned that the function name I wanted to use was already in the Prelude! Perhaps the

Re: Socket Options

2004-06-28 Thread Martin Sjögren
, and it would be more intuitive to use. Wouldn't that make getSocketOption :: Socket - SocketOption - IO Int a bit strange? How would you propose to change it? /Martin -- Martin Sjögren [EMAIL PROTECTED] signature.asc Description: Detta =?ISO-8859-1?Q?=E4r?= en digitalt signerad meddelandedel

Re: [Haskell] insufficiently [EMAIL PROTECTED] -- more counterintuitive stuff

2004-03-30 Thread Martin Sjögren
tis 2004-03-30 klockan 17.30 skrev S. Alexander Jacobson: I would assume that this function: foo list@(h:t) = list is equivalent to foo list = list where (h:t)=list But passing [] to the first generates an error even though h and t are never used! Passing [] to the second

RE: import Prelude ([](..))

2003-11-07 Thread Martin Sjögren
. So, the bottom line here is that with ghc6 I *cannot* have the import, but in ghc5 I *must* have it? Gah. Thanks for your help. /Martin -- Martin Sjögren [EMAIL PROTECTED] -- [EMAIL PROTECTED] GPG key: http://www.mdstud.chalmers.se/~md9ms/gpg.html let hello = hello : hello in putStr

Re: Reading/Writing Binary Data in Haskell

2003-07-12 Thread Martin Sjögren
'unicode' are Really Nice strings... Having something like this in Haskell would be wonderful, unfortunately I don't know much about Unicode beyond happily using it, so I don't have any suggestions or anything. :) /Martin -- Martin Sjögren [EMAIL PROTECTED] Phone: +46 (0)31 7490880 Cell

Re: How overload operator in Haskell?

2003-07-11 Thread Martin Sjögren
in instance head You get around it with hugs -98 or ghc -fglasgow-exts. Dunno about nhc98. /Martin NB: I just used class Foo ; instance Foo String to produce these error messages... -- Martin Sjögren [EMAIL PROTECTED] Phone: +46 (0)31 7490880 Cell: +46 (0)739 169191 GPG key: http

The semantics of Core?

2003-02-18 Thread Martin Sjögren
Hello I'm looking for a paper or some other documentation on the exact semantics of Core. I've read the paper about the concrete syntax, and it briefly mentions the abstract syntax and something about the case expression, but not a lot. Unless I missed something? I'm also looking for actual code

RE: The semantics of Core?

2003-02-18 Thread Martin Sjögren
tis 2003-02-18 klockan 09.49 skrev Simon Peyton-Jones: I don't know of any separate description of the semantics of Core, but it's just the lambda calculus with let, letrec and case. There's plenty of code that works over Core in GHC itself, but no separate libraries. There is a library to

Problem with Data.Dynamic

2002-10-24 Thread Martin Sjögren
failed for pattern (Data.Maybe.Just obj) Which indicates that fromDynamic returned Nothing. What is the problem here? Do I have to employ special trickery to use Dynamic with records? I'm using ghc 5.04, as packaged by Debian. Regards, Martin Sjögren signature.asc Description: Detta =?ISO-8859-1