stefan-hoeck / idris2-dom

Javascript DOM bindings for Idris2
BSD 2-Clause "Simplified" License
47 stars 7 forks source link

Web.Internal.Types not found #6

Closed benjaminflin closed 3 years ago

benjaminflin commented 3 years ago

For context: I am using Idris v0.4.0 on Ubuntu 20.04

After installing dom.ipkg I get the following error:

Error: Module Web.Internal.Types not found

Main:8:1--8:15
 6 | 
 7 | import JS
 8 | import Web.Dom
     ^^^^^^^^^^^^^^

I was able to fix it by adding all Web.Internal.* packages to the modules section of dom.ipkg. I guess idris2 doesn't look for re-exported modules when deciding which modules to install, e.g. in Web.Dom.

stefan-hoeck commented 3 years ago

Thanks for reporting this. I will look into it tonight.

falsifian commented 3 years ago

Would it be worth just implementing @benjaminflin's workaround for now? I went ahead and did that in https://github.com/falsifian/idris2-dom/commit/4bf603d9a95c6cf532812f902c40eb4904118027. (I didn't open a PR because it includes a commit from a different PR: https://github.com/stefan-hoeck/idris2-dom/pull/7.)

stefan-hoeck commented 3 years ago

Yes, this is the way forward. If you find the time to commit a PR, I'd be grateful, as I'm rather busy with other project's right now. For instance, all these discussions about tail call optimization in monadic code have triggered my interest. :-)