This is a macro expansion system that uses lbuilder3.macro to do the replacements.
a $ b $ 1 + 1
turns into
(a (b 1 + 1))
You can use ?
instead of !
to call functions.
Uses ltypekit6
x === string
turns into
((typeof x) == "string")
import * from require "msmx" as msmx
turns into
msmx = require "msmx"
import a, b in msmx
turns into
import a, b from require "msmx"
Brings std/<library>
into the local scope, where <library>
is any of:
wrap
->cowrap
yield
create
->Coroutine
resume
status
->costatus
running
->corunning
isyieldable
->isYieldable
gethook
getinfo
getlocal
getmetatable
->_getmetatable
getregistry
getupvalue
getuservalue
sethook
setlocal
setmetatable
->_setmetatable
setupvalue
setuservalue
traceback
upvalueid
upvaluejoin
close
->closeIO
flush
->flushIO
input
->inputIO
lines
->linesIO
open
->openIO
output
->outputIO
popen
->popenIO
read
->readIO
tmpfile
->tempfileIO
type
->typeIO
write
->writeIO
All values are the same
clock
date
difftime
execute
exit
getenv
remove
->fremove
rename
->frename
setlocale
time
tmpname
->tempname
config
->pkgConfig
cpath
path
loaded
->pkgLoaded
loadlib
->pkgLoad
preload
->pkgPreload
searchers
->pkgSearchers
searchpath
->pkgSearchpath
byte
char
dump
find
format
gmatch
gsub
len
lower
match
pack
->packString
packsize
rep
reverse
sub
unpack
->unpackString
upper
All values are the same
All values prefixed with utf8
import msmx
turns into
msmx = require "msmx"
import xmsmx as msmx
turns into
msmx = require "xmsmx"
a `fn` b
a <fn> b
turns into
fn a, b
fn a, b
<$>
->__apply
<.>
->__compose
<$!>
->__apply_excl
<|>
->__alternative
a <=< "file"
turns into
a = assert io.open "file", "r"
not= a
turns into
a = not a
a ?= b
turns into
a = (a == nil) and b or a
Uses ltypekit6
f = ::> string -> string
turns into
f = sign "string -> string"
Activates language features.
Syntax: {-# KEYWORD Argument #-}
Uses ltypekit6
import typeof from require "ltypekit.type"
typeof = nil
Uses ltypekit6.1
import typeE, data, metatype from require "ltypekit.type"
typeE, data, metatype = nil, nil, nil
Uses ltypekit6
import sign from require "ltypekit"
sign = nil
getmetatable''.__index = (str, i) -> string.sub str, i, i
getmetatable''.__call = string.sub
Uses ltypekit6 Requires LANGUAGE Signatures pragma
f :: string -> string
turns into
f = sign "string -> string"
fncall x where
return y
turns into
fncall x, (...) ->
return y
data Char which
name: "Char"
turns into
data Char,
name: "Char"