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

Add some missing field readers to XFontStruct #88

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

kanaihiroki
Copy link
Contributor

Hello, this PR adds the reader functions which seems to be missing.

@@ -35,7 +37,7 @@ module Graphics.X11.Xlib.Font(
import Graphics.X11.Types
import Graphics.X11.Xlib.Types

import Foreign (Ptr, Int32, alloca, allocaBytes, peekByteOff, Word16, #{type unsigned long}, peek, throwIfNull)
import Foreign (Ptr, Int32, alloca, allocaBytes, peekByteOff, Word16, #{type unsigned long}, peek, plusPtr, throwIfNull)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see plusPtr being used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems that plusPtr is used at expanded code of ptr directive.
When plusPtr is dropped, following compile error has occurred.

Graphics/X11/Xlib/Font.hsc:121:47: error:
    • Variable not in scope:
        plusPtr :: Ptr FontStruct -> t1 -> Ptr CharStruct
    • Perhaps you want to add ‘plusPtr’ to the import list
      in the import of ‘Foreign’ (Graphics/X11/Xlib/Font.hsc:40:1-96).
    |
121 |         peekCharStruct $ #{ptr XFontStruct,min_bounds} fs
    |    

@geekosaur
Copy link
Contributor

geekosaur commented Oct 15, 2023

Looks like the failures are because of hvr's PPA. On the one hand, we could fix the references; on the other, it's well past time to stop relying on it and switch to ghcup. @liskin?

@slotThe
Copy link
Member

slotThe commented Oct 15, 2023

I think we just use what haskell-ci uses as its default value, though there seem to be plans to update that (see haskell-CI/haskell-ci#685)

@liskin
Copy link
Member

liskin commented Oct 15, 2023

I think we just use what haskell-ci uses as its default value, though there seem to be plans to update that (see haskell-CI/haskell-ci#685)

When that's merged we'll still get failures with 7.10 I believe, which we still support because of #80. It's been 2 years since that issue was filed so I guess we can drop support for GHC < 8, we just need to remember to bump the base bounds so that cabal picks the previous version when someone tries to use an old GHC.

liskin added a commit that referenced this pull request Oct 18, 2023
@liskin liskin merged commit 8201568 into xmonad:master Oct 18, 2023
10 of 16 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.

4 participants