Uniqueness annotations
Rolf-Thomas Happe
rthappe@mathematik.uni-freiburg.de
Mon, 1 Mar 1999 12:49:16 +0100 (MET)
[...]
> From
> next_random_list :: !(!(RNG_State -> *(b,RNG_State))
> !Int !RNG_State -> *(*[b], RNG_State)
> (next_random_list f n) :: !RNG_State -> *(*[Real], RNG_State)
> m :: !Int
> s :: !RNG_State
> I expect
> next_random_list (next_random_list f n) m s :: *(*[*[Real]], RNG_State)
>
> But that's not what I get. What I get is an error message.
>
> Type error [<file>,<line>,mrand]:
> "next_random_list" *attributed required but not offered
> at the indicated position: ([^ [Real]],RNG_State)
[...]
> So what am I doing wrong? I thought I *was* offering *[Real],
> not [Real]. What should I do instead?
Is this sort of type inference supposed to work even though you don't provide
a uniqueness variable (`.b' or `u:b' instead of just `b' in the type declaration
of next_random_list)?
rthappe