Re: [Haskell-cafe] do we have something like isDefined or isNull in Haskell?

2006-06-15 Thread Bryan Burgers
Vladimir, I think you forgot to put Haskell-cafe as a recipient of this email, so first I'll repost what you wrote. On 6/15/06, Vladimir Portnykh <[EMAIL PROTECTED]> wrote: many thanks. i have the follwoing code: module MyType (DataContainer(..)) where import Maybe data DataContainer = MyT

Re: [Haskell-cafe] do we have something like isDefined or isNull in Haskell?

2006-06-15 Thread Clifford Beshers
Duncan Coutts wrote: On Thu, 2006-06-15 at 13:11 +0100, Duncan Coutts wrote: then you can construct your records using: foo = default { weight = 3.2 } Oops, as David House pointed out to me that should of course be foo = default { weight = Just 3.2 } I think the c

Re: [Haskell-cafe] do we have something like isDefined or isNull in Haskell?

2006-06-15 Thread Duncan Coutts
On Thu, 2006-06-15 at 13:11 +0100, Duncan Coutts wrote: > then you can construct your records using: > > foo = default { weight = 3.2 } Oops, as David House pointed out to me that should of course be foo = default { weight = Just 3.2 } Duncan ___ H

Re: [Haskell-cafe] do we have something like isDefined or isNull in Haskell?

2006-06-15 Thread Duncan Coutts
On Thu, 2006-06-15 at 12:43 +0100, Vladimir Portnykh wrote: > Suppose there is a data definition in Haskell: > data MyType = MyType { date :: Double, > weight :: Double, > height:: Double > } deriving (Eq, Ord, Show) > > Is it possible

Re: [Haskell-cafe] do we have something like isDefined or isNull in Haskell?

2006-06-15 Thread Bryan Burgers
On 6/15/06, Vladimir Portnykh <[EMAIL PROTECTED]> wrote: Suppose there is a data definition in Haskell: data MyType = MyType { date :: Double, weight :: Double, height:: Double } deriving (Eq, Ord, Show) Is it possible to che

[Haskell-cafe] do we have something like isDefined or isNull in Haskell?

2006-06-15 Thread Vladimir Portnykh
Suppose there is a data definition in Haskell: data MyType = MyType { date :: Double, weight :: Double, height:: Double } deriving (Eq, Ord, Show) Is it possible to check if the field height, for example, is filled in(defined