Initial LSP implementation/vscode support
Some checks failed
Publish Playground / build (push) Has been cancelled
Publish Playground / deploy (push) Has been cancelled

This commit is contained in:
2026-02-12 20:14:14 -08:00
parent 01a05ba186
commit a9718621e3
36 changed files with 6909 additions and 76 deletions

View File

@@ -7,4 +7,4 @@ ERROR at tests/BadAlt.newt:6:6--6:13: Prelude._:<_ not a constructor for (Prelud
foo (xs :< x) = x
^^^^^^^
ERROR at :1:1--1:2: Failed to compile module BadAlt
ERROR at tests/BadAlt.newt:1:1--1:2: Compile failed

View File

@@ -1,6 +1,7 @@
module Duplicate
-- duplicate name should fail
-- FIXME FC is wrong here
data Either : U -> U -> U where
Left : {a b : U} -> a -> Either a b
Left : {a b : U} -> b -> Either a b

View File

@@ -1,9 +1,9 @@
*** Process tests/Duplicate.newt
module Duplicate
ERROR at tests/Duplicate.newt:4:1--4:5: Duplicate.Left is already defined at tests/Duplicate.newt:4:1--4:5
ERROR at tests/Duplicate.newt:5:1--5:5: Duplicate.Left is already defined at tests/Duplicate.newt:5:1--5:5
-- duplicate name should fail
-- FIXME FC is wrong here
data Either : U -> U -> U where
^^^^
ERROR at :1:1--1:2: Failed to compile module Duplicate
ERROR at tests/Duplicate.newt:1:1--1:2: Compile failed

View File

@@ -2,5 +2,9 @@
module Prelude
module ErrMsg2
ERROR at tests/ErrMsg2.newt:6:13--6:15: Expected '=>' at Keyword:->
foo : Nat → (Nat → Nat)
foo x = \ x -> x
^^
ERROR at :1:1--1:2: Failed to compile module ErrMsg2
ERROR at tests/ErrMsg2.newt:1:1--1:2: Compile failed

View File

@@ -1,10 +1,10 @@
*** Process tests/ErrorDup.newt
module ErrorDup
ERROR at tests/ErrorDup.newt:5:6--5:9: Nat already declared
data Nat = Z | S Nat
ERROR at tests/ErrorDup.newt:9:7--9:10: Nat already declared
record Nat where
data Nat = Z | S Nat
^^^
class Nat where
^^^
ERROR at tests/ErrorDup.newt:7:8--7:11: Nat already declared
data Nat = Z | S Nat
@@ -12,10 +12,10 @@ ERROR at tests/ErrorDup.newt:7:8--7:11: Nat already declared
record Nat where
^^^
ERROR at tests/ErrorDup.newt:9:7--9:10: Nat already declared
record Nat where
ERROR at tests/ErrorDup.newt:5:6--5:9: Nat already declared
data Nat = Z | S Nat
class Nat where
^^^
data Nat = Z | S Nat
^^^
ERROR at :1:1--1:2: Failed to compile module ErrorDup
ERROR at tests/ErrorDup.newt:1:1--1:2: Compile failed

View File

@@ -6,4 +6,4 @@ ERROR at tests/LitConCase.newt:7:5--7:11: expected Prim.Int
foo MkUnit = MkUnit
^^^^^^
ERROR at :1:1--1:2: Failed to compile module LitConCase
ERROR at tests/LitConCase.newt:1:1--1:2: Compile failed

View File

@@ -7,4 +7,4 @@ ERROR at tests/Possible.newt:6:5--6:8: possible constructors: [Prelude.Z, Prelud
foo ()
^^^
ERROR at :1:1--1:2: Failed to compile module Possible
ERROR at tests/Possible.newt:1:1--1:2: Compile failed

View File

@@ -7,4 +7,4 @@ ERROR at tests/Quantity.newt:11:15--11:16: used erased value x$0 (FIXME FC may b
bar {x} = foo x
^
ERROR at :1:1--1:2: Failed to compile module Quantity
ERROR at tests/Quantity.newt:1:1--1:2: Compile failed