You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently on the process of generating haskell bindings for astal and its companion libs. Most of them generated fine, but I did come across some issues.
GDesktopAppInfo is part of Gio and not GLib. I couldn't get it to work by changing the type name using overrides. I just removed this property from the bindings for now.
GLib.ObjectPath is a vala thing. renaming the type using overrides works well, but maybe this should be handled in haskell-gi?
AstalNetwork
depends on NetworkManager, which does not have haskell bindings, so they have to be generated first. I tried to generate them, but it has types like 80211ApFlags, which are not valid names in haskell, as they start with a number. They have to be renamed. Do i have to add an override entry for every occurrence in the gir file or is there a better way?
AstalWireplumber
I get this error when trying to build the generated bindings.
GI/AstalWp/Objects/Endpoint.hs:666:42: error:
• Could not deduce (BoxedEnum AstalWp.Enums.MediaClass)
arising from a use of ‘B.Properties.getObjectPropertyEnum’
from the context: (MonadIO m, IsEndpoint o)
bound by the type signature for:
getEndpointMediaClass :: forall (m :: * -> *) o.
(MonadIO m, IsEndpoint o) =>
o -> m AstalWp.Enums.MediaClass
at GI/AstalWp/Objects/Endpoint.hs:665:1-85
• In the second argument of ‘($)’, namely
‘B.Properties.getObjectPropertyEnum obj "media-class"’
In the expression:
liftIO $ B.Properties.getObjectPropertyEnum obj "media-class"
In an equation for ‘getEndpointMediaClass’:
getEndpointMediaClass obj
= liftIO $ B.Properties.getObjectPropertyEnum obj "media-class"
|
666 | getEndpointMediaClass obj = MIO.liftIO $ B.Properties.getObjectPropertyEnum obj "media-class"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The same error is repeated for the AstalWp.Device.device-type and AstalWp.Wp.scale properties, which are enums as well. For now i just removed these properties from the generated bindings. The getter and setter functions for them are still included and it builds fine.
relevant parts of the gir file:
I'm currently on the process of generating haskell bindings for astal and its companion libs. Most of them generated fine, but I did come across some issues.
AstalApps:
GDesktopAppInfo is part of Gio and not GLib. I couldn't get it to work by changing the type name using overrides. I just removed this property from the bindings for now.
AstalBluetooth
GLib.ObjectPath is a vala thing. renaming the type using overrides works well, but maybe this should be handled in haskell-gi?
AstalNetwork
depends on NetworkManager, which does not have haskell bindings, so they have to be generated first. I tried to generate them, but it has types like 80211ApFlags, which are not valid names in haskell, as they start with a number. They have to be renamed. Do i have to add an override entry for every occurrence in the gir file or is there a better way?
AstalWireplumber
I get this error when trying to build the generated bindings.
The same error is repeated for the AstalWp.Device.device-type and AstalWp.Wp.scale properties, which are enums as well. For now i just removed these properties from the generated bindings. The getter and setter functions for them are still included and it builds fine.
relevant parts of the gir file:
I would appreciate any pointers in the right direction.
The text was updated successfully, but these errors were encountered: