xywei / uforth

A forth interpreter on Urbit.
MIT License
0 stars 0 forks source link

Type error with ?= #1

Open xywei opened 1 year ago

xywei commented 1 year ago

It is strange that this line cannot pass type checking: https://github.com/xywei/uforth/blob/d40e6e2f837033326aed9b038bbeb8f2bd950a99/uforth/lib/uforth.hoon#L52C5-L52C5

Error message:

> |commit %uforth
>=
gall: reloading %uforth
: /~zod/uforth/34/lib/uforth/hoon
gall: bumped %uforth
> |commit %uforth
>=
crud: %into event failed
[%poke %into]
bar-stack=[i=[i=//sync/0v1a.p824p t=~] t=~]
call: failed
[from=34 deletes={} changes={[i=~.lib t=/uforth/hoon]}]
[%error-building /app/uforth/hoon]
[%error-building /lib/uforth/hoon]
/lib/uforth/hoon::[2 1].[130 3]>
/lib/uforth/hoon::[43 3].[53 46]>
/lib/uforth/hoon::[44 3].[53 46]>
/lib/uforth/hoon::[45 3].[53 46]>
/lib/uforth/hoon::[46 3].[53 46]>
/lib/uforth/hoon::[47 3].[53 46]>
/lib/uforth/hoon::[48 3].[53 46]>
/lib/uforth/hoon::[49 3].[53 46]>
/lib/uforth/hoon::[51 3].[53 46]>
/lib/uforth/hoon::[52 3].[52 46]>
/lib/uforth/hoon::[52 4].[52 25]>
mull-grow
mull-nice
-need.?(%~ [i=[%op %wol] t=it([%op %wol])])
-have.[?(@rs @tas [%op %add] [%op %clear] [%op %div] [%op %drop] [%op %dup] [%op %mod] [%op %mul] [%op %sho] [%op %sub] [%op %swap] [%op %wol] [%op %wor]) it([%op %wol])]
nest-fail
xywei commented 1 year ago

For referece, the code in question is ?=([%op %wol] token). Does ?= even has a right to complain about types? 😄