flix icon indicating copy to clipboard operation
flix copied to clipboard

feat: add lsp support for type classes

Open jaschdoc opened this issue 3 years ago • 1 comments

  • [ ] Rename classes
  • [ ] Type constraints (Semantic tokens for these or what is meant by this?)

Test program

def main(): Unit & Impure =
    Tester.p();
    println("${A.b(5)}")

pub class A[t] {
    pub def b(t: t): t with ToString[t] = t
}

instance A[Int32]

other file

namespace Tester {

    pub def p(): Unit & Impure =
        println("${A.b(15)}")

}

Closes #1525

jaschdoc avatar Jul 14 '22 19:07 jaschdoc

Also please test this with namespaces. Source locations are tricky when you have e.g. instance N.C[a]

mlutze avatar Jul 14 '22 20:07 mlutze

I will break the original task down into smaller tasks.

magnus-madsen avatar Aug 29 '22 19:08 magnus-madsen