[Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Mon Apr 30 08:55:52 EDT 2001
Mon, 30 Apr 2001 12:49:23 +0100, Simon Marlow <simonmar at microsoft.com> pisze:
> The problem is that both ~/.ghci and ./.ghci are useful: I use ~/.ghci
> to do things like :set +s, and define some useful macros. Whereas
> ./.ghci is great for doing things like:
>
>:set -iFoo:Bar
>:set -fglasgow-exts
>:load Main
You can implement your policies about ./.ghci in ~/.ghci by
:def readConfig \_ -> do doSomeChecks; readFile ".ghci"
:readConfig
For example enable ./.ghci as long as . is under $HOME.
But it's unsafe when somebody places Prelude.{o,hi} in .
(or IO.* or whatever modules doSomeChecks use).
And it's inconvenient to fit large expressions in a single line,
and local definitions share the namespace with code to be interpreted
interactively.
--
__("< Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTÊPCZA
QRCZAK
More information about the Glasgow-haskell-bugs
mailing list