id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	planetversion	pltversion
183	dracula rename export example from reference docs does not work	pnkfelix	cce	"Here is (slightly modified) code from the 8.2 reference manual:

{{{
(interface IAssociative
  (sig mulop (x y))
  (con mulop-associative
       (equal (mulop a (mulop b c))
              (mulop (mulop a b) c))))

(interface ICommutative
  (include IAssociative)
  (con mulop-commutative
       (equal (mulop a b) (mulop b a))))

(interface IDistributive
  (include IAssociative)
  (include ICommutative)
  (sig addop (x y))
  (con addop/mulop-distributive
       (equal (mulop a (addop b c))
              (addop (mulop a b) (mulop a c)))))

(module MDistributiveA
  (defun add (a b) (+ a b))
  (defun mulop (a b) (* a b))
  (export IAssociative (addop add))
  (export ICommutative (addop add))
  (export IDistributive (addop add)))

(module MDistributiveB
  (defun add (a b) (+ a b))
  (defun mul (a b) (* a b))
  (export IAssociative (addop add))
  (export ICommutative (addop add))
  (export IDistributive (addop add) (mulop mul)))
}}}

Hitting RUN for this example raises the following error:
{{{
. mulop: undefined in: mulop
}}}
(it also highlights the {{{mulop}}} in the IAssociative interface, which is not terribly useful and may be a usability bug; read on for why I think this.)

If I comment out the definition of MDistributiveB, so that MDistributiveA is the only module providing relevant exports, then the code runs fine.

I assume the problem here is something along the lines of ""the docs should be changed so that the MDistributive module exports mul/mulop instead of add/addop into the IAssociative interface.

----

More generally, all of the examples in the dracula docs need to be tested directly.

"	defect	new	major		cce/dracula.plt					4.1.5
