Skip to content
  • Ryan Scott's avatar
    Error when deriving instances in hs-boot files · 101a8c77
    Ryan Scott authored
    Summary:
    According to the GHC users' guide, one cannot derive
    instances for data types in `.hs-boot` files.
    However, GHC was not enforcing this in practice, which led to
    #14365.
    
    Fix this by actually throwing an error if a derived instance is
    detected in an `.hs-boot` file (and recommend how to fix it in the
    error message.)
    
    Test Plan: make test TEST=T14365
    
    Reviewers: ezyang, austin, bgamari, simonpj
    
    Reviewed By: simonpj
    
    Subscribers: simonpj, rwbarton, thomie
    
    GHC Trac Issues: #14365
    
    Differential Revision: https://phabricator.haskell.org/D4102
    101a8c77