patch applied (ghc): Refactoring and tidyup of HscMain and
relatedthings (also fix #1666)
Simon Marlow
marlowsd at gmail.com
Thu Oct 28 04:46:06 EDT 2010
Yes, I'll try to write a blog post about it sometime.
Cheers,
Simon
On 27/10/2010 22:57, Claus Reinke wrote:
> Sufficiently many externally visible changes to warrant
> a GHC blog post (motivation, changes, use), linked from
> wiki pages on the GHC API?
>
> Actually, having an "API" tag in the GHC blog, and the wiki
> pages linking to that tag, might also alleviate the issues of
> eternally-out-of-date GHC API tutorials, by explaining
> changes when they happen, but recording them for later
> reading.
>
> Claus
>
> --------------------------------------------------
> From: "Simon Marlow" <marlowsd at gmail.com>
> Sent: Wednesday, October 27, 2010 8:56 PM
> To: <cvs-ghc at haskell.org>
> Subject: patch applied (ghc): Refactoring and tidyup of HscMain and
> relatedthings (also fix #1666)
>
>> Wed Oct 27 05:11:32 PDT 2010 Simon Marlow <marlowsd at gmail.com>
>> * Refactoring and tidyup of HscMain and related things (also fix #1666)
>> While trying to fix #1666 (-Werror aborts too early) I decided to some
>> tidyup in GHC/DriverPipeline/HscMain.
>>
>> - The GhcMonad overloading is gone from DriverPipeline and HscMain
>> now. GhcMonad is now defined in a module of its own, and only
>> used in the top-level GHC layer. DriverPipeline and HscMain
>> use the plain IO monad and take HscEnv as an argument.
>>
>> - WarnLogMonad is gone. printExceptionAndWarnings is now called
>> printException (the old name is deprecated). Session no longer
>> contains warnings.
>>
>> - HscMain has its own little monad that collects warnings, and also
>> plumbs HscEnv around. The idea here is that warnings are collected
>> while we're in HscMain, but on exit from HscMain (any function) we
>> check for warnings and either print them (via log_action, so IDEs
>> can still override the printing), or turn them into an error if
>> -Werror is on.
>>
>> - GhcApiCallbacks is gone, along with GHC.loadWithLogger. Thomas
>> Schilling told me he wasn't using these, and I don't see a good
>> reason to have them.
>>
>> - there's a new pure API to the parser (suggestion from Neil Mitchell):
>> parser :: String
>> -> DynFlags
>> -> FilePath
>> -> Either ErrorMessages (WarningMessages,
>> Located (HsModule RdrName))
>>
>> M ./compiler/basicTypes/SrcLoc.lhs -2 +2
>> M ./compiler/ghc.cabal.in +1
>> M ./compiler/ghci/Debugger.hs -4 +1
>> M ./compiler/main/DriverMkDepend.hs +1
>> M ./compiler/main/DriverPipeline.hs -116 +105
>> M ./compiler/main/ErrUtils.lhs -40 +12
>> M ./compiler/main/GHC.hs -215 +172
>> A ./compiler/main/GhcMonad.hs
>> M ./compiler/main/HeaderInfo.hs -7 +6
>> M ./compiler/main/HscMain.lhs -305 +517
>> M ./compiler/main/HscTypes.lhs -298 +28
>> M ./compiler/main/InteractiveEval.hs -25 +16
>> M ./compiler/rename/RnNames.lhs -1 +13
>> M ./compiler/simplCore/CoreMonad.lhs +1
>> M ./compiler/typecheck/TcRnMonad.lhs -3 +2
>> M ./compiler/typecheck/TcSplice.lhs -1 +1
>> M ./compiler/utils/MonadUtils.hs -12 +12
>> M ./compiler/utils/StringBuffer.lhs -2 +3
>> M ./compiler/vectorise/Vectorise.hs +2
>> M ./compiler/vectorise/Vectorise/Monad.hs +1
>> M ./ghc/GhciMonad.hs -13 +3
>> M ./ghc/InteractiveUI.hs -12 +11
>> M ./ghc/Main.hs -16 +12
>>
>> View patch online:
>> http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=ghc;a=darcs_commitdiff;h=20101027121132-12142-a96f7598509a1990a2885acaec3959dacfab3302.gz
>>
>>
>> _______________________________________________
>> Cvs-ghc mailing list
>> Cvs-ghc at haskell.org
>> http://www.haskell.org/mailman/listinfo/cvs-ghc
>>
>
>
>
More information about the Cvs-ghc
mailing list