fixes and changes for porting

- forward declaration of records
- fixes to projections
- drop record accessors (use projections instead)
- changes to names to disambiguate
This commit is contained in:
2025-01-01 20:21:07 -08:00
parent 39be411c37
commit 9ed2b2077d
22 changed files with 202 additions and 315 deletions

18
tests/ForwardRecord.newt Normal file
View File

@@ -0,0 +1,18 @@
module ForwardRecord
import Prelude
record Point where
x : Int
y : Int
instance Show Point
instance Show Point where
show pt = show pt.x ++ "," ++ show pt.y
main : IO Unit
main = do
printLn $ MkPoint 1 2

View File

@@ -0,0 +1 @@
1,2