markhibberd / pirate

Non-horrible command line parsing.
https://github.com/markhibberd/pirate
BSD 3-Clause "New" or "Revised" License
42 stars 10 forks source link

Change Parse to Covariant. #36

Closed HuwCampbell closed 9 years ago

HuwCampbell commented 9 years ago

Parse should almost certainly be covariant. In the Git example, a Parse[GitVersion] should be a Parse[GitCommand], which is wasn't before, meaning a lot of extra type annotations and stuffing around were required.

markhibberd commented 9 years ago

:-1: This is just not an option, it just shoves the issue around and generally ends up worse allowing incorrect inference to Any or Product. Do the right thing and hide constructor types and these issues go away, it is harder work but you end up in a better place.