fltkhs
fltkhs copied to clipboard
get/setSize types disagree
getSize :: Ref _ -> IO Int
setSize :: Size -> IO ()
Whoops, I could be wrong about this one. I forget what widget I was looking at when I made the ticket, but for the Input
widget, it really does have
int Fl_Input_::size() const
void Fl_Input_::size (int W, int H)
(heh, because getSize
gets the length of the text whereas setSize
sets the size of the widget)
Ah yes, that makes sense. And actually this OO overloading (specifically being able to have two methods with the same name and completely different type signatures) that's common place in C++ is quite difficult to deal with Haskell and motivated most of the design. None of the existing literature addressed this. The gi-*
packages use OverloadedLabels
but that's a dangerous extension and I didn't want that in the codebase. OverloadedRecordFields
could be a good step forward but I haven't had the time and the migration effort is pretty significant.
Yup, very tricky to design around in Haskell for sure. I've been working on a simplified interface to fltkhs
that probably will never become complete enough to release, but I do think there is enough complexity in fltkhs
to warrant an opinionated Haskellier wrapper that trades power for simplicity.
Totally! Here to help if you need it.