idris-hackers / iquery Goto Github PK
View Code? Open in Web Editor NEWIdris Lib to interact with the DOM and Browser API for the JavaScript backend
Idris Lib to interact with the DOM and Browser API for the JavaScript backend
Is this related to #14?
Type checking ./IQuery/State.idr
./IQuery/State.idr:30:7:
When elaborating right hand side of isObj:
When elaborating an application of function Prelude.Monad.>>=:
No such variable mkForeign
./IQuery/State.idr:39:16:
When elaborating right hand side of stateVarExists:
When elaborating an application of function Prelude.Monad.>>=:
No such variable mkForeign
./IQuery/State.idr:44:14:
When elaborating right hand side of initStateVar:
No such variable mkForeign
./IQuery/State.idr:48:3:
When elaborating right hand side of IQuery.State.case block in getStateVar:
When elaborating an application of function Prelude.Functor.map:
No such variable mkForeign
./IQuery/State.idr:57:14:
When elaborating right hand side of stateCExists:
When elaborating an application of function Prelude.Monad.>>=:
No such variable mkForeign
./IQuery/State.idr:62:10:
When elaborating right hand side of incCount:
When elaborating an application of function Prelude.Monad.>>=:
No such variable mkForeign
./IQuery/State.idr:87:8:
When elaborating right hand side of access:
When elaborating an application of function Prelude.Monad.>>=:
No such variable mkForeign
./IQuery/State.idr:94:12:
When elaborating right hand side of fromState':
No such variable mkForeign
./IQuery/State.idr:116:9:
When elaborating right hand side of toState:
No such variable mkForeign
./IQuery/State.idr:140:10:
When elaborating right hand side of newState:
When elaborating an application of function Prelude.Monad.>>=:
No such variable mkForeign
./IQuery/State.idr:149:14:
When elaborating right hand side of destroyState:
When elaborating an application of function Prelude.Monad.>>=:
No such variable mkForeign
Currently, the Event
type is representing every event, whereas certain properties are only available for certain events, for example, calling clientX
on 'Change' event gives undefined
which Idris thinks is Int
and happily propagates javascript type silliness:)
I was thinking that maybe better would be to create separate types for various event types (mouse event, basic event etc...), and add some type classes to it to cover those cases (then event handlers and property 'getters' would only be working with appropriate types), but I wonder if there is some nicer way in dependently typed world.
I've tried to add target
function to get an element that caused an event. The Event
module does not see the Elements
(it's the other way around at the moment). I am wondering whether it wouldn't be better for the Event
to depend on Elements
(this would require to move onXXX functions there), but this would also require to remove abstract from Element
, as its constructor would now be used in other module.
So maybe it's better to just merge those two? Any other ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.