Added list comprehensions and standard List, Option, Func, Pair, and Triple library (#105)
* Added standard List library and list comprehensions Added List library. Flatmaps WIP Fixed dependency in flat_map fcode generation Updated tests to use custom list lib Added comprehension test Added stdlib sanity Test * Extended stdlib for lists. Added error message for redefinition of stdlibx * Fixed type template * Improved stdlib * More functions * Fixed cyclic includes * Refixed imports and added few tests * Added fail test * Undelete removed type spec * Remove typo * Fix iter function * Fixed typo * Added if guards and let statements in list comp * Added more fail tests * Option stliv * 2 and 3 tuple stdlib * Updated stdlib to new syntax. Added recursor and changed all/any functions * Fixed performance issues. Changed include management * Fixed hash type
This commit is contained in:
committed by
Hans Svensson
parent
69ad8ce9bc
commit
b669d2df1e
@@ -92,6 +92,7 @@
|
||||
| {proj, ann(), expr(), id()}
|
||||
| {tuple, ann(), [expr()]}
|
||||
| {list, ann(), [expr()]}
|
||||
| {list_comp, ann(), expr(), [comprehension_exp()]}
|
||||
| {typed, ann(), expr(), type()}
|
||||
| {record, ann(), [field(expr())]}
|
||||
| {record, ann(), expr(), [field(expr())]} %% record update
|
||||
@@ -104,6 +105,10 @@
|
||||
| id() | qid() | con() | qcon()
|
||||
| constant().
|
||||
|
||||
-type comprehension_exp() :: [{ comprehension_bind, ann(), id(), expr()}
|
||||
| {comprehension_if, expr()}
|
||||
| letbind()].
|
||||
|
||||
-type arg_expr() :: expr() | {named_arg, ann(), id(), expr()}.
|
||||
|
||||
%% When lvalue is a projection this is sugar for accessing fields in nested
|
||||
|
||||
Reference in New Issue
Block a user