Stream: beginners

Topic: some problem with inserting Dec in Dict


view this post on Zulip Artur Swiderski (Apr 16 2023 at 16:51):

when Num.toDec(some_string) is
Ok val -> Dict.insert some_dict ( Dec val ) # this is crashing I need to use normal float instead

-> after some investigation I am not sure what is exact problem, but definitely I am getting crashes
-> ok I messed up types of variables, and pattern matching as well, when I make it right it works.
-> it seems like Num.floor does not work properly with Dec type

view this post on Zulip Brendan Hansknecht (Apr 17 2023 at 00:22):

Can you file an issue for Num.floor on Dec. I would guess it is a bug.

view this post on Zulip Artur Swiderski (Apr 17 2023 at 21:55):

unfortunately I refactored code already, usually when I touch problem I overcome it by tweaking the code which is a shame. Maybe I will start to store my findings in separate directory and later when I have some time I will upload them


Last updated: Jul 06 2025 at 12:14 UTC