nick8325 / quickcheck

Automatic testing of Haskell programs.
Other
713 stars 119 forks source link

Implemented instances for Newline and NewlineMode #323

Closed dbramucci closed 3 years ago

dbramucci commented 3 years ago

These are similar to the instances for bools and a pair of bools but we shrink towards LF because, according to Newline's documentation in base, Haskell assumes \n in its programs, and LF means we don't need any translations. CRLF, means we do need to translate, meaning it will normally be the more complex case.

By implementing Arbitrary, CoArbitrary and Function instances for both Newline and NewlineMode, this closes issue #322