On 12 Oct 2008, at 9:28 pm, Henning Thielemann wrote:
On Thu, 9 Oct 2008, Iain Barnett wrote:
If I were to create an object in C#, for instance, I could add
code to the constructor that might limit the type further e.g.
public class Car
{
string model;
int wheels;
On Thu, 9 Oct 2008, Iain Barnett wrote:
If I were to create an object in C#, for instance, I could add code to the
constructor that might limit the type further e.g.
public class Car
{
string model;
int wheels;
public Car ( string model, int no_of_wheels )
{
On Thu, Oct 9, 2008 at 3:05 PM, Mitchell, Neil
<[EMAIL PROTECTED]> wrote:
> Hi Iain,
>
> The wiki page has quite a nice article:
> http://www.haskell.org/haskellwiki/Smart_constructors
Smart constructors are nice but if your module doesn't also export the
regular constructor then you can't pattern
On Oct 11, 2008, at 2:54 PM, Bit Connor wrote:
Smart constructors are nice but if your module doesn't also export the
regular constructor then you can't pattern match against it.
It would be cool if there was a way to export constructors from a
module, but only for use in pattern matching and
Thankyou, this is exactly what I was looking for.
Iain
On 9 Oct 2008, at 2:05 pm, Mitchell, Neil wrote:
Hi Iain,
The wiki page has quite a nice article:
http://www.haskell.org/haskellwiki/Smart_constructors
Thanks
Neil
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PRO
Hi Iain,
The wiki page has quite a nice article:
http://www.haskell.org/haskellwiki/Smart_constructors
Thanks
Neil
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Iain Barnett
> Sent: 09 October 2008 2:03 pm
> To: haskell-cafe@haskell.org
> Subje