summaryrefslogtreecommitdiff
path: root/ghc.spec.in
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2007-03-15 14:28:12 +0000
committersimonpj@microsoft.com <unknown>2007-03-15 14:28:12 +0000
commitd4b95ea994e850f2c85e418b5625874fd25b0ebf (patch)
treeeaf9061922613e4942bba568e170c0f47b79984b /ghc.spec.in
parentcbb81129fe303877062079d26505e8cbe0f2a7c9 (diff)
downloadhaskell-d4b95ea994e850f2c85e418b5625874fd25b0ebf.tar.gz
Make the type-defaulting in GHCi use () as the first default type
See Trac #1200 This is a somewhat experimental fix. I'm not sure we want it in 6.6.1 The idea is explained in Note [Default unitTy] in TcSimplify. In interative mode (or with -fextended-default-rules) we add () as the first type we try when defaulting. This has very little real impact, except in the following case. Consider: Text.Printf.printf "hello" This has type (forall a. IO a); it prints "hello", and returns 'undefined'. We don't want the GHCi repl loop to try to print that 'undefined'. The neatest thing is to default the 'a' to (), rather than to Integer (which is what would otherwise happen; and then GHCi doesn't attempt to print the (). So in interactive mode, we add () to the list of defaulting types.
Diffstat (limited to 'ghc.spec.in')
0 files changed, 0 insertions, 0 deletions