Skip to content

Commit 2654bc1

Browse files
committed
Fixed tutor links
1 parent bf8a7ab commit 2654bc1

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

doc/TypePal/Collector/Collector.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Scope management amounts to entering a new scope, leave the current scope and re
112112
```
113113
In order to check consistency, `leaveScope` has the inner scope that it is supposed to be leaving as argument.
114114

115-
Here is a simple example how the `let` expression in [the Fun language]((examples::fun)) handles subscopes:
115+
Here is a simple example how the `let` expression in [the Fun language]((Examples)) handles subscopes:
116116

117117
```rascal
118118
void collect(current: (Expression) `let <Id name> : <Type tp> = <Expression exp1> in <Expression exp2> end`, Collector c) {
@@ -248,7 +248,7 @@ TypePal is based on nested scopes and path between scopes. The former represent
248248

249249
`addPathToDef` is typically used to create an _import_ or _extend_ path between program parts. `occ` is an occurence of a name that should be defined elsewhere in one of the given roles. The effect is to add a `pathRole` path between the current scope and the definition.
250250

251-
Here is an example taken from [the language ModFun]((examples::modfun)):
251+
Here is an example taken from [the language ModFun]((Examples)):
252252
```rascal
253253
void collect(current: (ImportDecl) `import <ModId mid> ;`, Collector c){
254254
c.addPathToDef(mid, {moduleId()}, importPath());
@@ -266,7 +266,7 @@ Similar to `addPathToDef` for the occurrence of a qualified names rather than a
266266
```
267267
`occ` is a parse tree with has a certain type. The effect is to add a `pathRole` path between the current scope and the definition of that type.
268268

269-
A prime example is type checking of [Pascal]((examples::pascal))'s `with` statement which _opens_ the definition of a record type and makes all defined fields available in the body of the `with` statement. Here we create a `withPath` between the scope of the with statement and all definitions of the record types of the given record variables:
269+
A prime example is type checking of [Pascal]((Examples))'s `with` statement which _opens_ the definition of a record type and makes all defined fields available in the body of the `with` statement. Here we create a `withPath` between the scope of the with statement and all definitions of the record types of the given record variables:
270270

271271
```rascal
272272
void collect(current: (WithStatement) `with <{RecordVariable ","}+ recordVars> do <Statement withStat>`, Collector c){
@@ -323,7 +323,7 @@ There are three functions to describe the occurrence of a name in a parse tree a
323323
```
324324
The parse tree `occ` is a use to be resolved in the current scope in one of the given roles `idRoles`. The use of a variable in an expression is typically modelled with this use function.
325325

326-
Here is an example from [the Calc language]((examples::calc)):
326+
Here is an example from [the Calc language]((Examples)):
327327
```rascal
328328
void collect(current: (Exp) `<Id name>`, Collector c){
329329
c.use(name, {variableId()});
@@ -352,7 +352,7 @@ where
352352
* `selector`: is the name to be selected from that named type.
353353
* `idRolesSel`: are the IdRoles allowed for the selector.
354354

355-
Here is an example of field selection from a record in [the Struct language]((examples::struct)):
355+
Here is an example of field selection from a record in [the Struct language]((Examples)):
356356

357357
```rascal
358358
void collect(current:(Expression)`<Expression lhs> . <Id fieldName>`, Collector c) {
@@ -383,7 +383,7 @@ ATypes may contain type variables and new type variables can be created using `n
383383

384384
Type variables can be bound via unification.
385385

386-
Here is an example of a call expression taken from [the UntypedFun language]((examples::untypedFun)):
386+
Here is an example of a call expression taken from [the UntypedFun language]((Examples)):
387387

388388
```rascal
389389
void collect(current: (Expression) `<Expression exp1>(<Expression exp2>)`, Collector c) {
@@ -415,7 +415,7 @@ The function `fact` registers known type information for a program fragment `src
415415
```
416416
where `atype` can be either an `AType` or a `Tree`. In the latter case the type of that Tree is used when available.
417417

418-
Here are two examples from [the Calc language]((examples::calc)):
418+
Here are two examples from [the Calc language]((Examples)):
419419
```rascal
420420
void collect(current: (Exp) `<Integer integer>`, Collector c){
421421
c.fact(current, intType()); //<1>

doc/TypePal/Configuration/Configuration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Accept myIsAcceptablePath(TModel tm, loc def, Use use, PathRole pathRole) {
104104
`mayOverload` determines whether a set of definitions (`defs`) are allowed to be overloaded,
105105
given their definitions (`defines`).
106106

107-
For example, [Featherweight Java]((examples::fwjava::Checker)) the only allowed overloading is between class names and constructor names.
107+
For example, [Featherweight Java]((Examples)) the only allowed overloading is between class names and constructor names.
108108
```rascal
109109
bool fwjMayOverload (set[loc] defs, map[loc, Define] defines) {
110110
roles = {defines[def].idRole | def <- defs}; //<1>
@@ -158,7 +158,7 @@ The function `instantiateTypeParameters` defines instantiation of *language-spec
158158
`instantiateTypeParameters` will match `def` with `ins` and the resulting bindings will be used to instantiate `act`.
159159
The instantiated version of `act` is returned.
160160

161-
In the [StructParameters demo]((examples::structParameters::Checker)) parameterized structs (records) are defined.
161+
In the [StructParameters demo]((Examples)) parameterized structs (records) are defined.
162162
The formal type of such a struct is ``structDef(str name, list[str] formals)``,
163163
i.e., a struct has a name and a list of named formal type parameters.
164164
The actual type of a struct is ``structType(str name, list[AType] actuals)``,
@@ -191,7 +191,7 @@ of indirect type computations such as `useViaType` and `getTypeInType`. When `at
191191
In more sophisticated cases the list may contain a list of named types to be considered.
192192
* A list of roles in which the type name can be bound.
193193

194-
Here are the definitions for the [Struct demo]((examples::struct::Checker)):
194+
Here are the definitions for the [Struct demo]((Examples)):
195195
```rascal
196196
tuple[list[str] typeNames, set[IdRole] idRoles] structGetTypeNamesAndRole(structType(str name)){
197197
return <[name], {structId()}>; //<1>
@@ -226,7 +226,7 @@ In the Rascal type checker common keyword parameters of data declarations are ha
226226
`getTypeInNamelessType` describes field selection on built-types that have not been explicitly declared with a name.
227227
A case in point is a `length` field on a built-in string type.
228228

229-
In [the StaticFields demo]((examples::staticFields::Checker)))) this is done as follows:
229+
In [the StaticFields demo]((Examples)))) this is done as follows:
230230
```rascal
231231
AType staticFieldsGetTypeInNamelessType(AType containerType, Tree selector, loc scope, Solver s){
232232
if(containerType ### strType() && "<selector>" ### "length") return intType();

doc/TypePal/Examples/Examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ To get you started more quickly, we give below a list of complete TypePal-based
5555
##### ModFun
5656

5757

58-
| *What* | Extension of [Fun]((examples::fun)) with modules |
58+
| *What* | Extension of [Fun](#fun) with modules |
5959
| --- | --- |
6060
| *Illustrates* | PathRole, addPathToDef |
6161
| *Source* | https://github.com/cwi-swat/typepal/tree/master/src/examples/modfun |

doc/TypePal/Solver/Solver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ The workhorse of TypePal is the function `getType` that determines the type of
155155
```
156156
`src` may either be a `Tree` (i.e., a parse tree fragment) or a `loc` (the source location of a parse tree fragment).
157157

158-
Here is how `getType` is used in [the Pico example]((examples::pico)) to check the addition operator:
158+
Here is how `getType` is used in [the Pico example]((Examples)) to check the addition operator:
159159

160160
* two integer arguments give an integer result;
161161
* two string arguments give a string result;

0 commit comments

Comments
 (0)