Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
035d2a9b
Commit
035d2a9b
authored
Aug 24, 2010
by
simonpj
Browse files
Accept output
parent
cc765257
Changes
5
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail103.hs
View file @
035d2a9b
...
...
@@ -11,6 +11,6 @@ f:: ST t Int
f
=
do
v
<-
newSTRef
5
let
g
::
ST
s
Int
-- Implicitly forall
a
. ST s Int
-- Implicitly forall
s
. ST s Int
g
=
readSTRef
v
g
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail103.stderr
View file @
035d2a9b
tcfail103.hs:15:23:
Couldn't match expected type `s' against inferred type `t'
`s' is a rigid type variable bound by
the type signature for `g' at tcfail103.hs:13:17
Couldn't match type `t' with `s'
`t' is a rigid type variable bound by
the type signature for `f' at tcfail103.hs:10:8
Expected type: STRef s Int
Inferred type: STRef t Int
`s' is a rigid type variable bound by
the type signature for `g' at tcfail103.hs:13:17
In the first argument of `readSTRef', namely `v'
In the expression: readSTRef v
In the definition of `g': g = readSTRef v
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail140.stderr
View file @
035d2a9b
tcfail140.hs:10:
6
:
tcfail140.hs:10:
7
:
The function `f' is applied to two arguments,
but its type `Int -> Int' has only one
In the expression: f 3 9
In the definition of `bar': bar = f 3 9
tcfail140.hs:12:
9
:
The
infix expression `3 `f` 4' requires
`f'
to
take two arguments,
tcfail140.hs:12:
10
:
The
operator
`f' take
s
two arguments,
but its type `Int -> Int' has only one
In the expression: 3 `f` 4
In the definition of `rot': rot xs = 3 `f` 4
tcfail140.hs:14:1
3
:
The operator
section `(3 `f`)' requires `f' to
take two arguments,
tcfail140.hs:14:1
5
:
The operator
`f'
take
s
two arguments,
but its type `Int -> Int' has only one
In the first argument of `map', namely `(3 `f`)'
In the definition of `bot': bot xs = map ((3 `f`)) xs
In the expression: map (3 `f`) xs
In the definition of `bot': bot xs = map (3 `f`) xs
tcfail140.hs:16:
6
:
The lambda expression `\ Just x -> ...' has two arguments,
but its type `Maybe a -> a' has only one
tcfail140.hs:16:
8
:
Constructor `Just' should have 1 argument, but has been given none
In the pattern: Just
In the expression: (\ Just x -> x) :: Maybe a -> a
In the
definition of `t': t =
((\ Just x -> x) :: Maybe a -> a) (Just 1)
In the
expression:
((\ Just x -> x) :: Maybe a -> a) (Just 1)
tcfail140.hs:19:
0
:
tcfail140.hs:19:
1
:
The equation(s) for `g' have two arguments,
but its type `Int -> Int' has only one
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail145.stderr
View file @
035d2a9b
tcfail145.hs:9:6:
Pattern signature must exactly match: forall c. c -> c
Occurs check: cannot construct the infinite type: a = [a]
When matching `forall a. [a] -> [a]'
and `forall a. a -> a'
In the pattern: f :: forall a. [a] -> [a]
In the definition of `foo':
foo (f :: forall a. [a] -> [a]) = f undefined
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail164.stderr
View file @
035d2a9b
tcfail164.hs:11:
5
:
tcfail164.hs:11:
4
:
Bad call to tagToEnum# at type a
Specify the type by giving a type signature
e.g. (tagToEnum# x) :: Bool
In the expression: tagToEnum# 0#
In the definition of `f': f = tagToEnum# 0#
tcfail164.hs:17:3
4
:
tcfail164.hs:17:3
0
:
Bad call to tagToEnum# at type Int
Specify the type by giving a type signature
e.g. (tagToEnum# x) :: Bool
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment