Skip to content

Commit

Permalink
Problem: let has different behaviour from inline signatures
Browse files Browse the repository at this point in the history
Solution:

 - We simply demonstrate this clearly a couple of times. Once in commented out code on line 33 in FuncDep.lean and once in this patch, on line 55 in Main.lean.
  • Loading branch information
cognivore committed Jul 7, 2022
1 parent 64f604e commit 55c9a46
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Main.lean
Expand Up @@ -47,7 +47,13 @@ def main : IO Unit := do
IO.println s!"{nₓ}"
let n₂ : Nat := FuncDep.CountParts_.φ "Tarmogoyf" 'o'
IO.println s!"{n₂}"
let n₃ : Nat := FuncDep.CountParts.φ "Tarmogoyf" 'o'
let n₂' := (FuncDep.CountParts_.φ "Tarmogoyf" 'o' : Nat)
/-
failed to synthesize instance
ToString (FuncDep.CountParts_.α String)
-/
-- IO.println s!"{n₂'}"

This comment has been minimized.

Copy link
@cognivore

cognivore Jul 7, 2022

Owner

Arthur believes this should typecheck, I don't have an opinion, but this is the first thing I tried before trying typed let binding.

let n₃ : Nat := FuncDep.CountParts.φ "Magnivore" 'o'
IO.println s!"{n₃}"
let n₄ := countNonsense "Paradox Engine"
IO.println s!"{n₄}"

0 comments on commit 55c9a46

Please sign in to comment.