glaebhoerl / simplecompiler Goto Github PK
View Code? Open in Web Editor NEWused to be something more ambitious, cut scope to just a simple compiler for thesis project
License: MIT License
used to be something more ambitious, cut scope to just a simple compiler for thesis project
License: MIT License
compile
/optimize
function (intrinsic?) to the compiled app
Int
,UInt
}{8
,16
,32
,64
}Float
{32
,64
}switch
Never
(uninhabited type)inout
parametersforeach
function!()
)Int
, UInt
, Float
[type]
kind)unsafe
/ trusted
Token
AST
Name.Error
Type.Error
<?>
or whatever in AST
parserText
in metadata?instance Render Token.Error
instance Render AST..Error
instance Render Name.Error
instance Render Type.Error
AST
IR
?Type
IR
should validate Function
sPretty
instance Render IR.Function
types
Expression
s (or other nodes) instead of just name
s in some places for finer-grained location metadataMain
-
parsing ambiguity (unary vs. binary vs. literal)Tardis
-related laziness hacks in IR
AST
(and fix for &&
, ||
)?LLVM
to avoid UB on overflow/div-by-zero/etc.function isBuzz(number: Int) returns isBuzz
validation errorName
doesn't record metadata/location for function arguments/returns (and maybe others)break
say()
and write()
? ask()
for strings?Unit
in ASTcontinue
StrictData
?Name
, get rid of NameWith
?Name.validate
unused
instead of _ <-
modifyM
variants directly returning the modified state, where appropriatetext-path-utf8
?safe-exceptions
?Token
DeriveAny
again?DerivingVia
? or QuantifiedConstraints
?BlockArguments
!!Loc
type?Main
be a Doc
rather than Text
?Render
to customize how lists of the type are rendered, get rid of the flexible list instances?
instance Render a => Render (Maybe a)
?where
always trailing->
/=
...?MonadMetadata
or something?Monoid metadata
?LLVM.FirstState
and SecondState
, with just the instance
s differing?DisambiguateRecordFields
?StateT
-> ReaderT
IRBuilder
?break
s, break
s returning valuestwo types: Int, Bool
arithmetic and comparison operators
if
,while
;forever
/break
?
let
,var
read()
,write()
mutation (assignment)
no functions yet
Example program:
var n = 0 forever { write(n) let m = read() if m == 0 { return } n = n + m }
hoopl
?)-fdefer-type-errors
Vector Statement
rather than [Statement]
?generic-lens
OverloadedLabels
mtl
tardis
atomically
)A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.