summaryrefslogtreecommitdiff
path: root/testsuite/tests/partial-sigs/should_compile/T11670.stderr
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2016-06-11 23:49:27 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2016-06-13 10:57:03 +0100
commit15b9bf4ba4ab47e6809bf2b3b36ec16e502aea72 (patch)
treee2e7336c63e9b7130ba70f3551ff290d4a25184b /testsuite/tests/partial-sigs/should_compile/T11670.stderr
parentd25cb61a1c2a135a2564143a332f8b2962f134bc (diff)
downloadhaskell-15b9bf4ba4ab47e6809bf2b3b36ec16e502aea72.tar.gz
Improve typechecking of let-bindings
This major commit was initially triggered by #11339, but it spiraled into a major review of the way in which type signatures for bindings are handled, especially partial type signatures. On the way I fixed a number of other bugs, namely #12069 #12033 #11700 #11339 #11670 The main change is that I completely reorganised the way in which type signatures in bindings are handled. The new story is in TcSigs Note [Overview of type signatures]. Some specific: * Changes in the data types for signatures in TcRnTypes: TcIdSigInfo and new TcIdSigInst * New module TcSigs deals with typechecking type signatures and pragmas. It contains code mostly moved from TcBinds, which is already too big * HsTypes: I swapped the nesting of HsWildCardBndrs and HsImplicitBndsrs, so that the wildcards are on the oustide not the insidde in a LHsSigWcType. This is just a matter of convenient, nothing deep. There are a host of other changes as knock-on effects, and it all took FAR longer than I anticipated :-). But it is a significant improvement, I think. Lots of error messages changed slightly, some just variants but some modest improvements. New tests * typecheck/should_compile * SigTyVars: a scoped-tyvar test * ExPat, ExPatFail: existential pattern bindings * T12069 * T11700 * T11339 * partial-sigs/should_compile * T12033 * T11339a * T11670 One thing to check: * Small change to output from ghc-api/landmines. Need to check with Alan Zimmerman
Diffstat (limited to 'testsuite/tests/partial-sigs/should_compile/T11670.stderr')
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T11670.stderr36
1 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/T11670.stderr b/testsuite/tests/partial-sigs/should_compile/T11670.stderr
new file mode 100644
index 0000000000..eaa304ca42
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/T11670.stderr
@@ -0,0 +1,36 @@
+
+T11670.hs:10:42: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘CLong’
+ • In an expression type signature: IO _
+ In the expression: peekElemOff undefined 0 :: IO _
+ In an equation for ‘T11670.peek’:
+ T11670.peek ptr = peekElemOff undefined 0 :: IO _
+ • Relevant bindings include
+ ptr :: Ptr a (bound at T11670.hs:10:6)
+ peek :: Ptr a -> IO CLong (bound at T11670.hs:10:1)
+
+T11670.hs:13:40: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘Storable w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of <expression> :: Storable w => IO w
+ at T11670.hs:13:40-48
+ • In an expression type signature: _ => IO _
+ In the expression: peekElemOff undefined 0 :: _ => IO _
+ In an equation for ‘peek2’:
+ peek2 ptr = peekElemOff undefined 0 :: _ => IO _
+ • Relevant bindings include
+ ptr :: Ptr a (bound at T11670.hs:13:7)
+ peek2 :: Ptr a -> IO CLong (bound at T11670.hs:13:1)
+
+T11670.hs:13:48: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of <expression> :: Storable w => IO w
+ at T11670.hs:13:40-48
+ • In an expression type signature: _ => IO _
+ In the expression: peekElemOff undefined 0 :: _ => IO _
+ In an equation for ‘peek2’:
+ peek2 ptr = peekElemOff undefined 0 :: _ => IO _
+ • Relevant bindings include
+ ptr :: Ptr a (bound at T11670.hs:13:7)
+ peek2 :: Ptr a -> IO CLong (bound at T11670.hs:13:1)