undefined value

Pieter Koopman pieter@cs.kun.nl
Fri, 02 Jul 1999 09:50:21 +0200


At 01:24 02/07/99 -0400, Sven Eric wrote:
>
>yesterday evening I was playing for the first time with the ObjectIO
>library. It worked out fine and I had some fun.
>
>But when I tried to access the global state at some point
>I got some runtime error.
>It is something like:
>'trying to evaluate undefined value'.
>
>This sounds a bit like a NullPointerException in Java to me. What does
>it mean? I thought in functional languages we got rid of these things.

There is a function undef in the StdEnv (StdMisc). This function has any
type. It is used to initialize things. The definition is something like:

undef :: .a
undef = abort "trying to evaluate undefined value"

So, it is not a pointer problem. Somewhere in you program (or the libs you
use) there is an undef to give some object an initial value. Your program
uses this value before it is assigned a proper value. Look for the
identifier undef starting in your main module.

Pieter Koopman