cakeml icon indicating copy to clipboard operation
cakeml copied to clipboard

Fuse strlit and implode in mlstringTheory

Open myreen opened this issue 7 years ago • 2 comments

Currently, mlstringTheory defines a function implode as follows.

val implode_def = Define`
  implode = strlit`

which is exactly the same as the (only) constructor strlit for the mlstring type, which is defined in the same file as follows:

val _ = Datatype`mlstring = strlit string`

As discussed on Slack on 8 June 2018, it would be nice if strlit was renamed to implode in the definition of the mlstring type and implode_def was removed.

This requires going through the entire development replacing all mentions of strlit with implode and updating the translator to still produce good output for implode applied to a concrete string literal.

myreen avatar Jun 08 '18 09:06 myreen

You could keep an overload in place to simplify your first task.

mn200 avatar Jun 08 '18 11:06 mn200

This should be an easy task but requires tweaking the translator slightly.

tanyongkiam avatar Dec 09 '24 12:12 tanyongkiam