Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refactor] vectorise: take expected mode, make return type explicit #58

Merged
merged 6 commits into from
Nov 27, 2024

Conversation

acl-cqc
Copy link
Collaborator

@acl-cqc acl-cqc commented Nov 22, 2024

It's confusing where responsibility for error handling (expected function, got wrong mode/type) belongs, hence "-- These shouldn't happen" type comments - so, make that clear.

This shortens quite a lot of stuff and makes getThunks much simpler IMHO**, albeit at the cost of a nasty case/match in mkMapFun because next of course completely loses the type of what we've passed in. I argue this "yeuch" is a lot more localised than what we had before, though (and many other places have similar issues with next!)

** This is important, because #41 introduces significant extra complexity here

@acl-cqc acl-cqc requested a review from croyzor November 22, 2024 16:58
@@ -1,4 +1,4 @@
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE AllowAmbiguousTypes, ScopedTypeVariables #-}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Scoped type variables should be on all the time, since it's in GHC2021 in the cabal file

@acl-cqc acl-cqc merged commit cca5a1d into main Nov 27, 2024
2 checks passed
@acl-cqc acl-cqc deleted the acl/refactor-vectorise branch November 27, 2024 14:05
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