-
-
Notifications
You must be signed in to change notification settings - Fork 916
Closed
Description
Sometimes writing a record with same name for the type is unconvenient, especially if it's repetitive. For example
pub type User {
User(id: Int, verified: Bool)
}
pub type Pool {
Pool(name: String, votes: List(User))
}
pub type Message {
Message(id: Int, owner: User, pools: List(Pool))
}Instead of writing repetitive type A { A(B) }, we can just have type A(B).
pub type User(id: Int, verified: Bool)
pub type Pool(name: String, votes: List(User))
pub type Message(id: Int, owner: User, pools: List(Pool))There's might be a better form for this syntax, since it's ambiguous for generic syntax.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels