flix / programming-flix

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

Non-existing `Unsafe.println(x)` #65

Closed ninaandrup closed 2 years ago

ninaandrup commented 2 years ago

The example in this paragraph

def sum(x: Int32, y: Int32): Int32 = 
    let _ = Unsafe.println(x);
    let _ = Unsafe.println(y);
    x + y

does not work. It looks like there is an unsafePrint in Solver.flix.

magnus-madsen commented 2 years ago

We have simply remove it. What you can do instead is:

let _ = println("Hello") as & Pure