Conversation

In general, we have uses for a generic idea of defining some valid X (which can be a type or a term or ...) using names in scopes as part of the definition of X. These naturally for a DAG (unless you go for mutual recursion too).
2
2
I do wish that telescopes and spines were less... listy... and more... graphy. So that more telescopes were equivalent, and more spines could be checked against them. That's why I find records and labelled args nice. Just unsure how to make it efficient in an implementation. 😰
1
3
I’m struggling to even make things work at the moment; inefficiency would be a nice problem to have, from that perspective ^_^;;
1
2
Yeah, well... I guess I have ideas how to make it work but that might not work in reality ; _ ; just hate how positional all the currying and pairing stuff is - as much as it's nice in some cases then stuff lines up properly
1
1
I had this weird (probably bad) idea to have records with 'abstract' fields that you could make concrete later - which would end up kind of being like functions? And you'd be able to have a 'default' field that your record would reduce to if all the fields were concrete.
2
1
Like I think generally it's considered good to have nice categorical models of your type systems, and alterations like this might break a bunch of that stuff? Or at least be a rather ad-hoc extension? All the category theory stuff is a bit mysterious to me though. 😰
1
Show replies
Replying to
it finally clicked that the same situation arises in Facet, and that I have a broadly similar approach to solving it (not yet implemented) basically, Facet approaches inversion of control/ad hoc polymorphism via effects. no typeclasses or module signatures, just effects
1
2
so for example a Monoid is also a Semigroup: interface Semigroup : (S : Type) -> Interface { _ <> _ : S -> S -> [Semigroup S] S } interface Monoid : (S : Type) -> [Semigroup S] Interface { unit : [Monoid S] S } (brackets mean “needs this effect” so a Monoid needs a Semigroup)
1
Show replies