anoma / juvix

A language for intent-centric and declarative decentralised applications
https://docs.juvix.org
GNU General Public License v3.0
457 stars 53 forks source link

Named partial application shouldn't be sensitive to argument order #3145

Open lukaszcz opened 2 weeks ago

lukaszcz commented 2 weeks ago

Typechecking

module papp;

import Stdlib.Prelude open;

f (x y : Nat) : Nat := x + y;

g : Nat -> Nat := f@?{y := 1};

gives the error

/Users/heliax/Documents/progs/juvix/papp.juvix:7:19-24: error:
Missing arguments in named application:
• x

Instead, f@?{y := 1} should be desugared to a lambda-abstraction:

\{x := f x 1}
lukaszcz commented 1 week ago

I think we agreed to remove the @? syntax.