Skip to content

Commit

Permalink
BR
Browse files Browse the repository at this point in the history
  • Loading branch information
rumpe committed Oct 3, 2024
1 parent 362ac93 commit 3fec24f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
15 changes: 6 additions & 9 deletions monticore-grammar/src/main/grammars/de/monticore/Grammars.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,12 @@ the chosen typecheck wants to enforce explicit coercion.

### [TypeParameters.mc4](types/TypeParameters.mc4) (alpha)

This grammar offers ways to define type parameters for,
e.g., classes or functions.
Modeling elements with type parameters represent
type-level functions that take type arguments;
For Example, the generic type `List<T>` has one type parameter `T`
and therefore takes one type argument.
`List<T>` or `List` cannot be used directly in a model,
instead, providing a type argument (e.g., `int`)
yields a type `List<int>` that can be used.
This grammar defines type parameters for,
e.g., classes or functions, such as `<T>`, `<U,V>`,
`T extends Person`, `U extends T & Comparable<U>`.
Modeling elements with type parameters therefore take type arguments.
For example, the generic type `List<T>` has the type parameter `T`
allowing to use the type `List<int>`.

## Symbols: List of Grammars in package `de.monticore.symbols`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.types;

/* Beta-version: This is intended to become a MontiCore stable grammar. */
/* This is a MontiCore stable grammar.
* Adaptations -- if any -- are conservative. */

import de.monticore.symbols.BasicSymbols;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The resulting Symbols can than be used with, e.g.,
[`MCSimpleGenericTypes`](MCSimpleGenericTypes.mc4), or
[`MCFullGenericTypes`](MCFullGenericTypes.mc4)
to define types by providing the corresponding type arguments.
Additionally, type parameters may optionally have upper bounds,
Type parameters may optionally have upper bounds,
e.g., `T extends Person`, `U extends T & Comparable<U>`.

## [`MCArrayTypes`](MCArrayTypes.mc4)
Expand Down

0 comments on commit 3fec24f

Please sign in to comment.