minoki / LunarML

The Standard ML compiler that produces Lua/JavaScript
MIT License
356 stars 10 forks source link

Add wsl support #1

Closed FrankRuben closed 3 years ago

FrankRuben commented 3 years ago

Hi,

first of all thanks for working on LunarML - ML and Lua will be a great combination!

When trying to get LunarML running on WSL (with Ubuntu 20.04) I encountered two issues:

  1. Building the executable didn't work ("Undefined variable USyntax.VIdSet.disjoint"), which was caused by an outdated version of MLton being available via apt on Ubuntu 20.04. Installing an up-to-date binary (MLton 20130715) did help. I added that bit of information to the Readme file.
  2. Running tests showed errors, caused by different line endings for Unix and Windows when working with WSL. I added the Lua function split_join_lines() to test/run.lua to unify line endings to \n and that worked.

Hope the changes are OK for you.

Thanks again, Frank

minoki commented 3 years ago

Thank you for contribution!

As for the error on an older MLton, I'll modify my code to avoid use of disjoint and toList on sets.