-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extending the standard library and syntax #422
Comments
A new standard library is being written.
|
In the new standard library, one of our goals is to make it so the only type to describe a sequence of elements in specifications are sequences. In the next release, we will (probably) automatically coerce lists into sequences using
In the future standard library, this specific case does not not matter since since the
Never really considered this and I have no strong feelings either way. I probably lean more slightly to having them defined as predicates in the library since it makes the semantics of the language more explicit and generally makes things slightly easier, both for users and maintainers. |
When working with Gospel I run into the same issues from time to time:
Functions like
mapi
ormap2
are defined for lists, but not for sequences. On the other hand, sequence has anappend
function, which is missing for lists. You can of course define them yourself, but maybe if there is enough interest they could also be added to the standard library directly.mem
functionFor lists the signature of the mem function is
predicate mem (x: 'a) (l: 'a t)
, for sequences it ispredicate mem (s: 'a t) (x: 'a)
The operators
&&
,||
, andnot
cannot be used as function names or applied partially. So for example if you want to fold over a sequence of booleans, you always have to writeSequence.fold_left (fun a b -> a && b) true xs
The text was updated successfully, but these errors were encountered: