# SPDX-License-Identifier: CC0-1.0 language = 'Koka' display = 'Koka (koka v3.2.2)' license = [{ name = 'Apache-2.0', url = 'https://github.com/koka-lang/koka/blob/master/LICENSE' }] filename = 'main.kk' install = ''' KOKA_VERSION=v3.2.2 curl -sSL "https://github.com/koka-lang/koka/releases/download/${KOKA_VERSION}/install.sh" | sh # あらかじめ標準ライブラリ(現在は std/core のみ)をコンパイルしておくことでコンパイル時間を削減する cd /judge cat <main.kk fun main() "Hello".println EOF # .koka/ 以下のディレクトリ名を固定するために --buildtag と --no-buildhash を付ける koka -O2 --no-debug -o a.out main.kk --buildtag=atcoder --no-buildhash -v0 # 不要なファイルを削除する pushd ".koka/${KOKA_VERSION}-atcoder/gcc-release" rm main* a popd rm main.kk a.out ''' compile = ''' # --no-debug: デバッグのための情報を付けないようにする # -v0 : ログ出力を減らす (デフォルトは1) koka -O2 --no-debug -o a.out main.kk --buildtag=atcoder --no-buildhash -v0 1>&2 if [ -f a.out ]; then chmod +x a.out; fi ''' object = 'a.out' execution = [ './a.out', ]