4 reduce/reduce parser conflicts resolved
4 reduce/reduce parser conflicts resolved

As GHC documentation (section 7.4.4, Type operators) says:
> "There is now some potential ambiguity in import and export lists;
for example if you write import M( (+) ) do you mean the function (+)
or the type constructor (+)? The default is the former, but with
-XExplicitNamespaces (which is implied by -XExplicitTypeOperators) GHC
allows you to specify the latter by preceding it with the keyword type"

Turns out this ambiguity causes 4 of 6 reduce/reduce conflicts in GHC
parser.  All 4 conflicts arise from a single production:

    qcname
        :  qvar
        |  oqtycon

Recursive inlining of 'qvar' and 'oqtycon' helps reveal the faulty
productions:

    qcname
        :
    ...
        | '(' QVARSYM ')'
        | '(' VARSYM ')'
        | '(' '*'    ')'
        | '(' '-'    ')'

These productions can either be parsed as variable or type constructor,
but variable constuctor is always preferred. My patch removes ambiguity
while preserving the existing behaviour:

  - all unambigous productions are left as-is
  - ambigous productions for variable constuctors are left
  - ambigous productions for type constructors are removed (there's no
    way they could be triggered)

Updated comment.

Test Plan: Tested with 'make fasttest'

Reviewers: austin, simonpj, trofi, bgamari, simonmar

Reviewed By: trofi, bgamari, simonmar

Subscribers: thomie, mpickering

Projects: #ghc

Differential Revision: https://phabricator.haskell.org/D1111

tjakway/ghcjvm,nushio3/ghc,acowley/ghc,ml9951/ghc,AlexanderPankiv/ghc,shlevy/ghc,tjakway/ghcjvm,da-x/ghc,ghc-android/ghc,ghc-android/ghc,gridaphobe/ghc,ml9951/ghc,olsner/ghc,ghc-android/ghc,olsner/ghc,vTurbine/ghc,ghc-android/ghc,gridaphobe/ghc,siddhanathan/ghc,mettekou/ghc,shlevy/ghc,snoyberg/ghc,oldmanmike/ghc,mettekou/ghc,nushio3/ghc,sgillespie/ghc,ml9951/ghc,mfine/ghc,gridaphobe/ghc,siddhanathan/ghc,nkaretnikov/ghc,tjakway/ghcjvm,nushio3/ghc,ml9951/ghc,wxwxwwxxx/ghc,GaloisInc/halvm-ghc,mcschroeder/ghc,vTurbine/ghc,ml9951/ghc,gridaphobe/ghc,mcschroeder/ghc,siddhanathan/ghc,vTurbine/ghc,GaloisInc/halvm-ghc,wxwxwwxxx/ghc,snoyberg/ghc,tjakway/ghcjvm,TomMD/ghc,mfine/ghc,nkaretnikov/ghc,anton-dessiatov/ghc,gridaphobe/ghc,GaloisInc/halvm-ghc,siddhanathan/ghc,shlevy/ghc,nushio3/ghc,da-x/ghc,nushio3/ghc,TomMD/ghc,AlexanderPankiv/ghc,mfine/ghc,acowley/ghc,sgillespie/ghc,ezyang/ghc,GaloisInc/halvm-ghc,TomMD/ghc,nkaretnikov/ghc,nushio3/ghc,acowley/ghc,vikraman/ghc,vTurbine/ghc,sdiehl/ghc,ml9951/ghc,vTurbine/ghc,oldmanmike/ghc,sdiehl/ghc,oldmanmike/ghc,sgillespie/ghc,vikraman/ghc,nushio3/ghc,snoyberg/ghc,olsner/ghc,tjakway/ghcjvm,ezyang/ghc,shlevy/ghc,mettekou/ghc,vikraman/ghc,vTurbine/ghc,wxwxwwxxx/ghc,sdiehl/ghc,oldmanmike/ghc,TomMD/ghc,oldmanmike/ghc,da-x/ghc,vikraman/ghc,shlevy/ghc,da-x/ghc,ezyang/ghc,tjakway/ghcjvm,sdiehl/ghc,acowley/ghc,olsner/ghc,ezyang/ghc,TomMD/ghc,wxwxwwxxx/ghc,GaloisInc/halvm-ghc,snoyberg/ghc,snoyberg/ghc,tjakway/ghcjvm,AlexanderPankiv/ghc,sgillespie/ghc,sdiehl/ghc,elieux/ghc,mcschroeder/ghc,mcschroeder/ghc,TomMD/ghc,wxwxwwxxx/ghc,shlevy/ghc,vikraman/ghc,anton-dessiatov/ghc,ml9951/ghc,sdiehl/ghc,anton-dessiatov/ghc,anton-dessiatov/ghc,nkaretnikov/ghc,GaloisInc/halvm-ghc,TomMD/ghc,ghc-android/ghc,sgillespie/ghc,vikraman/ghc,sgillespie/ghc,ghc-android/ghc,acowley/ghc,shlevy/ghc,acowley/ghc,ezyang/ghc,wxwxwwxxx/ghc,elieux/ghc,oldmanmike/ghc,siddhanathan/ghc,sgillespie/ghc,olsner/ghc,da-x/ghc,nkaretnikov/ghc,elieux/ghc,mettekou/ghc,gridaphobe/ghc,mfine/ghc,vikraman/ghc,anton-dessiatov/ghc,elieux/ghc,olsner/ghc,siddhanathan/ghc,elieux/ghc,snoyberg/ghc,anton-dessiatov/ghc,mfine/ghc,wxwxwwxxx/ghc,ml9951/ghc,AlexanderPankiv/ghc,olsner/ghc,AlexanderPankiv/ghc,mettekou/ghc,mcschroeder/ghc,acowley/ghc,gridaphobe/ghc,GaloisInc/halvm-ghc,snoyberg/ghc,ezyang/ghc,mfine/ghc,nkaretnikov/ghc,elieux/ghc,mcschroeder/ghc,anton-dessiatov/ghc,nkaretnikov/ghc,AlexanderPankiv/ghc,elieux/ghc,vTurbine/ghc,da-x/ghc,mettekou/ghc,ghc-android/ghc,ezyang/ghc,AlexanderPankiv/ghc,mfine/ghc,siddhanathan/ghc,mettekou/ghc,sdiehl/ghc,mcschroeder/ghc,da-x/ghc,oldmanmike/ghc