deech / fltkhs

Haskell bindings to FLTK GUI toolkit.
MIT License
190 stars 24 forks source link

NativeFileChooserAction lacks Eq instance #135

Closed ericu closed 5 years ago

ericu commented 5 years ago

It would be nice to be able to compare to it. Currently you can do this:

   chooser <- nativeFileChooserNew $ Just BrowseMultiFile
   res <- showWidget chooser
   case res of
    NativeFileChooserPicked -> do
   ...

But you can't do this:

   chooser <- nativeFileChooserNew $ Just BrowseMultiFile
   res <- showWidget chooser
   when (res == NativeFileChooserPicked) $ do
   ...
deech commented 5 years ago

That's an oversight. A PR would be appreciated because I won't be able to get to this for at least a week.

ericu commented 5 years ago

https://github.com/deech/fltkhs/pull/136