carp-lang / Carp

A statically typed lisp, without a GC, for real-time applications.
Apache License 2.0
5.52k stars 173 forks source link

Repl crashes on type of Map #1457

Open Gavinok opened 1 year ago

Gavinok commented 1 year ago

Steps to reproduce

> :t { @"test" 1}
carp: Too many variables with the same name in set: [(ProperDel String.delete  "_0"),(RefDel "_0")]
CallStack (from HasCallStack):
  error, called at src/Memory.hs:513:24 in CarpHask-0.5.5.0-26qeejnxq0n51adeaHleRy:Memory

Process inf-carp exited abnormally with code 1

Seems to only happen with copys. I haven't looked to deep but :t { 1 @&1} also seems to cause a similar error

> :t { 1 @&1}
carp: Too many variables with the same name in set: [(ProperDel Pair.delete__int_int  "_0"),(PrimDel "_0")]
CallStack (from HasCallStack):
  error, called at src/Memory.hs:513:24 in CarpHask-0.5.5.0-26qeejnxq0n51adeaHleRy:Memory