haskell / rfcs

This repo is archived, consider using https://github.com/ghc-proposals/ghc-proposals instead
98 stars 17 forks source link

Coverage exclude generated code #21

Closed pjljvandelaar closed 5 years ago

pjljvandelaar commented 5 years ago

Many classes are not completely defined by the user. For example a class can be defined using deriving (Eq, Ord, Read, Show, Generic, NFData, Data).

Many users use coverage to determine the quality of their test set. They aim for a high coverage number.

In Haskell 2010, when a class is defined using deriving, one has to write test code to cover the Top Level Definitions in the generated code.

Could Haskell 2020 make a distinction between user code and generate code, such that coverage only includes user code?

cartazio commented 5 years ago

this is a bug / feature request for ghc, not for language standard.

(we are only going to consider stuff thats mature in at least one or more haskell implementations, ie ghc :) )