Skip to content
  • Ningning Xie's avatar
    Fix `:k` command: add validity checking · c4a876d5
    Ningning Xie authored
    Summary:
    This patch fixes #15806, where we found that the `:k` command in GHCi
    misses a validity checking for the type.
    
    Missing validity checking causes `:k` to accept types that are not validated.
    For example, `:k (Maybe (forall a. a -> a))` (incorrectly) returns `*`, while
    impredictivity of type instantiation shouldn't be allowed.
    
    Test Plan: ./validate
    
    Reviewers: simonpj, goldfire, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, carter
    
    GHC Trac Issues: #15806
    
    Differential Revision: https://phabricator.haskell.org/D5265
    c4a876d5