--* From bronstei@inf.ethz.ch  Thu Oct  9 11:24:05 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 AA22457; Thu, 9 Oct 97 11:24:05 +0100
--* Received: from inf.ethz.ch (root@neptune.ethz.ch [129.132.10.10])
--*           by nagmx1.nag.co.uk (8.8.4/8.8.4) with SMTP
--* 	  id LAA20572 for <ax-bugs@nag.co.uk>; Thu, 9 Oct 1997 11:26:56 +0100 (BST)
--* Received: from ru8.inf.ethz.ch (bronstei@ru8.inf.ethz.ch [129.132.12.17]) by inf.ethz.ch (8.6.10/8.6.10) with ESMTP id MAA07044 for <ax-bugs@nag.co.uk>; Thu, 9 Oct 1997 12:25:07 +0200
--* From: Manuel Bronstein <bronstei@inf.ethz.ch>
--* Received: (from bronstei@localhost) by ru8.inf.ethz.ch (8.8.4/8.7.1) id MAA06633 for ax-bugs@nag.co.uk; Thu, 9 Oct 1997 12:25:06 +0200 (MET DST)
--* Date: Thu, 9 Oct 1997 12:25:06 +0200 (MET DST)
--* Message-Id: <199710091025.MAA06633@ru8.inf.ethz.ch>
--* To: ax-bugs@nag.co.uk
--* Subject: [3] bad inline at -q3

--@ Fixed  by: <Who> <Date>
--@ Tested by: <Name of new or existing file in test directory>
--@ Summary:   <Description of real problem and the fix>

-- Command line: axiomxl -q3 inline.as
-- Version: 1.1.10b
-- Original bug file name: badq3.as

------------------------- badq3.as --------------------------
--
-- To reproduce this bug, you need:
-- sumit, which I'm sending you as a tar file
-- to separate this file into lodfo.as and inline.as
--
-- darwin3{bronstei} 176: axiomxl -q2 lodfo.as
-- darwin3{bronstei} 177: axiomxl -q2 inline.as 
-- darwin3{bronstei} 178: axiomxl -q3 inline.as
-- #1 (Fatal Error) Looking for `function' with code `1048257851'.  Export not found.
-- #1 (Warning) Removing file `inline.ao'.
-- 
------------------------- lodfo.as --------------------------
#include "sumit"

OrdinaryDifferenceOperatorCategory(R:CommutativeRing): Category ==
	UnivariateSkewPolynomialCategory R with { apply: (%, R) -> R }

macro DUSP == DenseUnivariateSkewPolynomial(R, sigma, function 0, avar);

OrdinaryDifferenceOperator(R:CommutativeRing, sigma: Automorphism R,
	avar:String): OrdinaryDifferenceOperatorCategory R == {
		import from Derivation R;

		DUSP add {
			macro Rep == DUSP;
			import from Rep;

			apply(p:%, r:R):R == apply(rep p, 1, r);
		}
}

OrdinaryDifferenceOperator(R:CommutativeRing, P:UnivariatePolynomialCategory R,
	avar:String): OrdinaryDifferenceOperatorCategory P == {
		import from R, Automorphism P;

		local shift(p:P, n:Integer):P == p(monom + n::P);

		OrdinaryDifferenceOperator(P, morphism shift, avar);
}

------------------------- inline.as --------------------------
#include "sumit"

#library bar "lodfo.ao"
import from bar;
inline from bar;

macro {
	Z	== Integer;
	Zx	== DenseUnivariatePolynomial Z;
	Zxe	== OrdinaryDifferenceOperator(Z, Zx, "E");
}

BadInlining: with { foo: Zxe -> Z } == add { foo(R:Zxe):Z == 1; }
