Skip to content

Commit cc34064

Browse files
author
Shon Feder
authored
Merge pull request #1382 from informalsystems/1298/fixes-and-utils
Add fixes towards polymorphic type declarations
2 parents 3c55068 + 699219d commit cc34064

31 files changed

+1048
-1037
lines changed

examples/cosmos/lightclient/typedefs.qnt

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ module typedefs {
1313
Commits: Set[str]
1414
}
1515

16-
type Blockchain = int -> blockHeader
17-
type LightBlockMap = int -> lightBlock
16+
type Blockchain = int -> BlockHeader
17+
type LightBlockMap = int -> LightBlock
1818
type LightBlockStatus = int -> str
1919

20-
}
20+
}

quint/src/generated/Quint.g4

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ typeDef
6868
| 'type' typeDefHead '=' sumTypeDefinition # typeSumDef
6969
;
7070

71-
typeDefHead : typeName=qualId ('[' typeVars+=typeVar(',' typeVars+=typeVar)* ']')?;
71+
typeDefHead : typeName=qualId ('[' typeVars+=LOW_ID(',' typeVars+=LOW_ID)* ']')?;
7272

7373
sumTypeDefinition : '|'? typeSumVariant ('|' typeSumVariant)* ;
7474

@@ -127,7 +127,7 @@ type
127127
| typeVar # typeVarCase
128128
| qualId # typeConst
129129
| '(' type ')' # typeParen
130-
| typeCtor=type ('[' typeArg+=type (',' typeArg+=type)* ']') # typeApp
130+
| typeCtor=qualId ('[' typeArg+=type (',' typeArg+=type)* ']') # typeApp
131131
;
132132

133133
typeVar: LOW_ID;

quint/src/generated/Quint.interp

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)