Skip to content

Make it work with MicroHs - #42

Merged
Bodigrim merged 1 commit into
Bodigrim:masterfrom
konsumlamm:mhs
Nov 9, 2026
Merged

Bodigrim merged 1 commit into
Bodigrim:masterfrom
konsumlamm:mhs

Conversation

@konsumlamm

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread Control/Monad/Logic.hs
handle r = r `catch` \e -> unLogicT (h e) sk fk
in handle $ unLogicT m (\a -> sk a . handle) fk

#ifdef __GLASGOW_HASKELL__

@Bodigrim Bodigrim Dec 23, 2025 •

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not terribly happy to provide conditional API. I'd like to know a resolution on augustss/MicroHs#229 before proceeding.

I think I'd rather have

flag has_overloaded_lists
  default: True 

and then

if flag(support_overloaded_lists)
  other-extensions: OverloadedLists TypeFamilies
  cpp-options: -DHasOverloadedLists

and then define instance IsList only if #ifdef HasOverloadedLists.

(This would require a futur MicroCabal to be able to solve flags or hardcode them for time being)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or shall we wait until MicroHs supports TypeFamilies? Then it can provide class IsList even if unused for overloading.

@konsumlamm konsumlamm Dec 23, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or shall we wait until MicroHs supports TypeFamilies?

I think that's the main issue, writing IsList instances doesn't require OverloadedLists. However I have no idea how soon we can expect TypeFamilies to be supported in MicroHs. See augustss/MicroHs#367.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If TypeFamilies can happen within a few months, I'd suggest we wait for them?..

Happy to merge the rest of the patch which amends imports, if it helps.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If TypeFamilies can happen within a few months, I'd suggest we wait for them?..

Ok, I'm fine with that.

Happy to merge the rest of the patch which amends imports, if it helps.

I don't think this makes much sense, since it still won't compile with MicroHs.

@Bodigrim
Bodigrim merged commit a1a4a43 into Bodigrim:master Nov 9, 2026
0 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants