MLPolyR
MLPolyR copied to clipboard
Porting to PolyML
See https://github.com/owo-lang/MLPolyR/commit/36d8c331659665c02c426e7968800ba80a42e811
Most part of smlnj-lib can run on polyml after minor patches, porting to poly has following benefits:
- standalone executable #2
- 64 bit support
- clean up code
- better debugger
-
I can compile poly on my Mac but it does not apply to smlnj
How can I build MLPolyR with PolyML ATM?
it is not ready yet, I'm checking the non standard derivations in source and once all the files are listed in https://github.com/owo-lang/MLPolyR/blob/polyml/load.sml it should be ready to build and I'll update Makefile
Now you can run make check
which only use compiler to check programs and produce no executable.
LdBeth good good
Now both ml-lex
ml-yacc
are ported to polyml and can be compiled to stand alone complex and can be used to generate grammar. https://github.com/owo-lang/MLPolyR/commit/e601f7f86bae94501c2396687b02e3885191fcdc
Shall we create new repo and submodule them?
Can't we just provide several Makefile
s that uses different toolchains?
That’s tedious. I’d use autotools or something. Building systems aren’t compatible across sml implementations, and some enforce special source code layout, ie file and directory name must match module layout, can not get it work out of box.
Oh my god. How about keep several branches?
How can I build a compiler exe? Currently check
only prints 13..
syntax tree representation uses SML/NJ compiler components, I haven’t figured if there’s proper replacement yet
Can we add SML/NJ compiler itself as a dependency?
If so, we can completely remove SML/NJ backend and use PolyML only. Thus no branches needed.
Edit: s/MLton/PolyML/rg
Ok, I'll drop support for SML/NJ and rewrite using similar but simpler components from Tiger
https://github.com/owo-lang/MLPolyR/commit/8b63bee55a5b1a27f0547a255dccdd4cecf2c7d1
Now make check
would produce an executable check
and it can be used to syntax check & type check MLPolyR programs. Exit with 0
means it is ok otherwise means not ok. Notice that sometimes it says nothing when failed. To get the exit status of last command, in bash
or ksh
you can type
echo $?
for last command exit status.


I'm still working on figure out how to properly report parse/type errors since the original error report facility heavily relies on SML/NJ's compiler component and at current Poly/ML port these facilities are basically placeholders.
tql
such a breakthru