[GHC] #14689: Load order of .ghci config files is counterintuitive

GHC ghc-devs at haskell.org
Fri Jan 19 14:06:43 UTC 2018


#14689: Load order of .ghci config files is counterintuitive
-------------------------------------+-------------------------------------
           Reporter:  hal9zillion    |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  GHCi           |           Version:  8.2.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:  #14250, #6017
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Basically ghci seems to give precedence to global .ghci conguration
 settings by applying them after any local/project specific .ghci files:

 https://github.com/ghc/ghc/blob/314bc31489f1f4cd69e913c3b1e33236b2bdf553/ghc/GHCi/UI.hs#L561

 OTOH there are a couple of open issues where people dont like the idea of
 local ghci evaluation for security reasons:

 #6017
 #14250

 I suggest the following resolution:

 - Change the order or evaluation from global first to local
 - include a new ghci setting that prevents/enables the evaluation of
 local/project specific .ghci files for people who wish to avoid the
 security concerns some people have
 - This flag can then be set in the global .ghci file

 I believe this would both address the counterintuitive loading strategy
 implied currently (i was convinced local .ghci files didnt work because
 when i changed the prompt it was always overwritten by my global config)
 and the security question.

 The only question then would be if evaluation of project/local .ghci files
 would be on or off by default. I would favour the former but that is just
 personal preference.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14689>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list