alt-romes / alt-romes/ghengin

Make Ghengin use an unrestricted monad

Đang mở
#2 0 bình luận 0 reaction 1 người được giao Được @alt-romes nhận Xem trên GitHub
Ngôn ngữ chính
Haskell
Star
85
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

While I think it is a good decision for the `core` of the engine and the `renderer` implementations to use the linear IO monad to track resources, I don't think it was a good decision to have that in `ghengin`, the package bringing it all together with batteries included, for the user.

Instead, the `Ghengin` monad should wrap the renderer/core monad with `UrT` (thereby making it an unrestricted monad).
We'd ensure
* The Core implementation and management of linear resources is correct by use of linear types, and brings sanity to the developers and engine developers relying directly on core
* The batteries included ghengin does not enforce linearity everywhere on the users
* Some functions might still require linear types, that's a good thing: even though not every single thing must be tracked linearly in the monadic binding, certain things might still require linearity
* We can drop `linear-apecs` and all those hacks which are just plain wrong really.
* We'll more clearly manage renderer resources whithin the renderer (and no longer in the apecs store, which was also not a great design decision)
* I'm still unsure of how exactly to do this split between unrestricted/linear while keeping safety of resources. I think it will come down to exposing just the right amount of linear functions for the things that do need linearity, but I don't think it'll be easy

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.