sam46 / paskell Goto Github PK
View Code? Open in Web Editor NEWA Pascal to LLVM compiler in Haskell
License: BSD 3-Clause "New" or "Revised" License
A Pascal to LLVM compiler in Haskell
License: BSD 3-Clause "New" or "Revised" License
Add support for arrays, or records or any of the TODOs
Create a travis.yml script for the existing tests
I run the following program to test scoping :
program ScopeDemo;
var A : integer;
procedure ScopeInner;
begin
writeln (2)
end;
procedure AA;
var A : integer;
procedure CC;
begin
writeln (A)
end;
begin
A := 999;
CC();
end;
begin
A := 20;
AA();
end.
This runs correctly on https://www.onlinegdb.com/online_pascal_compiler, an online Pascal compiler. On the Paskell I installed with docker, I had the following eror :
paskell: src/Emit.hs:(121,1)-(125,13): Non-exhaustive patterns in function genDeclVar
I assume it would be fairly difficult to upgrade to llvm 9?
Cabal-2.0.1.1: copy/register
llvm-hs-5.1.3: download
llvm-hs-5.1.3: configure
Progress 20/22
-- While building custom Setup.hs for package llvm-hs-5.1.3 using:
/private/var/folders/dg/dcnc7sqd7_5fmy5ctdmngzch0000gp/T/stack28299/llvm-hs-5.1.3/.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-2.0.1.0 configure --with-ghc=/Users/seanj/.stack/programs/x86_64-osx/ghc-8.2.2/bin/ghc --with-ghc-pkg=/Users/seanj/.stack/programs/x86_64-osx/ghc-8.2.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/seanj/.stack/snapshots/x86_64-osx/lts-11.22/8.2.2/pkgdb --libdir=/Users/seanj/.stack/snapshots/x86_64-osx/lts-11.22/8.2.2/lib --bindir=/Users/seanj/.stack/snapshots/x86_64-osx/lts-11.22/8.2.2/bin --datadir=/Users/seanj/.stack/snapshots/x86_64-osx/lts-11.22/8.2.2/share --libexecdir=/Users/seanj/.stack/snapshots/x86_64-osx/lts-11.22/8.2.2/libexec --sysconfdir=/Users/seanj/.stack/snapshots/x86_64-osx/lts-11.22/8.2.2/etc --docdir=/Users/seanj/.stack/snapshots/x86_64-osx/lts-11.22/8.2.2/doc/llvm-hs-5.1.3 --htmldir=/Users/seanj/.stack/snapshots/x86_64-osx/lts-11.22/8.2.2/doc/llvm-hs-5.1.3 --haddockdir=/Users/seanj/.stack/snapshots/x86_64-osx/lts-11.22/8.2.2/doc/llvm-hs-5.1.3 --dependency=Cabal=Cabal-2.0.1.1-ARIl7MGNKZFBAH1HVzpC6s --dependency=array=array-0.5.2.0 --dependency=attoparsec=attoparsec-0.13.2.2-4OZxs7pjlk4KaC70yK831H --dependency=base=base-4.10.1.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=containers=containers-0.5.10.2 --dependency=exceptions=exceptions-0.8.3-CYMTujxEbkkJnOJ7pW82ZD --dependency=llvm-hs-pure=llvm-hs-pure-5.1.2-DfeAcfdakR5AmUSpKHmZqE --dependency=mtl=mtl-2.2.2-8XubxMJDT8QLsstvlNotkc --dependency=template-haskell=template-haskell-2.12.0.0 --dependency=transformers=transformers-0.5.2.0 --dependency=utf8-string=utf8-string-1.0.1.1-7sQ7eR5H5ED7poickls5aO
Process exited with code: ExitFailure 1
Logs have been written to: /Users/seanj/tt/git-archives/sam46/Paskell/.stack-work/logs/llvm-hs-5.1.3.log
[1 of 2] Compiling Main ( /private/var/folders/dg/dcnc7sqd7_5fmy5ctdmngzch0000gp/T/stack28299/llvm-hs-5.1.3/Setup.hs, /private/var/folders/dg/dcnc7sqd7_5fmy5ctdmngzch0000gp/T/stack28299/llvm-hs-5.1.3/.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/setup/Main.o )
[2 of 2] Compiling StackSetupShim ( /Users/seanj/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /private/var/folders/dg/dcnc7sqd7_5fmy5ctdmngzch0000gp/T/stack28299/llvm-hs-5.1.3/.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/setup/StackSetupShim.o )
Linking /private/var/folders/dg/dcnc7sqd7_5fmy5ctdmngzch0000gp/T/stack28299/llvm-hs-5.1.3/.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/setup/setup ...
setup: The program 'llvm-config' version ==5.0.* is required but the version
found at /usr/local/opt/llvm/bin/llvm-config is version 9.0.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.