similarly, when we use const, we might write:
f : a -> [b] -> [a]
f x ys = map (const x) ys
even assuming map is specialized to lists, there are *lots* more implicit/unknown bits here:
f : {a : ?} -> {b : ?} -> a -> [b] -> [a]
f {a} {b} x ys = map {?} {?} (const {?} {?} x) ys
Conversation
Ohh, this is all really helpful! Might take me a while to unpack - I haven't gone as deep as you, but it rings many bells from looking at 's elaboration-zoo a while back. It's super handy to have some of these problems stated explicitly in this way though!
These would definitely trip up folks if they weren't careful, and I assume there's many people constantly tripping over the same thing.
1
1
Show replies
glad I could help! and please feel free to dive deeper into any of this that you’d like, or anything you pick up as you go. I’m still very much novice in all of this; it’s proven one of the hardest nuts to crack that I’ve yet encountered in CS, which is saying rather a lot.
2
2
Yeah for sure - at the moment I've been mainly cargo-culting off the elaboration-zoo, but it's sometimes hard to understand _why_ certain choices where made, and what the other options are. I also find papers on unification rather hard to break the ice on. 😬
3
1
Show replies

