[Haskell-cafe] Re: data vs newtype

2007-12-18 Thread ChrisK
Jonathan Cast wrote: So there is a program (or, rather, type) you can write with newtype that can't be written with data: newtype T = T T That compiles, and anything of type T is ⊥. But it breaks my mental model of what the compiler does for newtypes. I always think of them as differently

[Haskell-cafe] RE: data vs newtype (was: OOP'er with (hopefully) trivial questions)

2007-12-17 Thread Bayley, Alistair
From: Bayley, Alistair newtype A a = A a and data A a = A a Sorry, that should read: newtype A = A a data A = A a * Confidentiality Note: The information contained in this message, and any attachments, may contain

RE: [Haskell-cafe] RE: data vs newtype (was: OOP'er with (hopefully)trivial questions)

2007-12-17 Thread Bayley, Alistair
From: Bayley, Alistair Sorry, that should read: newtype A = A a data A = A a Ignore that; I was right first time. Sorry 'bout the spam, and the lack of brain. * Confidentiality Note: The information contained in this