Can someone help me debug this simple typing problem?

Nick Kallen phantom@earthlink.net
Thu, 15 May 1997 22:24:24 -0700


I get the following error, which I could not figure out how to fix; I'm not
too familiar with uniqueness typing. I'm sorry to ask such an inane
question on the mailing list !!

Type error [DynaDraw.icl,77,InitMouseFunction]: conflicting uniqueness
information due to argument 1 of ChangeActiveMouseFunction

InitMouseFunction :: MouseState State (IOState State) -> (State, IOState
State)
InitMouseFunction (pos, _, _) _ io
= (brush, ChangeActiveMouseFunction MouseFunction io) // error here!
where
	brush = {current = pos`, velocity = Zero, angle = Zero, mass = 5.0, drag =
3.0, prev = pos`}
	pos` = toRealv pos // converts (Int, Int) -> (Real, Real)

MouseFunction :: MouseState State (IOState State) -> (State, (IOState
State))
MouseFunction (pos, _, _) brush io
= DrawStroke brush` io
where
	brush` = MoveBrush brush pos

DrawStroke :: State (IOState State) -> (State, (IOState State))
DrawStroke brush=:{current, angle, velocity} io  = (brush, DrawInActiveWindo
w [DrawLine line] io)
where
	line = (toPoint (current + angle + (5.0,5.0)), toPoint (current - angle -
(5.0,5.0)))

-Nick Kallen