Sign inSign up

cutsea110/ifl

By cutsea110

Updated 4 months ago

Implementing Functional Language

Image
0

1.2K

cutsea110/ifl repository overview

How to use

Run on local

$ cabal run ifl -- -V
    ____________
   /  _/ ____/ /
   / // /_  / /
 _/ // __/ / /___
/___/_/   /_____/ Implimenting Functional Languages

> cabal run ifl -- [OPTION...] <program-file>
OPTION
  -c Compiler     --compiler=Compiler      compiler name (mark1 | mark2 | mark3 | mark4 | mark5 | mark5alt | mark5gc | mark5revgc | mark5cp | gmark1 | gmark2 | gmark3 | gmark4 | gmark5 | gmark6 | gmark7 | timark1 | timark1cp | timark2 | timark3 | timark4 | timark5 | timark6 | pgmark1 | pgmark2 | pgmark3 | pgmark4)
  -l Lifter       --lifter=Lifter          lambda lifter name (nolift | lmark1 | lmark2 | lmark3 | lmark4)
  -v              --verbose                step output on stderr
  -w              --pretty verbose         step output with showing heap on stderr
  -t Threshold    --threshold=Threshold    threshold for Garbage Collection
  -m MachineSize  --machines=MachineSize   Machine size for Parallel G-machine (default: 4)
  -L              --convert-to-list-based  convert to list based program
  -p              --profile                profile output
  -V, -?          --version                show version

Run on docker

See Dockerhub cutsea110/ifl.

$ cat test.ifl
fib n = if (n<2) 1 (fib (n-1) + fib (n-2));
main = fib 10

$ docker run -v ./:/work -it --rm cutsea110/ifl:0.3.31 -c pgmark4 /work/test.ifl
89

Tag summary

Content type

Image

Digest

sha256:18c47c3c4

Size

13 MB

Last updated

4 months ago

docker pull cutsea110/ifl:0.3.33