The B in the params and the B in the pattern are not the same B
See original GitHub issueCommit: 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:
- Created a year ago
- Comments:15 (15 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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).
I know how to fix this.