question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The B in the params and the B in the pattern are not the same B

See original GitHub issue

Commit: ccaa7a0

open data Unit : Type | unit

open struct Wrapped (A : Type) : Type

def test {B : Type} Unit : Wrapped B -> Unit
  | unit => \(x : Wrapped B) => unit

All these changes would fix the error:

def test {B : Type} Unit : Wrapped B -> Unit
  | {B}, unit => \(x : Wrapped B) => unit

def test {B : Type} Unit : Wrapped B -> Unit
  | unit => \x => unit

def test {B : Type} Unit : Wrapped B -> Unit
  => \(x : Wrapped B) => unit

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
refparocommented, Mar 24, 2022

Oh, I understand now.

Yes, I mean to do the replacement in the whole function body. If we were to disallow generalized variables used in bodies, we would have to look through the body for any used generalized variables to provide better error reporting anyway (I think).

1reaction
ice1000commented, Mar 23, 2022

I know how to fix this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pattern (Java Platform SE 7 ) - Oracle Help Center
The string literal "\b", for example, matches a single backspace character when interpreted as a regular expression, while "\\b" matches a word boundary....
Read more >
Extended pattern matching — Coq 8.16.1 documentation
When several patterns share the same right-hand side which do not depend on the arguments of the patterns, yet an extra factorization is...
Read more >
CHAPTER 7 - ESTIMATION OF PARAMETERS - FAO
In the least squares method the estimators are the values of A and B which minimize the object function. Thus, one has to...
Read more >
Pattern Matching - The Scala Programming Language
The same variable name may not be bound more than once in a pattern. ... of a method enclosing the pattern. Let the...
Read more >
Destructuring assignment - JavaScript - MDN Web Docs
{ a, b } = { a: 1, b: 2 } is not valid stand-alone syntax, as the {a, b} on the left-hand...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found