feat: Type-dependent Haskell code generation
Some checks failed
continuous-integration/drone/push Build is failing

Caveat: type is still not being assigned for the Sequence()
  constructor.

  Also fixes the parsing of literal strings (whitespace just after
  the opening quote was being ignored, and was ambiguous just
  before the opening quote).
This commit is contained in:
Glen Whitney 2021-02-16 09:46:12 -08:00
parent 5cd75b8177
commit 804a00902a
6 changed files with 62 additions and 33 deletions

View file

@ -1,15 +1,15 @@
module basic
language fostr
test hw1_type [[
[[stream]] << [['Hello, world!']]
[[stream]] << [['Hello, world! ']] << [[3+2]] << ' times.'
]]
run get-type on #1 to STREAM()
run get-type on #2 to STRING()
run get-type on #3 to INT()
run get-type to STREAM()
/** writes
Hello, world!**/
Hello, world! 5 times.**/
/** md
Title: A whirlwind tour of fostr