On 13/02/2011, at 12:10 AM, john skaller wrote: > > Well, that's expected because I disabled the code: > /* > instance[t,u with Tord[t],Tord[u]] Tord[t*u] { > fun lt: (t * u) * (t * u) -> bool = > | (?x1,?y1),(?x2,?y2) => x1 <= x2 and y1 < y2 > ; > } > instance[t with Tord[t]] Tord[t*t] { > fun eq: (t * t) * (t * t) -> bool = > | (?x1,?y1),(?x2,?y2) => x1 <= x2 and y1 < y2 > ; > } > open[t,u with Tord[t], Tord[u]] Tord[t*u]; > */ > > Enabled .. it fails (which completely wipes the whole build out). > I have no idea why. The pattern here is the same as for Eq.
Arggg .. I should LISTEN to my own compiler.Here's the message: CLIENT ERROR Cannot find typeclass Tord virtual lt in instance [<T8213>^2] In build/release/lib/std/order.flx: line 14, cols 18 to 32 13: inherit Eq[t]; 14: virtual fun lt: t * t -> bool; *************** 15: virtual fun gt(x:t,y:t):bool =>lt(y,x); See also ./tt.flx: line 17, cols 1 to 1 16: ; 17: } * 18: open[t,u with Tord[t], Tord[u]] Tord[t*u]; DUH! It's right. Look at the instance for t*t, it implements "eq" not "lt" !! Minus one to Skaller, Plus on to Felix :) -- john skaller skal...@users.sourceforge.net ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language