operator sections
Some checks failed
Publish Playground / build (push) Has been cancelled
Publish Playground / deploy (push) Has been cancelled

This commit is contained in:
2026-01-31 13:21:23 -08:00
parent eed5c09508
commit c3e70c9ecc
8 changed files with 48 additions and 26 deletions

20
tests/Section.newt Normal file
View File

@@ -0,0 +1,20 @@
module Section
import Prelude
-- got infix in prefix position
add : Int Int Int
add = (+)
add2 : Int Int
add2 = (+ 2)
-- trailing operator
add2' : Int Int
add2' = (2 +)
main : IO Unit
main = do
printLn $ (+) 2 3
printLn $ (+ 3) 2
printLn $ (2 +) 3