You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.
Support Arrow args for ADTs ( data A = A (Num -> Num) )
Record deconstruction ( Patterns )
Record spread operator
String literals character, replace double quotes with single quotes or back ticks ( preference seems to be for back ticks )
Rename switch / case ( where / is ? )
Wrap up compilation of patterns and check ADT types correctly in generated JS code ( using __buildCtorParam )
Define and implement a first CLI : WIP
Add operators && and ||, >, >=, <, =<, !
Add missing operator: - ( unary ), ...
Verify and complete places where returns are allowed within expressions
Tuples solving/compiling
Tuple pattern matching
Tuple typing
Update comments and use // instead of —
Make curlies optional ( where, if, more ? )
Add ternary expression grammar
type aliases
bundle compiler option that generates a single js output for browsers : WIP with rollup for now
Prelude basics
ADTs should also be exportable and importable ( Also that should go hand in hand with the point below on checking ADT usages )
Code:
__buildCtorParam should be put in a separate .mjs file that is imported where needed and not directly embedded in the generated js.
Rework InferError and either split errors ( Infer, Import, xyz ), or keep them unified but then rename them from InferError to simple Error ?
We need to add some checks on ADT definitions and usage ( Mostly that names being used actually exist ( usage ), or that they don't ( definition ) )
Improve tests and test a lot more scenarios
Consider removing Records for Exp as we never have more than 2 or 3 args anyways
Move pos and type information outside of Exp, so that Exp is cleaner and only concerned about the grammar
Create a Typed and/or Located type that contains type or location information
Update grammar so that a Typing, can be defined in two ways:
// Must come right before the function definition, and we just make it a TypedExp Assignment (=) Abstraction x (x+1)inc :: Num->Numinc=(x)=>x+1
// Directly attached to an expression and we make it a TypedExp App (App (+) (1)) 44+1 :: Num
That way we can more easily connect the type annotation to the wrong function in case of mismatches and report more precise errors, and it would also make the AST clearer as for now in the case of functions we just assign the TypedExp to a var to be looked up in the env. We could then potentially also remove that entry in the Env ( envtypings :: Typings ).
Production for TypedExp for abstractions is too confusing and won't work well the way it's done. So we need to split the type and the abstraction to make the grammar simpler, and make it a NamedTypedExp ( that assigns to a name instead of an Exp ), and make the match during desugaring step ( AST.Source -> AST.Canonical )
CI:
Run tests before publishing a release !
Legal:
Pick and add licence info
The text was updated successfully, but these errors were encountered:
Yeah, also some will probably never be done like returns in expressions. I think that's more an organic thing that will evolve. So we should select the bullets that have a known scope, and put them in their own issue and close this one then ?
Features:
data A = A (Num -> Num)
)switch
/case
(where
/is
? )__buildCtorParam
)&&
and||
,>
,>=
,<
,=<
,!
-
( unary ), ...//
instead of—
Code:
__buildCtorParam
should be put in a separate.mjs
file that is imported where needed and not directly embedded in the generated js.envtypings :: Typings
).NamedTypedExp
( that assigns to a name instead of an Exp ), and make the match during desugaring step ( AST.Source -> AST.Canonical )CI:
Legal:
The text was updated successfully, but these errors were encountered: