jonascarpay / apecs

a fast, extensible, type driven Haskell ECS framework for games
392 stars 43 forks source link

Template Haskell function requires me to import some symbols unqualified #116

Closed glocq closed 1 year ago

glocq commented 1 year ago

(More detail available here) (My specific issue is with apecs-stm, but I am fairly certain the issue is also present in apecs)

The mkWorld function features (among others) mkName "Has", which generates the type constructor Has. This requires me to import Has unqualified. Forcing this decision (whether and how to import certain symbols) on the user seems problematic.

Possible fix: It was suggested (see link above) that expressions like mkName "Has" be replaced with ''Has, which might generate the right symbol automatically. Unfortunately, I cannot guarantee that this would work, since I am not familiar with Template Haskell. I am hoping that someone more experienced can confirm/invalidate this.

jonascarpay commented 1 year ago

Thanks for looking into this. Seems like it's worth it to at least open a PR changing to ''Has, and then seeing if CI complains

jonascarpay commented 1 year ago

Closed in #117