Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

carp: Can't emit symbol of generic type: e : a at line 4, column 3 in #1347

Closed
rgkirch opened this issue Oct 23, 2021 · 2 comments · Fixed by #1373
Closed

carp: Can't emit symbol of generic type: e : a at line 4, column 3 in #1347

rgkirch opened this issue Oct 23, 2021 · 2 comments · Fixed by #1373
Labels

Comments

@rgkirch
Copy link
Contributor

rgkirch commented Oct 23, 2021

(Project.config "echo-c" true)

(defn identity [e]
  e)

(defn main []
  (ignore (identity 1)))
$ carp no.carp -x
carp: Can't emit symbol of generic type: e : a at line 4, column 3 in 'C:/Users/richie/Documents/org/projects/handmade-carp/no.carp'
CallStack (from HasCallStack):
  error, called at src\Emit.hs:210:15 in CarpHask-0.5.3.0-ApN9rIbXYwcLYnQzPVPog2:Emit

The below code is fine.

(defn identity [e]
  e)

(defn main []
  (ignore (identity 1)))
@rgkirch
Copy link
Contributor Author

rgkirch commented Dec 30, 2021

unchanged in 0.5.4

$ no.carp -x
carp: Can't emit symbol of generic type: e : a at line 4, column 3 in 'C:/Users/richie/Documents/org/projects/handmade-carp/no.carp'
CallStack (from HasCallStack):
  error, called at src\Emit.hs:210:15 in CarpHask-0.5.4.0-87JIpmrraTG7CSL8jDUlEk:Emit

@scolsen scolsen added the bug label Dec 30, 2021
@scolsen
Copy link
Contributor

scolsen commented Dec 30, 2021

e will always be generic until the function is actually used since the function is polymorphic. I'm not sure of the best way to update the echo-c option to handle this yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants