Subject: fixbug
By: MND
Fixed: bug1127.as
--* From hemmecke@aix550.informatik.uni-leipzig.de  Mon Jul 21 12:04:07 1997
--* Received: from nagmx1.nag.co.uk by red.nag.co.uk via SMTP (920330.SGI/920502.SGI)
--* 	for /home/red5/axiom/support/recvbug id AA14495; Mon, 21 Jul 97 12:04:07 +0100
--* Received: from server1.rz.uni-leipzig.de (root@server1.rz.uni-leipzig.de [139.18.1.1])
--*           by nagmx1.nag.co.uk (8.8.4/8.8.4) with ESMTP
--* 	  id MAA06132 for <ax-bugs@nag.co.uk>; Mon, 21 Jul 1997 12:05:35 +0100 (BST)
--* Received: from aix550.informatik.uni-leipzig.de (aix550.informatik.uni-leipzig.de [139.18.2.14])
--* 	by server1.rz.uni-leipzig.de (8.8.5/8.8.5) with SMTP id NAA15021
--* 	for <ax-bugs@nag.co.uk>; Mon, 21 Jul 1997 13:04:03 +0200 (MESZ)
--* Received: by aix550.informatik.uni-leipzig.de (AIX 3.2/UCB 5.64/BelWue-1.1AIXRS)
--*           id AA43905; Mon, 21 Jul 1997 13:04:30 +0100
--* Date: Mon, 21 Jul 1997 13:04:30 +0100
--* From: hemmecke@aix550.informatik.uni-leipzig.de (Ralf Hemmecke)
--* Message-Id: <9707211204.AA43905@aix550.informatik.uni-leipzig.de>
--* To: ax-bugs@nag.co.uk
--* Subject: [1] conditional functions in packages

--@ Bug Number:  bug1127.as 
--@ Fixed  by:  MND   
--@ Tested by:  bug1127.as 
--@ Summary:    titdnId checks conditions on local exports and lexes 

-- Command line: axiomxl xxx.as
-- Version: AXIOM-XL version 1.1.9a for AIX RS/6000
-- Original bug file name: xxx.as

-- Author: Ralf Hemmecke, University of Leipzig
-- Date: 21-JUL-97
-- AXIOM-XL version 1.1.9a for AIX RS/6000
-- Subject: conditional functions in packages

-- Compile the following code with:
--   axiomxl xxx.as
-- gives the error message
--:"xxx.as", line 14:   print << g(1) << newline;
--:                   ...........^
--:[L14 C12] #1 (Error) There are no suitable meanings for the operator `g'.


#include "axllib"

Pkg(R:BasicType): with {
  f: R -> R;
  if R has with {+:(%,%)->%} then {g:R->R}
} == add {
  f(x:R):R == x;
  if R has with {+:(%,%)->%} then {g(x:R):R == x+x}
}

MAIN():() == {
  import from Integer,Pkg(Integer);
  print << f(1) << newline;
  print << g(1) << newline;
  
}
MAIN();


