obelisk icon indicating copy to clipboard operation
obelisk copied to clipboard

Backend doesn't allow to read Config out of the box

Open mgttlinger opened this issue 2 years ago • 3 comments

I might be doing things the wrong way but it seems that the Frontend handles a ConfigsT in its transformer stack while the Backend doesn't. I can of course handle it myself but it feels like a bug or at least kind of an oddity that the Frontend allows reading from the config but the backend does not out of the box.

mgttlinger avatar Aug 17 '21 15:08 mgttlinger

FWIW there's Obelisk.ExecutableConfig.Lookup.getConfigs :: IO (Map Text ByteString). Not sure how that relates to Obelisk.Configs.getConfigs :: HasConfigs m => m (Map Text ByteString)), but both show up on ob hoogle when searching for getConfigs.

alexfmpe avatar Aug 17 '21 15:08 alexfmpe

Yes, that is what you call the runConfigsT with, but it feels strange that I have to do this in the Backend while the Frontend does it for me.

mgttlinger avatar Aug 17 '21 15:08 mgttlinger

If this is not the intended behaviour I can gladly send a PR changing that.

mgttlinger avatar Aug 17 '21 18:08 mgttlinger