Commit Graph

39 Commits

Author SHA1 Message Date
Mark
ab55ce9bf1 make object fields trait public 2024-10-11 21:26:27 +02:00
Mark
6c43c604b8 improve ints in .try 2024-10-02 02:36:15 +02:00
Mark
754dd5df40 the math does math... at compile time, in types 2024-10-02 01:46:50 +02:00
Mark
c17ea580b2 make objects work better, especially destructuring 2024-09-28 01:51:20 +02:00
Mark
9c8e918440 fix doc comment on is_included_in 2024-09-18 17:18:38 +02:00
Mark
062f100d40 show custom type names in error messages 2024-08-31 13:14:12 +02:00
Mark
385019e43c replace Bool type with Bool=True/False + bugfix
Bool is a type alias for True/False

Bugfix:

[[T] String]
{
  [[T] Int]
  // this would use the outer T (String),
  // but now it correctly uses the inner T (Int).
  [T] 1
}
2024-08-29 15:04:32 +02:00
Mark
08a82733e9 convert more stdlib functions and add rounding
converted with_base and with_math
2024-07-03 11:59:22 +02:00
Mark
50928cca1d [no version bump yet] better and safer stdlib impl
only transformed configs/with_string so far,
but other configs/* should follow soon.
also, this will help with implementing
new stdlib functions in the future.
2024-07-02 22:04:42 +02:00
Mark
18cd3ee0ae functions no longer modify state, funcrefs exist
you can use &func as a function, too.
this allows the function to mutate its
inner state.
2024-07-01 20:51:09 +02:00
Mark
688e28c171 nicer errors 2024-06-21 15:50:41 +02:00
Mark
cd21c2171e improve panic function, add stacktrace 2024-06-19 12:35:23 +02:00
Mark
945e19e10a fix list cloning not cloning inner values
this would allow mutating values
through a list passed by value,
but now it doesn't, which is
how it always should have been.
2024-04-30 13:58:40 +02:00
Mark
a377c6e89a temporary bugfix/patch 2024-04-16 14:27:02 +02:00
Mark
2742112b09 Type no longer implements MersType 2024-04-16 13:38:50 +02:00
Mark
a960dfde6c add Byte type 2024-04-15 16:43:45 +02:00
Mark
45a46f32a5 add Byte to replace Int when appropriate 2024-04-15 14:07:05 +02:00
Mark
8690263b1c V7: Make .try a language feature, this makes try_allow_unused unnecessary. remove try and try_... functions. 2024-03-22 15:38:09 +01:00
Mark
86b6a46d09 add Type::add_all() 2024-03-03 12:55:55 +01:00
Mark
dc2db1d0e8 make list.get_mut return a 1-tuple on success, and fix reference type being incomplete 2024-02-22 19:41:03 +01:00
Mark
cc4a4366c9 mers_lib to 0.5.0, readme updated 2024-02-17 14:06:19 +01:00
Mark
6d6853cc9f add function type annotation (Input1 -> Output1, Input2 -> Output2) 2024-02-15 10:55:13 +01:00
Mark
b85183d081 remove COW::Get debug print from debug builds 2024-02-15 09:21:31 +01:00
Mark
0759b769e0 early prototype of a language server
currently only provides hover info (but that's already quite useful for debugging)
2023-12-05 23:04:17 +01:00
Mark
48c1381194 Object field order matters! 2023-11-30 17:48:24 +01:00
Mark
3d1ce384d0 add objects and object types 2023-11-30 15:44:51 +01:00
Mark
782460e472 add get_mut function for lists 2023-11-29 16:26:51 +01:00
Mark
4144d6cf71 Type Annotations
- Add type annotations: [type] statement
- Add type definitions: [[name] type], [[name] := statement]
- Add type annotations example (08)
- add Quickstart.md, reference it from README
2023-11-21 22:10:58 +01:00
Mark
12925fed67 improved error messages
- some small bugs are now fixed
- include comments in error messages (if this causes issues, use --hide-comments)
- colors should make more sense now
- error-related things moved to mers_lib/src/errors/
2023-11-16 14:50:09 +01:00
Mark
8bdd6e00e8 Add lock_update function for safer multithreading
&v = (v, 1).sum might fail if two threads do it at the same time or something, so you can now lock the reference to ensure no other thread messes with your data while you update its value
2023-11-10 13:18:34 +01:00
Mark
db59a1e92e remove diff, add subtract to replace it and work with iters, add lt, gt, ltoe, gtoe for < > <= >= 2023-11-07 18:37:37 +01:00
Mark
a30ba84691 more iter functions 2023-10-27 19:19:29 +02:00
Mark
cb52c961a2 fix todo!()s in with_iters 2023-10-27 17:09:48 +02:00
Mark
36e0f69d0c improve function type display 2023-10-27 14:56:01 +02:00
Mark
5e20f92849 Added the concept of subtypes ...
... which `try` now uses to avoid some problems with inner types
2023-10-24 09:31:49 +02:00
Mark
b39a768099 . 2023-10-19 18:46:15 +02:00
Mark
ae0e163595 assigning to tuples should work properly now 2023-08-15 19:18:52 +02:00
Mark
2a7cb08596 mers rewrite is starting to be usable 2023-08-14 17:17:08 +02:00
Mark
b81dac682e full rewrite, kinda works 2023-07-28 00:33:15 +02:00