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

rename #2

Closed
fryguybob opened this issue May 8, 2015 · 2 comments
Closed

rename #2

fryguybob opened this issue May 8, 2015 · 2 comments

Comments

@fryguybob
Copy link

I was browsing the code and came across this line in ABT.rename:

Var v -> if v == old then var new else var old

Shouldn't the else case be var v?

@pchiusano
Copy link
Member

Wow, yes. Perhaps some tests would be a good idea. :)

pchiusano added a commit that referenced this issue May 8, 2015
@pchiusano
Copy link
Member

Btw, @fryguybob congrats on making the first official bug report for this project! :) There might be a few other bugs with the new ABT-based representation of terms/types, as that was just switched over in the last couple weeks and I have not banged on it much. If you or anyone else is interested, writing some tests for the typechecker might be a fun (depending on your definition) way to get your feet wet with the codebase. :)

aryairani added a commit that referenced this issue Feb 21, 2019
master>
let
  Ref ##Sequence.at 0 [1, 2, 3]
  Pair _0 ()
typeDeps
fromList [#"2tWj,#"3RmF]
stack: []
ir: Let (Let (MakeSequence [1,2,3]) (Apply (Leaf (Lam 1 FormClosure Ref(##Sequence.at) (Leaf External:ExternalFunction))) [0,#0])) (Let (Leaf (Lam 2 FormClosure #"2tWj#0 (Construct #"2tWj 0 [#1,#0]))) (Let (Construct #"3RmF 0 []) (Apply (Leaf #1) [#2,#0])))

stack: []
ir: Let (MakeSequence [1,2,3]) (Apply (Leaf (Lam 1 FormClosure Ref(##Sequence.at) (Leaf External:ExternalFunction))) [0,#0])

stack: []
ir: MakeSequence [1,2,3]

stack: [[1, 2, 3]]
ir: Apply (Leaf (Lam 1 FormClosure Ref(##Sequence.at) (Leaf External:ExternalFunction))) [0,#0]

stack: [[1, 2, 3]]
ir: Leaf (Lam 1 FormClosure Ref(##Sequence.at) (Leaf External:ExternalFunction))

stack: [[1, 2, 3],0]
ir: Leaf External:ExternalFunction

unison: user error (type error)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants