60 lines
1017 B
YAML
60 lines
1017 B
YAML
id: "unison"
|
|
aliases:
|
|
- "ucm"
|
|
name: "Unison"
|
|
|
|
install:
|
|
prepare:
|
|
apt:
|
|
- haskell-stack
|
|
manual: |
|
|
mkdir -p "${pkg}/opt/unison/skel"
|
|
install -d "${pkg}/usr/local/bin"
|
|
|
|
git clone https://github.com/unisonweb/unison.git
|
|
pushd unison
|
|
stack build
|
|
cp "$(stack exec which unison)" "${pkg}/usr/local/bin/"
|
|
popd
|
|
|
|
pushd "${pkg}/opt/unison/skel"
|
|
"${pkg}/usr/local/bin/unison" -codebase . init
|
|
LESS="+q" "${pkg}/usr/local/bin/unison" -codebase . <<< 'pull https://github.com/unisonweb/base:.trunk .base'
|
|
popd
|
|
|
|
setup: |
|
|
shopt -s dotglob
|
|
cp -R /opt/unison/skel/* ./
|
|
|
|
repl: |
|
|
unison -codebase .
|
|
input: |
|
|
DELAY: 3
|
|
find : [a] -> [a]
|
|
output: |
|
|
base.List.reverse
|
|
|
|
main: "main.u"
|
|
template: |
|
|
use io
|
|
|
|
main : '{IO} ()
|
|
main = 'let
|
|
printLine "Hello, world!"
|
|
|
|
run: |
|
|
echo "Type 'run main' to run the code."
|
|
unison -codebase .
|
|
helloInput: |
|
|
DELAY: 3
|
|
run main
|
|
|
|
scope:
|
|
code: |
|
|
x = 123 * 234
|
|
input: |
|
|
DELAY: 3
|
|
add x
|
|
DELAY: 3
|
|
display x
|