Higher-kinded bounded polymorphism in OCaml (2021)
1–10 of 13 posts
Re: Higher-kinded bounded polymorphism in OCaml (2021)
#2Re: Higher-kinded bounded polymorphism in OCaml (2021)
#3[flagged]
Re: Higher-kinded bounded polymorphism in OCaml (2021)
#4I wonder how much this is a problem in practice, aside from the type-checker taking too long.
Re: Higher-kinded bounded polymorphism in OCaml (2021)
#5> Thus, with type aliases, the type equality problem becomes the higher-order unification problem, which is not decidable. I wonder how much this is a problem in practice, aside from the type-checker taking too long.
Re: Higher-kinded bounded polymorphism in OCaml (2021)
#6[flagged]
" Please don't complain about tangential annoyances—e.g. article or website formats, name collisions, or back-button breakage. They're too common to be interesting. " https://news.ycombinator.com/newsguidelines.html
Re: Higher-kinded bounded polymorphism in OCaml (2021)
#7 type ('a,'b) app += List_name : 'a list -> ('a,list_name) app
I understand that app is an extensible type and this line adds a union case called List_name to the type, but the signature of List_name confuses me. If I write (List_name x) is x a list or a function?Re: Higher-kinded bounded polymorphism in OCaml (2021)
#8I'm more familiar with F#, so I got stuck at this line: type ('a,'b) app += List_name : 'a list -> ('a,list_name) app I understand that app is an extensible type and this line adds a union case called List_name to the type, but the signature of List_name confuses me. If I write (List_name x) is x a list or a function?
List_name: 'a list -> ('a, list_name) app
reads: for any value "x" of type "'a list", "List_name x" constructs a value of type "('a, list_name) app". In this case, it is the the "list_name" tag part of the type which is dependent on the union case.Re: Higher-kinded bounded polymorphism in OCaml (2021)
#9I'm more familiar with F#, so I got stuck at this line: type ('a,'b) app += List_name : 'a list -> ('a,list_name) app I understand that app is an extensible type and this line adds a union case called List_name to the type, but the signature of List_name confuses me. If I write (List_name x) is x a list or a function?
Re: Higher-kinded bounded polymorphism in OCaml (2021)
#10I'm more familiar with F#, so I got stuck at this line: type ('a,'b) app += List_name : 'a list -> ('a,list_name) app I understand that app is an extensible type and this line adds a union case called List_name to the type, but the signature of List_name confuses me. If I write (List_name x) is x a list or a function?