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:
18
tests/ForwardRecord.newt
Normal file
18
tests/ForwardRecord.newt
Normal 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
|
||||
1
tests/ForwardRecord.newt.golden
Normal file
1
tests/ForwardRecord.newt.golden
Normal file
@@ -0,0 +1 @@
|
||||
1,2
|
||||
Reference in New Issue
Block a user