--* From postmaster%watson.vnet.ibm.com@yktvmv.watson.ibm.com  Mon Aug  1 17:28:21 1994
--* Received: from yktvmv-ob.watson.ibm.com by asharp.watson.ibm.com (AIX 3.2/UCB 5.64/930311)
--*           id AA20515; Mon, 1 Aug 1994 17:28:21 -0400
--* Received: from watson.vnet.ibm.com by yktvmv.watson.ibm.com (IBM VM SMTP V2R3)
--*    with BSMTP id 4819; Mon, 01 Aug 94 17:28:24 EDT
--* Received: from YKTVMV by watson.vnet.ibm.com with "VAGENT.V1.0"
--*           id <A.LAL.NOTE.YKTVMV.4309.Aug.01.17:28:22.-0400>
--*           for asbugs@watson; Mon, 01 Aug 94 17:28:24 -0400
--* Received: from nag.com by watson.ibm.com (IBM VM SMTP V2R3) with TCP;
--*    Mon, 01 Aug 94 17:28:21 EDT
--* Received: by nag.com (/\==/\ Smail3.1.28.1 #28.1)
--* 	id <m0qV4v9-0001XtC@nag.com>; Mon, 1 Aug 94 16:29 CDT
--* Message-Id: <m0qV4v9-0001XtC@nag.com>
--* Date: Mon, 1 Aug 94 16:29 CDT
--* From: lal@nag.com (Larry A. Lambe)
--* To: asbugs@watson.ibm.com, lal@nag.com
--* Subject: [5] composition of functors [funbug1.as][36.1 (suncc)]

--@ Fixed  by:  SSD   Thu Aug 4 15:42:58 EDT 1994 
--@ Tested by:  none 
--@ Summary:    Not a bug. G(Int) is a BasicType, nothing more, so it doesn't export 'list'. 

--+ asharp -Fx -lasdem funbug1.as
--+ "funbug1.as", line 40:
--+ lll:HH := list(list(1,2,3,4)$List(Int),list(8,9)$List(Int))$HH;
--+ ...........................................................^
--+ [L40 C60] #1 (Error) There are no suitable meanings for the operator `list$HH'.
--+
#include "aslib.as";

macro Int == SingleInteger;
import from Int;
import from List(Int);

ll := list(1,2,3);
print << ll << newline;

AA ==> BasicType -> BasicType;

foo() : with {
  comp : (AA,AA) -> AA;
} == add {
    comp(r:AA,s:AA):AA ==
      {
         loco(bt:BasicType):BasicType == r s bt;
         loco;
      }
}

myList(B:BasicType):BasicType == List(B);
goo ==> (S:BasicType) -> ListCategory S;

myList2(S:BasicType):ListCategory S == List(S);

--G == comp(List pretend AA,List pretend AA)$foo();
G == comp(List,List)$foo();


HH == G(Int);
import from HH;

tst := List(Int) has with {list: Tuple Int -> List(Int)};
print<<tst<<newline;

tst := HH has with {list: Tuple List Int -> HH};
print<<tst<<newline;

lll:HH := list(list(1,2,3,4)$List(Int),list(8,9)$List(Int))$HH;
 
