I’m wrapping a C struct that has an unsigned short member with certain
constraints on its values, and I’ve represented the member as having an
appropriately-constrained existential type over the usint function. When
initializing the value with an integral constant, I get:
The actual term is: S2Eapp(S2Ecst(g1int_int_t0ype); S2Ecst(int_kind), S2Eintinf(16))
The needed term is: S2Eapp(S2Ecst(g1uint_int_t0ype); S2Ecst(usint_kind), S2EVar(3864))
How can I use the integral constant appropriately?
Some test code that quickly reproduces the issue:
typedef foo = [i: int | i == 0] usint i
val x = 0 : foo
$UNcast{usint(16)}(16) or $extval(usint(16), “16”)On Sun, Sep 7, 2014 at 9:12 PM, Shea Levy sh...@shealevy.com wrote:
Hi all,
I’m wrapping a C struct that has an unsigned short member with certain
constraints on its values, and I’ve represented the member as having an
appropriately-constrained existential type over the usint function. When
initializing the value with an integral constant, I get:
The actual term is: S2Eapp(S2Ecst(g1int_int_t0ype); S2Ecst(int_kind),
S2Eintinf(16))
The needed term is: S2Eapp(S2Ecst(g1uint_int_t0ype); S2Ecst(usint_kind),
S2EVar(3864))
How can I use the integral constant appropriately?
Some test code that quickly reproduces the issue:
typedef foo = [i: int | i == 0] usint i
val x = 0 : foo
I’m wrapping a C struct that has an unsigned short member with certain
constraints on its values, and I’ve represented the member as having an
appropriately-constrained existential type over the usint function. When
initializing the value with an integral constant, I get:
The actual term is: S2Eapp(S2Ecst(g1int_int_t0ype); S2Ecst(int_kind),
S2Eintinf(16))
The needed term is: S2Eapp(S2Ecst(g1uint_int_t0ype);
S2Ecst(usint_kind), S2EVar(3864))
How can I use the integral constant appropriately?
Some test code that quickly reproduces the issue:
typedef foo = [i: int | i == 0] usint i
val x = 0 : foo
I’m wrapping a C struct that has an unsigned short member with certain
constraints on its values, and I’ve represented the member as having an
appropriately-constrained existential type over the usint function. When
initializing the value with an integral constant, I get:
The actual term is: S2Eapp(S2Ecst(g1int_int_t0ype); S2Ecst(int_kind),
S2Eintinf(16))
The needed term is: S2Eapp(S2Ecst(g1uint_int_t0ype);
S2Ecst(usint_kind), S2EVar(3864))
How can I use the integral constant appropriately?
Some test code that quickly reproduces the issue:
typedef foo = [i: int | i == 0] usint i
val x = 0 : foo