Tycker tries to solve implicit argument in Pi types even when not needed
See original GitHub issueCommit: 1707136
open data Unit : Set | unit
def foo : Pi {x : Unit} -> Unit => \{x} => x
def foo' : Pi {x : Unit} -> Unit => foo
Update:
@re-xyr The real use case is much more complex and the return type does depend on the implicit argument:
-- *** Prelude
prim I
prim left
prim right
prim arcoe
struct Path (A : I -> Type) (a : A left) (b : A right) : ooType
| at (i : I) : A i {
| left => a
| right => b
}
def path {A : I -> Type} (p : Pi (i : I) -> A i)
=> new Path A (p left) (p right) { | at i => p i }
def `=` Eq {A : Type} (a b : A) : ooType => Path (\ i => A) a b
def idp {A : Type} (a : A) : a = a => path (\ i => a)
def coe {a b : Type} (eq : a = b) (x : a) (i : I) : eq.at i
=> arcoe eq.at x i
bind = looser application
open data Unit : Set 0 | unit
-- *** Types
struct EventT : Set 1
| agentT : Set 0
def getAgentT (t : EventT) : Set 0 => t.agentT
def setAgentT (x : Set 0) (t : EventT) : EventT
=> new EventT { | agentT => x }
def agentT-inv (t : EventT) (u : Set 0) : u = getAgentT (setAgentT u t)
=> idp u
struct Event (t : EventT) : Set 2
| agent : t.agentT
def getAgent (t : EventT) (e : Event t) : t.agentT => e.agent
def Theta (setT : Set 0 -> EventT -> EventT) : ooType 4
=> Pi {u : Set 0} {t : EventT}
-> ((u -> ooType 3) -> ooType 3)
-> ((Event (setT u t) -> ooType 3) -> ooType 3)
-> (Event (setT u t) -> ooType 3) -> ooType 3
def mkTheta
(getT : EventT -> Set 0)
(get : Pi (t : EventT) -> Event t -> getT t)
(setT : Set 0 -> EventT -> EventT)
(invariant : Pi (t : EventT) (u : Set 0) -> u = getT (setT u t))
: Theta setT
=> \{u} {t} => \q p => \f =>
q (\x => p (\e =>
Sig (get (setT u t) e = coe (invariant t u) x right) ** (f e)))
def agent : Theta setAgentT
=> mkTheta getAgentT getAgent setAgentT agentT-inv
I had to change agent
into \{u} {t} => mkTheta getAgentT getAgent setAgentT agentT-inv {u} {t}
to make it type check.
I simplified it too much, sorry.
Issue Analytics
- State:
- Created 2 years ago
- Comments:21 (21 by maintainers)
Top Results From Across the Web
[PDF] Conditions on Argument Drop - ResearchGate
PDF | This article pursues the idea that null arguments are derived without any statement or parameter, instead following naturally from 3rd factor....
Read more >grommunio Administrator Documentation
Create the corresponding DNS records with a sane configuration (A, MX, TXT and CNAME records). • Configure the grommunio appliance by running ...
Read more >Quasi-definites in Swedish: Elative superlatives and emphatic ...
We argue that the article and the suffix do not encode different aspects of definiteness, as Julien (2005) proposes; rather, both are markers...
Read more >Untitled
El clasico barca real, Jogador mais feio do mundo, Notaris van hoestenberghe ... with methods of evaluating arguments for, Images not loading on...
Read more >ED112893.pdf - ERIC - Department of Education
ABSTRACT. To test some aspects of Skinnerian programed instruction, a 241-frate program on Swedish grammar was presented to students 10 to 12 years...
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
I’ve managed to DRASTICALLY enhance the error messages!!!
If we have
You’ll see
It’s MUCH BETTER than the freaking monstrosity in, e.g. https://github.com/aya-prover/aya-dev/issues/9#issuecomment-961337175!!!
Drink, drink, raise your glass, raise your glass high🥂!
Full, working example