riju/langs/curry.yaml

44 lines
1.0 KiB
YAML

id: "curry"
aliases:
- "curry2prolog"
- "pakcs"
name: "Curry"
install:
prepare:
apt:
- swi-prolog
# We are installing from upstream because the Ubuntu 20.10 package
# was broken (pakcs wouldn't start up due to swi-prolog being bumped
# from 7.x to 8.x, causing a ZIP decoding error).
manual: |
install -d "${pkg}/opt"
install -d "${pkg}/usr/local/bin"
path="$(curl -fsSL https://www.informatik.uni-kiel.de/~pakcs/download.html | sed '0,/Current release:/d' | grep 'href="download' | grep Linux | grep -Eo 'download/[^"]+' | head -n1)"
wget "https://www.informatik.uni-kiel.de/~pakcs/${path}" -O pakcs.tar.gz
mkdir pakcs
tar -xf pakcs.tar.gz -C pakcs --strip-components=1
pushd pakcs
make PAKCSINSTALLDIR=/opt/pakcs
popd
cp -R pakcs "${pkg}/opt/"
ln -s /opt/pakcs/src/pakcs "${pkg}/usr/local/bin/"
repl: |
pakcs
main: "main.curry"
template: |
main :: IO ()
main = putStrLn "Hello, world!"
run: |
pakcs :load main.curry :eval main
scope:
code: |
x = 123 * 234