Using data-files and Paths with Cabal

Recently I needed to use cabal's data-files feature, and the only really useful reference (the Cabal manual seems to be lacking) I could find was a post from 2008 describing how to use a custom Paths module in a package.

However, it seems that you don't need to create your own separate Paths module any more – Cabal will provide the Paths module when you use any cabal command, so you can import Paths_whatever and it'll handle it automatically for you.