Implement sum/union types #16

Closed
opened 2024-02-08 19:56:22 +00:00 by sashakoshka · 3 comments
Owner
No description provided.
sashakoshka added the
enhancement
label 2024-02-08 19:56:22 +00:00
sashakoshka added this to the (deleted) project 2024-02-08 19:56:22 +00:00
sashakoshka added this to the Q1 2024 milestone 2024-02-08 20:05:36 +00:00
sashakoshka added the
status
ongoing
label 2024-03-01 07:56:01 +00:00
Author
Owner
On https://git.tebibyte.media/fspl/fspl/src/branch/implement-union-types
Author
Owner

We are also going to need a match statement to extract the type of a union. Perhaps:

desc:String = match u in
        | u:Int 'An int'
        | u:F64 'A float'

And the value:

intval:Int = match u in
        | u:Int u
        | u:F64 [~Int u]
We are also going to need a match statement to extract the type of a union. Perhaps: ``` desc:String = match u in | u:Int 'An int' | u:F64 'A float' ``` And the value: ``` intval:Int = match u in | u:Int u | u:F64 [~Int u] ```
Author
Owner

Remedied by #54

Remedied by #54
sashakoshka removed the
status
ongoing
label 2024-03-06 20:18:13 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: fspl/fspl#16
No description provided.