Carp icon indicating copy to clipboard operation
Carp copied to clipboard

`c` command is broken on a variety of inputs

Open scolsen opened this issue 3 years ago • 1 comments

some examples:

鲤 (register foo Int)
鲤 (c foo)
I didn’t understand the form `external` at no info.

Is it valid? at REPL:4:15.

Traceback:
  (c foo) at REPL:5:1.
 at REPL:4:15.

Traceback:
  (c foo) at REPL:5:1.
鲤 (deftype Foo [])
鲤 (c Foo)
carp: Symbol missing info: XObj {xobjObj = Sym Foo.init (LookupGlobal CarpLand AFunction), xobjInfo = Nothing, xobjTy = Just (Fn [] Foo)}
CallStack (from HasCallStack):
  error, called at src/Emit.hs:227:53 in CarpHask-0.5.3.0-CGthP5oJU3yJPpqrHNinP3:Emit
鲤 (deftype Foo)
鲤 (c Foo)
I couldn’t find the symbol 'Foo.init' at no info.

Maybe you forgot to define it?

Traceback:
  (c Foo) at REPL:2:1.


Traceback:
  (c Foo) at REPL:2:1.

scolsen avatar Mar 15 '22 16:03 scolsen

Note that it also emits incorrect C for stuff defined in modules (the prefix isn't present)

scolsen avatar Mar 15 '22 17:03 scolsen