Coma is a language for manipulating data in the CSV files.
coma/
--> app/
--> src/
--> test/
--> package.yaml
--> problems/
--> syntax/
These are the most important locations you must know.
app/contains theMain.hsfile and (potentially in the future) some more files related to the main executable logic.src/contains all of the libraries and modules we create to empower Coma by abstracting away the details -- as all programmers do...test/contains all of the test code and the mainSpec.hsfile that serves as the main registry of all functions we will be testing.package.yamlis the Stack manifest file where we specify all the dependencies we need (instead of a Cabal file -- do not edit it!).problems/contains solutions to problems with the Coma programming language.syntax/contains BNF syntax declaration, Alex and Happy files.
stack testResult should look something like this (taken from one of the first test runs):
coma> test (suite: coma-test)
CSV
Parse
normal CSV: OK
CSV with missing items: OK
All 2 tests passed (0.00s)
coma> Test suite coma-test passed
You can execute the program, without building it first, as follows:
stack exec csvql [ARGUMENTS]For example, you can try this:
stack exec csvql problems/p1.cqlNow, you can also start a REPL with
stack exec csvql replExit the REPL session with either CTRL+C or CTRL+D (although the second
might not work on Windows).
alex syntax/Lexer.x -o src/Lexer.hs
happy syntax/Parser.y -o src/Ast.hs
stack installbash install.shzsh install.sh