On Tue, Jul 08, 2003 at 10:19:49PM -0400, Derek Elkins wrote:
> On Tue, 8 Jul 2003 23:16:33 -0300
> "Andre W B Furtado" <[EMAIL PROTECTED]> wrote:
>
> > Is it possible replace the question mark in the following code in
> > order to make defaultMyType return a "don't care" value for b?
> >
> > data MyType t = MyType { a :: Int, b :: t}
> >
> > defaultMyType :: MyType
> > defaultMyType = MyType {a = 0, b = ?}
> >
>
> First you do need the type parameter (:: MyType t).
Maybe what's wanted is this?
defaultMyType :: MyType a
defaultMyTpe = MyType {a = 0, b = undefined}
Peace,
Dylan
pgp00000.pgp
Description: PGP signature
