pkg(husk-1.0.0): add husk
This commit is contained in:
parent
2ae63a4d69
commit
7ff87cf0f2
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cp ../../haskell/9.0.1/build.sh ./haskell-build.sh
|
||||||
|
sed -Ei 's/9\.0\.1/8\.10\.7/g' ./haskell-build.sh
|
||||||
|
source ./haskell-build.sh
|
||||||
|
|
||||||
|
# compile Husk from source
|
||||||
|
git clone -q "https://github.com/barbuz/husk.git"
|
||||||
|
cd husk
|
||||||
|
../bin/ghc -O2 Husk
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
cd ..
|
||||||
|
rm -f haskell-build.sh
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# haskell and husk path
|
||||||
|
export PATH=$PWD/bin:$PATH
|
||||||
|
export HUSK_PATH=$PWD/husk
|
||||||
|
export LANG=en_US.UTF8
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"language": "husk",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"aliases": []
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Store the current path because we'll need it to run the program file
|
||||||
|
PROGRAM_PATH=$PWD
|
||||||
|
|
||||||
|
# For now, Husk can only be run within the folder that has the imported modules
|
||||||
|
cd $HUSK_PATH
|
||||||
|
|
||||||
|
# Run Husk from file in unicode format with the given args
|
||||||
|
./Husk -uf "${PROGRAM_PATH}/${@}"
|
|
@ -0,0 +1 @@
|
||||||
|
"OK
|
Loading…
Reference in New Issue