Open catalin-hritcu opened 8 years ago
Just realized that Bytes.length
was pointing to FStar.Bytes
and that removing the Bytes
prefix makes the error go away. To my surprise F* has two incompatible modules called Bytes
: Platform.Bytes.bytes
and FStar.Bytes.bytes
. Moreover, FStar.Bytes.bytes
seems to be automatically imported?
[Edited to remove my feelings about this]
I joined the club today. One of those bytes needs to die.
Bumping this to high priority. I think this is particularly important right now, as we start rolling out the new parser combinators, which operate mainly on bytes (but currently neither Platform.Bytes.bytes
nor FStar.Bytes.bytes
).
Platform.Bytes is now moved out to ucontrib. Perhaps we should now remove it altogether
Type-checking the following code:
is giving me a dubious typing error:
So I looked in the debugger and it seems the error is still bogus, but a bit more explicit before the normalization the printing now does by default.
The computed type of the expression
(Prims.list<?151930> ((fun ss cs -> (FStar.Bytes.bytes $$ Tot Type(?151930))) ss cs))
is 2 eta reduction steps away from the required typePrims.list<0> Platform.Bytes.bytes)
, but F* only eta reduces this when printing the error message.At least this is my understanding of this after staring at it for a while.