1 Delta define: #DeltaBlockApplication as: (
\r
2 (Class subclassOf: 'DeltaGenericApplicationExpression' instanceVariables: '')) !
\r
4 (Delta mirrorFor: #DeltaBlockApplication) revision: '$Revision: 1.1 $'!
\r
6 (Delta mirrorFor: #DeltaBlockApplication) group: 'ast'!
\r
8 (Delta mirrorFor: #DeltaBlockApplication)
\r
10 '(c) 1995-1997 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
\r
11 Use and distribution of this software is subject to the terms of the attached source license.'!
\r
13 ! (Delta mirrorFor: #DeltaBlockApplication) classSide methodsFor: 'Unclassified' !
\r
16 blokName: n <Int > ^ <Symbol>
\r
17 ^(n printString, '_argFun') asSymbol.!
\r
19 blokType: n <Int > ^ <DeltaGeneric>
\r
20 ^Delta at: (self blokName: n)
\r
21 ifAbsent:[self createBlokType: n].!
\r
23 createBlokType: n <Int > ^ <DeltaGeneric[Protocol]>
\r
26 formals <VarOrdCltn[TypeFormal]>
\r
30 newGen <Generic[Protocol]>
\r
33 formals := OrderedCollection[TypeFormal] new.
\r
34 1 to: n do:[:i <Int> |
\r
35 bound := DeltaTypeId new setId: #Object; scope: DeltaGlobals.
\r
36 tv := DeltaTypeVar new name: ('A', n printString) asSymbol bound: bound.
\r
37 f := DeltaTypeFormal new variance: #contravariant typeVar: tv.
\r
40 bound := DeltaTypeId new setId: #Object; scope: DeltaGlobals.
\r
41 tv := DeltaTypeVar new name: #R bound: bound.
\r
42 f := DeltaTypeFormal new variance: #covariant typeVar: tv.
\r
45 body := DeltaProtocolUpdate new.
\r
46 newGen := DeltaGeneric[Protocol] new body: body formals: formals.
\r
48 Type addMagicType: newGen.
\r
49 ^Delta at: (self blokName: n) put: newGen
\r
52 ! (Delta mirrorFor: #DeltaBlockApplication) methodsFor: 'Unclassified' !
\r
56 ^self class blokType: self actuals size.! !
\r