Whitespace.
Add Functor/Applicative instances for ParseResult

ParseResult is a Monad, so it should also be a Functor and an Applicative.
Correct applicative instance
Functor/Applicative instance for types in ReadP.hs

This defines the following instances for the types in ReadP.hs:
  * Functor/Applicative for P
  * Appplicative for Parser
Tidy up

Remove uneeded import of join and add a wildcard pattern when f is
unused by fmap.
More instances and use ap as default for (<*>)
Fix building of executables that use TH with dyn-by-default GHC.

Fixes #1252. Makes the test suite pass with GHC HEAD.

(If 'TemplateHaskell/profiling' still fails, you're probably affected by this
GHC bug: http://ghc.haskell.org/trac/ghc/ticket/7978 . Try compiling a more
recent GHC HEAD.)
Apply suggestions from byorgey
Merge pull request #1385 from bennofs/patch-1

Functor and Applicative instances
Test for "vanilla" lib/exe that uses TH.
When possible, use -dynamic-too for exes that use TH.
Make the code a bit more readable.
Rename and rearrange some variables.

Based on discussion with @dcoutts.
Merge pull request #1386 from 23Skidoo/ghc-head-fixes

Fix building of executables that use TH with dyn-by-default GHC.