one weird trick to get all your types
Richard Eisenberg
eir at cis.upenn.edu
Wed Nov 11 18:03:13 UTC 2015
Hi devs,
I spent some of my time at Hac Phi this past weekend teaching a few people the ropes about GHC hacking. One innocently asked if it's possible to load GHC into GHCi. I shuddered at the thought. But, actually, you can get quite close to this ideal:
> ghc-stage2 --interactive
GHCi, version 7.11.20151104: http://www.haskell.org/ghc/ :? for help
Prelude> :set -package ghc -- THIS IS THE KEY LINE
package flags have changed, resetting and loading new packages...
Prelude> import TcMType
Prelude TcMType> :t newEvVar
newEvVar
:: forall gbl lcl.
TcType.TcPredType -> TcRnTypes.TcRnIf gbl lcl Var.EvVar
Prelude TcMType>
Pretty cool, huh? This improves my life. Hopefully it improves yours, too.
Richard
PS: Can anyone recommend a place on the wiki where I should put this?
More information about the ghc-devs
mailing list