flix / programming-flix

A tutorial for programming in Flix
Apache License 2.0
6 stars 13 forks source link

`Using Flix to Solve Constraints on Lattices` example in `Fixpoints` #67

Closed ninaandrup closed 2 years ago

ninaandrup commented 2 years ago

I cannot get the example to work, when I copy it into VS code.

magnus-madsen commented 2 years ago

@JonathanStarup Can you take a look?

@ninaandrup Do you get any errors or what do you mean by it does not work?

ninaandrup commented 2 years ago

I get a couple of errors.

Missing implementation of 'lessEqual' required by class 'PartialOrder'.

46 | instance PartialOrder[Sign] {

              ^^^^^^^^^^^^
              missing implementation

And from main

>> Parse Error: Invalid input ';', expected "ref", "reify", "reifyBool", "reifyType", "reifyEff", LegalLetter, ':', "->", ArgumentList, '[', '.', "::", ":::", Op, '`', "<+>" or ** (line 105, column 22):
    query p select (r; v) from LocalVar(r; v) |> println;

Because of the ; in (r; v).

paulbutcher commented 2 years ago

What's involved in rolling out a new version of the website? I just ran into this and spent a while debugging, started putting together a PR to fix the website, and then found that it had already been fixed. Would be nice to save someone else the same busywork.

paulbutcher commented 2 years ago

While I'm here: any reason why we implement Eq etc by hand instead of simply using with?:

enum Sign with Boxable, Eq, Order, ToString {
magnus-madsen commented 2 years ago

While I'm here: any reason why we implement Eq etc by hand instead of simply using with?:

enum Sign with Boxable, Eq, Order, ToString {

Don't know.

But, Ill look into uploading the new version.

magnus-madsen commented 2 years ago

Updated!