Open flip111 opened 1 year ago
Hi @flip111. Can you provide a repo that recreates the issue please?
Edit: do you mean that this library itself fails to compile, or another project that you are using this library in?
@noisyscanner The error occurs in the portal library as is visible from the error .spago/halogen-portal/main/src/Halogen/Portal.purs
.
I did an investigation it seems that after the code change the requirements for other code changed too. Things have to implement MonadTrans
now where this was not the case before. I'm not sure if your code change is possible without this new requirement. I don't know if the new requirement of having MonadTrans
is either good or bad, nevertheless it would be nice to document the requirement.
I was using portal together with store, but i don't believe this is a store issue but rather something general about how monad transformers work.
I uploaded a reproduction here https://github.com/flip111/halogen-portal-bug covering 6 cases of which one was my case. I made a new fork from halogen store now (see linked repo above) which includes this line https://github.com/thomashoneyman/purescript-halogen-store/blob/main/src/Halogen/Store/Monad.purs#L88 which i think solved it.
I will leave the issue open in case you decide to investigate too or add some documentation.
@noisyscanner i follow the main branch of this project. When i pulled your new code this happened.
When i go back to the previous commit all is fine. Can you write a bugfix and a test for this?