mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-20 20:16:26 +02:00
pkg(husk-1.0.0): add husk
This commit is contained in:
parent
2ae63a4d69
commit
7ff87cf0f2
6 changed files with 37 additions and 0 deletions
14
packages/husk/1.0.0/build.sh
vendored
Normal file
14
packages/husk/1.0.0/build.sh
vendored
Normal file
|
@ -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
|
6
packages/husk/1.0.0/environment
vendored
Normal file
6
packages/husk/1.0.0/environment
vendored
Normal file
|
@ -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
|
5
packages/husk/1.0.0/metadata.json
vendored
Normal file
5
packages/husk/1.0.0/metadata.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"language": "husk",
|
||||
"version": "1.0.0",
|
||||
"aliases": []
|
||||
}
|
10
packages/husk/1.0.0/run
vendored
Normal file
10
packages/husk/1.0.0/run
vendored
Normal file
|
@ -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}/${@}"
|
1
packages/husk/1.0.0/test.husk
vendored
Normal file
1
packages/husk/1.0.0/test.husk
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
"OK
|
Loading…
Add table
Add a link
Reference in a new issue