derive Show and Eq, improvements to LSP
This commit is contained in:
14
tests/Derive.newt
Normal file
14
tests/Derive.newt
Normal file
@@ -0,0 +1,14 @@
|
||||
module Derive
|
||||
|
||||
import Prelude
|
||||
|
||||
data Blah = Foo Int | Bar | Baz String
|
||||
|
||||
derive Eq Blah
|
||||
derive Show Blah
|
||||
|
||||
main : IO Unit
|
||||
main = do
|
||||
printLn $ Foo 42
|
||||
printLn $ Bar
|
||||
printLn $ Baz "woo"
|
||||
3
tests/Derive.newt.golden
Normal file
3
tests/Derive.newt.golden
Normal file
@@ -0,0 +1,3 @@
|
||||
(Foo 42)
|
||||
Bar
|
||||
(Baz woo)
|
||||
7
tests/ImportError.newt
Normal file
7
tests/ImportError.newt
Normal file
@@ -0,0 +1,7 @@
|
||||
module ImportError
|
||||
|
||||
-- test the FC are right and don't include next line
|
||||
-- TODO continue on and hit the next one.
|
||||
import Blah
|
||||
import Foo.Bar
|
||||
import Prelude
|
||||
2
tests/ImportError.newt.fail
Normal file
2
tests/ImportError.newt.fail
Normal file
@@ -0,0 +1,2 @@
|
||||
*** Process tests/ImportError.newt
|
||||
ERROR at tests/ImportError.newt:5:8--5:12: error reading tests/Blah.newt: Error: ENOENT: no such file or directory, open 'tests/Blah.newt'
|
||||
8
tests/UnsafeIO.newt
Normal file
8
tests/UnsafeIO.newt
Normal file
@@ -0,0 +1,8 @@
|
||||
module UnsafeIO
|
||||
|
||||
import Prelude
|
||||
|
||||
main : IO Unit
|
||||
main = do
|
||||
let x = unsafePerformIO $ putStrLn "Hello, World!"
|
||||
pure MkUnit
|
||||
1
tests/UnsafeIO.newt.golden
Normal file
1
tests/UnsafeIO.newt.golden
Normal file
@@ -0,0 +1 @@
|
||||
Hello, World!
|
||||
Reference in New Issue
Block a user