I'm often annoyed by foo <- readFile printing the entire file contents
on my console. I know there is this flag to turn it off but I can never
remember what the flag is called. I have to look it up every time or
suffer pages of file content on my console.

finding that flag (and other topic-related flags) might become
easier in future. there is one patch for head that would allow
to query directly for interactive mode (or other topical) flags:

   $ /cygdrive/c/fptools/ghc/compiler/stage2/ghc-inplace --flags Interactive:
   Interactive-mode options

     Flag | Description | Static/Dynamic | Reverse
     -ignore-dot-ghci | Disable reading of .ghci files | static | -
     -read-dot-ghci | Enable reading of .ghci files | static | -
     -fbreak-on-exception | Break on any exception thrown | dynamic | 
-fno-break-on-exception
     -fbreak-on-error | Break on uncaught exceptions and errors | dynamic | 
-fno-break-on-error
-fprint-evld-with-show | Enable usage of Show instances in :print | dynamic | -fno-print-evld-with-show
     -fno-print-bind-result | Turn off printing of binding results in GHCi | 
dynamic | -

unfortunately, Simon M is violently opposed to it, so it is
unlikely to go in. see

   http://hackage.haskell.org/trac/ghc/ticket/1226

his idea is that the man-page or web-page are good enough
to find such things. if you don't agree, perhaps you'd like to
add a comment to that ticket?-) otherwise, i'll just keep that
patch in my own repo.

there is another patch that would list (and thereby remind
you of) ghci-related dynamic flags whenever you do :set
to list ghci options:

   Prelude> :set
   options currently set: none.
   GHCi-specific dynamic flag settings:
     -fno-print-explicit-foralls
     -fprint-bind-result
     -fno-break-on-exception
     -fno-break-on-error
     -fno-print-evld-with-show
   other dynamic, non-language, flag settings:
     -fno-warn-dodgy-imports
     -fwarn-duplicate-exports
   ..

my current understanding is that this one will go in at
some point, now that the release is out of the way. so,
for ghci-related dynamic flags at least, you'd see which
ones there are, and what they are set to.

claus

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to