The executable Koka complied doesn't get permission on arm-macOS
For example, this is the example on the Koka website:
// A generator effect with one operation
effect yield<a>
fun yield( x : a ) : ()
// Traverse a list and yield the elements
fun traverse( xs : list<a> ) : yield<a> ()
match xs
Cons(x,xx) -> { yield(x); traverse(xx) }
Nil -> ()
fun main() : console ()
with fun yield(i : int)
println("yielded " ++ i.show)
[1,2,3].traverse
Store it in main.kk and run the command koka main.kk -o main && ./main, you will get the message below:
compile: main.kk
loading: std/core
loading: std/core/types
loading: std/core/hnd
check : main
linking: main
created: .koka/v2.4.0/clang-debug/main
created: main
zsh: permission denied: ./main
To run the executable, you have give the executable permission by running chmod +x ./main. I think this is a part of work the compiler should do.
My platform is M1 Pro MacBook.
Same issue on Koka 2.4.2, Ubuntu 20.04
Same with Koka 2.4.2 on FreeBSD 13.2
Is this still an issue? What permissions does the file have?
I directly applied chmod -x to the compiled files in this pr(#324). It works well on my machine.
Maybe this is related to #283?
Were the files written to the tmp directory?