Skip to content
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

No way to change mutable fields of a tag arm. #135

Closed
froystig opened this issue Jul 28, 2010 · 3 comments
Closed

No way to change mutable fields of a tag arm. #135

froystig opened this issue Jul 28, 2010 · 3 comments

Comments

@froystig
Copy link
Contributor

Suppose we have

type foo = tag(arm(mutable int));

The language binds identifiers in alt patterns as slots-local-to-the-case-block with value copied from the one sitting in the tag type. That is:

let foo farm = arm(5);
alt (farm) {
    case (arm(x)) {
        /* x is a local slot holding 5 here, assigning to
           it does not change the value in farm */
        x = 6;
    }
}

This is possibly counterintuitive. Maybe x should be an alias (caveat emptor: may require extra care). In any case, we probably want to support some kind of way of writing to these fields, if we are going to allow them to be marked mutable.

@graydon
Copy link
Contributor

graydon commented Jan 27, 2011

Shifted to rustc. May need to revisit there.

@marijnh
Copy link
Contributor

marijnh commented Jul 1, 2011

Do we really want mutable tag fields? We seem to get by fine without them, and they don't really fit into any tradition of algebraic data types.

@msullivan
Copy link
Contributor

It looks like we no longer allow mutable fields in tag arms. Trying to use one produces "warning: ignoring deprecated 'mutable' type constructor".

keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
kazcw pushed a commit to kazcw/rust that referenced this issue Oct 23, 2018
* [travis-ci] deny warnings

* fix all warnings
dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
dylanmckay added a commit to dylanmckay/rust that referenced this issue May 16, 2019
Add extra steps for macOS, as noted in rust-lang#131
shepmaster pushed a commit to shepmaster/rust that referenced this issue Jun 13, 2019
Add extra steps for macOS, as noted in rust-lang#131
dylanmckay added a commit to dylanmckay/rust that referenced this issue Sep 26, 2019
Add extra steps for macOS, as noted in rust-lang#131
dylanmckay added a commit to dylanmckay/rust that referenced this issue Sep 26, 2019
Add extra steps for macOS, as noted in rust-lang#131
dylanmckay added a commit to dylanmckay/rust that referenced this issue Sep 26, 2019
Add extra steps for macOS, as noted in rust-lang#131
bjorn3 pushed a commit to bjorn3/rust that referenced this issue Mar 7, 2022
ZuseZ4 referenced this issue in EnzymeAD/rust Mar 7, 2023
* Add export ignores to produce small tarballs
* Do not add benchmarks subdirectory
* Include benchmarks directory if present
* Use checkout@v1 action

The v2 action seems to ignore files marked with `export-ignore` in the .gitattributes file.

See https://github.saobby.my.eu.orgmunity/t/using-container-checkout-doesnt-checkout-hidden-files/18429

* fix the CI apocalypse
* [CMAKE] fix EXISTS test

Co-authored-by: Noah D. Brenowitz <nbren12@gmail.com>
celinval pushed a commit to celinval/rust-dev that referenced this issue Nov 2, 2024
Simplify Kani instructions with the new kani script for users.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.

---------

Co-authored-by: Carolyn Zech <cmzech@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants