flix / programming-flix

A tutorial for programming in Flix
Apache License 2.0
6 stars 13 forks source link

refactor: remove opaque types #84

Closed ninaandrup closed 2 years ago

ninaandrup commented 2 years ago

Related to https://github.com/flix/flix/issues/3086

ninaandrup commented 2 years ago

@magnus-madsen should we write something about enum singletons in https://doc.flix.dev/datatypes/ ? I could open an issue or just write a couple of lines

magnus-madsen commented 2 years ago

Could you open a ticket and then write maybe a short paragraph on the Tips and Tricks page instead?

Just to say something like if you have an enum with a single case:

enum USD {
  case USD(Int32)
}

you can simplify it to enum USD(Int32) instead.

Something like that.