
We already have Num instances on things like Sum and Product, could we have them on First and Last? I mostly want fromInteger on these types. To give you a real world example: keySpeed :: L.Fold KeyboardEventData Double keySpeed = L.foldMap (\KeyboardEventData {keyboardEventKeyMotion} -> case keyboardEventKeyMotion of Pressed -> Last (Just 1) Released -> Last (Just 0)) (fromMaybe 0 . getLast) keySpeed folds (under Control.Foldl) events from a UI system into the number 1 if the key has been pressed and 0 if the key has been released. It's OK in the above form, but if Last had a Num instance, I could just have Pressed -> 1 Released -> 0 Which I find preferable. Any thoughts? - Ollie