Skip to content

How to construct a structural type via metaprogramming? #14056

Discussion options

You must be logged in to vote

You need to use the Refined type wich does have a Refined.apply factory method.

Here is a prototype macro that converts a tuple ("name1" -> T1, "name2" -> T2, ...) into Record { val name1: T1; val name2: T2; ... }:

Replies: 2 comments 12 replies

Comment options

You must be logged in to vote
7 replies
@prolativ
Comment options

@AugustNagro
Comment options

@prolativ
Comment options

@AugustNagro
Comment options

@nicolasstucki
Comment options

Answer selected by bishabosha
Comment options

You must be logged in to vote
5 replies
@prolativ
Comment options

@AugustNagro
Comment options

@prolativ
Comment options

@AugustNagro
Comment options

@nicolasstucki
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants