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

Fix building with Template Haskell 2.18 / GHC 9.2. #1716

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mbakke
Copy link
Contributor

@mbakke mbakke commented Oct 5, 2023

Hello,

Here is another hack similar to #1694 that fixes building with GHC 9.2 simply by commenting type signatures. Also introduce a myConP for backwards compatibility with Template Haskell < 2.18.

CC @apoikos .

@@ -206,12 +206,12 @@ instance MonadTrans (ResultT a) where
instance (MonadIO m, Error a) => MonadIO (ResultT a m) where
liftIO = ResultT . liftIO
. liftM (either (failError . show) return)
. (try :: IO a -> IO (Either IOError a))
. (try :: IO α -> IO (Either IOError α))
Copy link
Member

Choose a reason for hiding this comment

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

Sorry for being late.

What has changed here? Latin letter a to Greek letter α (alpha)? Is this intentional? And if so, why?

Copy link
Member

Choose a reason for hiding this comment

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

This is presumably to decouple the inner (IO a) from the outer (Error a) type, letting type inference do its magic. @mbakke Greek letters are great (obviously, I'm Greek :-) but it's rather unusual to encounter them in source code. I would stick with ASCII characters if possible, e.g. we could try using a' here.

@rbott rbott requested a review from apoikos May 7, 2024 21:04
Copy link
Member

@apoikos apoikos left a comment

Choose a reason for hiding this comment

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

@mbakke thanks for the PR and apologies for the extremely long delay.

Other than α, I would just like to see a brief commit message describing the two changes.

@@ -206,12 +206,12 @@ instance MonadTrans (ResultT a) where
instance (MonadIO m, Error a) => MonadIO (ResultT a m) where
liftIO = ResultT . liftIO
. liftM (either (failError . show) return)
. (try :: IO a -> IO (Either IOError a))
. (try :: IO α -> IO (Either IOError α))
Copy link
Member

Choose a reason for hiding this comment

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

This is presumably to decouple the inner (IO a) from the outer (Error a) type, letting type inference do its magic. @mbakke Greek letters are great (obviously, I'm Greek :-) but it's rather unusual to encounter them in source code. I would stick with ASCII characters if possible, e.g. we could try using a' here.


instance (MonadBase IO m, Error a) => MonadBase IO (ResultT a m) where
liftBase = ResultT . liftBase
. liftM (either (failError . show) return)
. (try :: IO a -> IO (Either IOError a))
. (try :: IO α -> IO (Either IOError α))
Copy link
Member

Choose a reason for hiding this comment

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

Ditto

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.

None yet

3 participants