External Publication
Visit Post

Would keyword arguments conflict with currying in Haskell?

Haskell Community [Unofficial] April 12, 2026
Source
The difficult part is what if you have functions with multiple bodies, or functions that pattern match args immediately? foo :: Foo -> Bar -> Int foo Foo{a, b = 123} bar1 = a foo Foo{a, b} bar2 = other b I would also want the ability to separate “the keyword arg callers must use” from “name of local var I’m assigning to this arg”. I think a syntax like this could be interesting: foo :: a:Foo -> b:Bar -> Int foo Foo{} bar = ...

Discussion in the ATmosphere

Loading comments...