Comments (4)
Interestingly, the demos do compile if I change the implementation of view
to...
view : ∀ {w} → ⟦ Beh (DOM w) ⟧
view {t = _} with keypad
... | (dom , evt) = display (model evt) ++ dom
... i.e., I match on the time argument explicitly, so I don't think the problem is with your implementation. This is odd behaviour nonetheless. Let me know what your thoughts on this are.
from agda-frp-js.
Agda does not eagerly introduce hidden arguments on the lhs any more, if I am not mistaken. This explains the change of behavior.
from agda-frp-js.
Hmm, this behaviour seems to be caused by the use of a with-clause.
Replacing the with by an explicit function causes the code to compile:
view : ∀ {w} → ⟦ Beh (DOM w) ⟧
view {w} = f keypad where
f : ⟦ _ ∧ _ ⇒ Beh (DOM w) ⟧
f (dom , evt) = display (model evt) ++ dom
I'm not sure what to do about this, as the eager binding of time
arguments is rather hard-wired into the FRP model. We could just
explicitly bind {t} in the definition of view, but that's rather
breaking the FRP abstraction.
A.
On 02/17/2014 02:53 AM, Andreas Abel wrote:
Agda does not eagerly introduce hidden arguments on the lhs any more, if
I am not mistaken. This explains the change of behavior.—
Reply to this email directly or view it on GitHub
#4 (comment).
from agda-frp-js.
It works also without introducing the hidden argument explicitely.
view : ∀ {w} → ⟦ Beh (DOM w) ⟧
view = vw keypad
where vw : ⟦ _ ∧ _ ⇒ Beh (DOM _) ⟧
vw (dom , evt) = display (model evt) ++ dom
Currently, hidden arguments are eagerly introduced to check the where clauses, but not any with-generated functions. Maybe you should file an Agda issue.
from agda-frp-js.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agda-frp-js.