Code Monkey home page Code Monkey logo

Comments (4)

wenkokke avatar wenkokke commented on July 18, 2024

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.

andreasabel avatar andreasabel commented on July 18, 2024

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.

asajeffrey avatar asajeffrey commented on July 18, 2024

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.

andreasabel avatar andreasabel commented on July 18, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.