leostera / caramel

:candy: a functional language for building type-safe, scalable, and maintainable applications
https://caramel.run
Apache License 2.0
1.05k stars 25 forks source link

More of Core working; Introduce Math module #64

Closed michallepicki closed 3 years ago

michallepicki commented 3 years ago

I can now see that floor is already present in the Erlang module. I could remove this reference from Core then, I think, and move the related ceil and abs out of the Core to there as well?

And I'm not sure if those should stay in Core as well:

mod
float
float_of_int
truncate
int_of_float

Maybe just keep float_of_int and int_of_float and move the rest to Erlang?

edit: not sure if mod could be moved easily, I think since it needs this special handling because it's a keyword it may have to stay in Core for now. float and truncate are duplicates, I think float_of_int and int_of_float are used more often, right?

edit2: I just went ahead and made those changes ^

michallepicki commented 3 years ago

@ostera I think I am done for now, I added a few more operators to make them working but if you want I could remove them altogether (I can't move them to the Erlang module because they are operators so need special handling)