Skip to content

Attribute shortcut on class types#481

Closed
Drup wants to merge 2 commits intoocaml:trunkfrom
Drup:attr_classes
Closed

Attribute shortcut on class types#481
Drup wants to merge 2 commits intoocaml:trunkfrom
Drup:attr_classes

Conversation

@Drup
Copy link
Copy Markdown
Contributor

@Drup Drup commented Feb 23, 2016

This is a fix for #342 (comment). I forgot class types, so here they are. I also fixed the order for shortcut/flags on class fields and added the relevant tests.

Note that the order for the ! flag on class fields is a bit irregular:

val! [@foo] ...

and not

val [@foo] ! ...

I think this is for the best. If anyone disagree, I can change it.

I also had to copy the trick used in the method_ rule to avoid a conflict in the grammar. As the TODO says, this part would benefit a lot from a little cleanup.

cc @bobzhang

@Drup
Copy link
Copy Markdown
Contributor Author

Drup commented Feb 23, 2016

@damiendoligez @gasche This should probably go inside 4.03

@Drup
Copy link
Copy Markdown
Contributor Author

Drup commented Feb 24, 2016

I don't understand the test failure, I can't reproduce them. Are they related ? It seems a bit unlikely.

@mshinwell
Copy link
Copy Markdown
Contributor

Yeah, there's some backtrace-related failure that occurs only with flambda, showing a strange frame with no location information. It's on our list to look at.

@damiendoligez
Copy link
Copy Markdown
Member

@Drup As this is a bug fix, you should have made the PR against 4.03, not trunk.

@Drup
Copy link
Copy Markdown
Contributor Author

Drup commented Feb 24, 2016

@damiendoligez Alright, sorry! Should I close this one ?

@damiendoligez
Copy link
Copy Markdown
Member

I guess so, yes, since github cannot redirect a PR.

@Drup Drup mentioned this pull request Feb 27, 2016
@Drup Drup closed this Feb 27, 2016
@trefis trefis mentioned this pull request Feb 29, 2016
@Drup Drup deleted the attr_classes branch June 24, 2016 12:17
Keryan-dev pushed a commit to Keryan-dev/ocaml that referenced this pull request Jun 21, 2021
Gbury pushed a commit to Gbury/ocaml that referenced this pull request Jun 22, 2021
stedolan pushed a commit to stedolan/ocaml that referenced this pull request May 24, 2022
Currently, every type head caches its free names. This isn't helpful for alias
types, since the free names of a `Simple.t` are trivial to produce on
demand (it's usually just the simple itself). We can avoid this by only wrapping
non-alias types in `With_cached_free_names.t`.

Pleasingly, it so happens that largely all that's needed is to change

```
type 'head t = 'head Descr.t WCFN.t Or_unknown_or_bottom.t
```

to

```
type 'head t = 'head WCFN.t Descr.t Or_unknown_or_bottom.t
```

and commute a few function calls similarly.
EmileTrotignon pushed a commit to EmileTrotignon/ocaml that referenced this pull request Jan 12, 2024
* solved issue ocaml#415

* LogoCloud added in UserPage

* small changes

* ood industrial data added

* removed example company data
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

Successfully merging this pull request may close these issues.

3 participants