diff options
| author | Alasdair Armstrong | 2017-08-16 19:26:04 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2017-08-16 19:26:04 +0100 |
| commit | 9f013687086937df8be81dd6a0ebd86fc750abf7 (patch) | |
| tree | 91c60d0b9f363bdffe3ac1b1d440b839162dd819 /src/parser.mly | |
| parent | 3a61ca53dd501b501bcc6e076aac11243c38880a (diff) | |
Added the feature to bind type variables in patterns.
The reason you want this is to do something like (note new parser only):
*********
default Order dec
type bits 'n:Int = vector('n - 1, 'n, dec, bit)
val zeros : forall 'n. atom('n) -> bits('n)
val decode : bool -> unit
function decode b = {
let 'datasize: {|32, 64|} = if b then 32 else 64;
let imm: bits('datasize) = zeros(datasize);
()
}
*********
for the ASL decode functions, where the typechecker now knows that the
datasize variable and the length of imm are the same.
Diffstat (limited to 'src/parser.mly')
0 files changed, 0 insertions, 0 deletions
