Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
5479ae0a
Commit
5479ae0a
authored
Oct 30, 2014
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Testsuite error message changes
parent
66658eed
Changes
121
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
121 changed files
with
1358 additions
and
1063 deletions
+1358
-1063
testsuite/tests/deSugar/should_compile/T2431.stderr
testsuite/tests/deSugar/should_compile/T2431.stderr
+3
-6
testsuite/tests/deriving/should_fail/T9071.stderr
testsuite/tests/deriving/should_fail/T9071.stderr
+1
-1
testsuite/tests/deriving/should_fail/T9071_2.stderr
testsuite/tests/deriving/should_fail/T9071_2.stderr
+1
-1
testsuite/tests/gadt/T3169.stderr
testsuite/tests/gadt/T3169.stderr
+1
-3
testsuite/tests/gadt/T7293.stderr
testsuite/tests/gadt/T7293.stderr
+1
-1
testsuite/tests/gadt/T7294.stderr
testsuite/tests/gadt/T7294.stderr
+1
-1
testsuite/tests/gadt/gadt21.stderr
testsuite/tests/gadt/gadt21.stderr
+14
-19
testsuite/tests/ghc-api/apirecomp001/apirecomp001.stderr
testsuite/tests/ghc-api/apirecomp001/apirecomp001.stderr
+6
-6
testsuite/tests/ghci.debugger/scripts/break026.stdout
testsuite/tests/ghci.debugger/scripts/break026.stdout
+58
-58
testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs
...e/tests/indexed-types/should_compile/IndTypesPerfMerge.hs
+9
-1
testsuite/tests/indexed-types/should_compile/PushInAsGivens.stderr
.../tests/indexed-types/should_compile/PushInAsGivens.stderr
+1
-0
testsuite/tests/indexed-types/should_compile/PushedInAsGivens.hs
...te/tests/indexed-types/should_compile/PushedInAsGivens.hs
+8
-1
testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
...ests/indexed-types/should_compile/PushedInAsGivens.stderr
+27
-0
testsuite/tests/indexed-types/should_compile/Simple13.hs
testsuite/tests/indexed-types/should_compile/Simple13.hs
+30
-0
testsuite/tests/indexed-types/should_compile/Simple8.hs
testsuite/tests/indexed-types/should_compile/Simple8.hs
+1
-1
testsuite/tests/indexed-types/should_compile/T3017.stderr
testsuite/tests/indexed-types/should_compile/T3017.stderr
+1
-1
testsuite/tests/indexed-types/should_compile/T3208b.stderr
testsuite/tests/indexed-types/should_compile/T3208b.stderr
+5
-8
testsuite/tests/indexed-types/should_compile/T3826.hs
testsuite/tests/indexed-types/should_compile/T3826.hs
+51
-5
testsuite/tests/indexed-types/should_compile/T4494.hs
testsuite/tests/indexed-types/should_compile/T4494.hs
+20
-0
testsuite/tests/indexed-types/should_compile/T7804.hs
testsuite/tests/indexed-types/should_compile/T7804.hs
+12
-0
testsuite/tests/indexed-types/should_compile/all.T
testsuite/tests/indexed-types/should_compile/all.T
+1
-1
testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.hs
testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.hs
+25
-18
testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.stderr
...uite/tests/indexed-types/should_fail/ExtraTcsUntch.stderr
+14
-8
testsuite/tests/indexed-types/should_fail/GADTwrong1.hs
testsuite/tests/indexed-types/should_fail/GADTwrong1.hs
+28
-2
testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
+8
-13
testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr
testsuite/tests/indexed-types/should_fail/NoMatchErr.stderr
+1
-4
testsuite/tests/indexed-types/should_fail/Overlap9.stderr
testsuite/tests/indexed-types/should_fail/Overlap9.stderr
+1
-4
testsuite/tests/indexed-types/should_fail/T1897b.stderr
testsuite/tests/indexed-types/should_fail/T1897b.stderr
+2
-6
testsuite/tests/indexed-types/should_fail/T1900.stderr
testsuite/tests/indexed-types/should_fail/T1900.stderr
+1
-4
testsuite/tests/indexed-types/should_fail/T2544.hs
testsuite/tests/indexed-types/should_fail/T2544.hs
+14
-1
testsuite/tests/indexed-types/should_fail/T2544.stderr
testsuite/tests/indexed-types/should_fail/T2544.stderr
+2
-6
testsuite/tests/indexed-types/should_fail/T2627b.hs
testsuite/tests/indexed-types/should_fail/T2627b.hs
+8
-2
testsuite/tests/indexed-types/should_fail/T2664.hs
testsuite/tests/indexed-types/should_fail/T2664.hs
+17
-0
testsuite/tests/indexed-types/should_fail/T2664.stderr
testsuite/tests/indexed-types/should_fail/T2664.stderr
+9
-13
testsuite/tests/indexed-types/should_fail/T2693.stderr
testsuite/tests/indexed-types/should_fail/T2693.stderr
+6
-6
testsuite/tests/indexed-types/should_fail/T4093a.hs
testsuite/tests/indexed-types/should_fail/T4093a.hs
+31
-0
testsuite/tests/indexed-types/should_fail/T4093a.stderr
testsuite/tests/indexed-types/should_fail/T4093a.stderr
+7
-10
testsuite/tests/indexed-types/should_fail/T4174.stderr
testsuite/tests/indexed-types/should_fail/T4174.stderr
+24
-3
testsuite/tests/indexed-types/should_fail/T4179.stderr
testsuite/tests/indexed-types/should_fail/T4179.stderr
+3
-8
testsuite/tests/indexed-types/should_fail/T4272.stderr
testsuite/tests/indexed-types/should_fail/T4272.stderr
+1
-5
testsuite/tests/indexed-types/should_fail/T5439.stderr
testsuite/tests/indexed-types/should_fail/T5439.stderr
+25
-26
testsuite/tests/indexed-types/should_fail/T5934.stderr
testsuite/tests/indexed-types/should_fail/T5934.stderr
+7
-8
testsuite/tests/indexed-types/should_fail/T7010.stderr
testsuite/tests/indexed-types/should_fail/T7010.stderr
+1
-1
testsuite/tests/indexed-types/should_fail/T7729.stderr
testsuite/tests/indexed-types/should_fail/T7729.stderr
+12
-16
testsuite/tests/indexed-types/should_fail/T7729a.hs
testsuite/tests/indexed-types/should_fail/T7729a.hs
+41
-0
testsuite/tests/indexed-types/should_fail/T7729a.stderr
testsuite/tests/indexed-types/should_fail/T7729a.stderr
+2
-6
testsuite/tests/indexed-types/should_fail/T7786.hs
testsuite/tests/indexed-types/should_fail/T7786.hs
+1
-1
testsuite/tests/indexed-types/should_fail/T8129.stdout
testsuite/tests/indexed-types/should_fail/T8129.stdout
+2
-2
testsuite/tests/indexed-types/should_fail/T8227.hs
testsuite/tests/indexed-types/should_fail/T8227.hs
+14
-9
testsuite/tests/indexed-types/should_fail/T8227.stderr
testsuite/tests/indexed-types/should_fail/T8227.stderr
+16
-4
testsuite/tests/indexed-types/should_fail/T8518.stderr
testsuite/tests/indexed-types/should_fail/T8518.stderr
+13
-35
testsuite/tests/indexed-types/should_fail/T9036.stderr
testsuite/tests/indexed-types/should_fail/T9036.stderr
+2
-2
testsuite/tests/numeric/should_compile/T7116.stdout
testsuite/tests/numeric/should_compile/T7116.stdout
+14
-14
testsuite/tests/parser/should_compile/T2245.stderr
testsuite/tests/parser/should_compile/T2245.stderr
+5
-5
testsuite/tests/perf/compiler/T5837.hs
testsuite/tests/perf/compiler/T5837.hs
+14
-0
testsuite/tests/perf/compiler/T5837.stderr
testsuite/tests/perf/compiler/T5837.stderr
+155
-155
testsuite/tests/polykinds/T7438.stderr
testsuite/tests/polykinds/T7438.stderr
+19
-19
testsuite/tests/polykinds/T8132.stderr
testsuite/tests/polykinds/T8132.stderr
+5
-4
testsuite/tests/rebindable/rebindable6.stderr
testsuite/tests/rebindable/rebindable6.stderr
+4
-8
testsuite/tests/roles/should_compile/Roles13.stderr
testsuite/tests/roles/should_compile/Roles13.stderr
+6
-8
testsuite/tests/roles/should_compile/T8958.stderr
testsuite/tests/roles/should_compile/T8958.stderr
+36
-41
testsuite/tests/simplCore/should_compile/EvalTest.stdout
testsuite/tests/simplCore/should_compile/EvalTest.stdout
+1
-1
testsuite/tests/simplCore/should_compile/T3717.stderr
testsuite/tests/simplCore/should_compile/T3717.stderr
+4
-4
testsuite/tests/simplCore/should_compile/T3772.stdout
testsuite/tests/simplCore/should_compile/T3772.stdout
+6
-7
testsuite/tests/simplCore/should_compile/T4201.stdout
testsuite/tests/simplCore/should_compile/T4201.stdout
+1
-1
testsuite/tests/simplCore/should_compile/T4306.stdout
testsuite/tests/simplCore/should_compile/T4306.stdout
+1
-1
testsuite/tests/simplCore/should_compile/T4908.stderr
testsuite/tests/simplCore/should_compile/T4908.stderr
+14
-27
testsuite/tests/simplCore/should_compile/T4918.stdout
testsuite/tests/simplCore/should_compile/T4918.stdout
+2
-2
testsuite/tests/simplCore/should_compile/T4930.stderr
testsuite/tests/simplCore/should_compile/T4930.stderr
+13
-15
testsuite/tests/simplCore/should_compile/T5366.stdout
testsuite/tests/simplCore/should_compile/T5366.stdout
+1
-1
testsuite/tests/simplCore/should_compile/T6056.stderr
testsuite/tests/simplCore/should_compile/T6056.stderr
+2
-1
testsuite/tests/simplCore/should_compile/T7360.stderr
testsuite/tests/simplCore/should_compile/T7360.stderr
+10
-10
testsuite/tests/simplCore/should_compile/T7865.stdout
testsuite/tests/simplCore/should_compile/T7865.stdout
+4
-4
testsuite/tests/simplCore/should_compile/T8832.stdout
testsuite/tests/simplCore/should_compile/T8832.stdout
+10
-10
testsuite/tests/simplCore/should_compile/T8832.stdout-ws-32
testsuite/tests/simplCore/should_compile/T8832.stdout-ws-32
+8
-8
testsuite/tests/simplCore/should_compile/T9400.stderr
testsuite/tests/simplCore/should_compile/T9400.stderr
+15
-15
testsuite/tests/simplCore/should_compile/rule2.stderr
testsuite/tests/simplCore/should_compile/rule2.stderr
+1
-1
testsuite/tests/simplCore/should_compile/spec-inline.stderr
testsuite/tests/simplCore/should_compile/spec-inline.stderr
+39
-48
testsuite/tests/th/T3319.stderr
testsuite/tests/th/T3319.stderr
+8
-8
testsuite/tests/th/T3600.stderr
testsuite/tests/th/T3600.stderr
+5
-5
testsuite/tests/th/T5217.stderr
testsuite/tests/th/T5217.stderr
+9
-9
testsuite/tests/th/all.T
testsuite/tests/th/all.T
+3
-3
testsuite/tests/typecheck/should_compile/FD1.stderr
testsuite/tests/typecheck/should_compile/FD1.stderr
+1
-5
testsuite/tests/typecheck/should_compile/FD2.stderr
testsuite/tests/typecheck/should_compile/FD2.stderr
+1
-12
testsuite/tests/typecheck/should_compile/T3346.hs
testsuite/tests/typecheck/should_compile/T3346.hs
+2
-2
testsuite/tests/typecheck/should_compile/T8474.hs
testsuite/tests/typecheck/should_compile/T8474.hs
+2
-0
testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs
testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs
+2
-9
testsuite/tests/typecheck/should_compile/tc231.hs
testsuite/tests/typecheck/should_compile/tc231.hs
+1
-1
testsuite/tests/typecheck/should_compile/tc231.stderr
testsuite/tests/typecheck/should_compile/tc231.stderr
+19
-19
testsuite/tests/typecheck/should_fail/ContextStack2.hs
testsuite/tests/typecheck/should_fail/ContextStack2.hs
+44
-0
testsuite/tests/typecheck/should_fail/ContextStack2.stderr
testsuite/tests/typecheck/should_fail/ContextStack2.stderr
+3
-3
testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
testsuite/tests/typecheck/should_fail/FDsFromGivens.stderr
+14
-12
testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
...suite/tests/typecheck/should_fail/FrozenErrorTests.stderr
+2
-2
testsuite/tests/typecheck/should_fail/T1899.stderr
testsuite/tests/typecheck/should_fail/T1899.stderr
+6
-4
testsuite/tests/typecheck/should_fail/T2688.stderr
testsuite/tests/typecheck/should_fail/T2688.stderr
+1
-4
testsuite/tests/typecheck/should_fail/T5236.stderr
testsuite/tests/typecheck/should_fail/T5236.stderr
+10
-10
testsuite/tests/typecheck/should_fail/T5300.stderr
testsuite/tests/typecheck/should_fail/T5300.stderr
+2
-2
testsuite/tests/typecheck/should_fail/T5684.stderr
testsuite/tests/typecheck/should_fail/T5684.stderr
+84
-4
testsuite/tests/typecheck/should_fail/T5853.stderr
testsuite/tests/typecheck/should_fail/T5853.stderr
+1
-1
testsuite/tests/typecheck/should_fail/T7748a.stderr
testsuite/tests/typecheck/should_fail/T7748a.stderr
+18
-15
testsuite/tests/typecheck/should_fail/T8142.stderr
testsuite/tests/typecheck/should_fail/T8142.stderr
+10
-28
testsuite/tests/typecheck/should_fail/T8450.hs
testsuite/tests/typecheck/should_fail/T8450.hs
+3
-0
testsuite/tests/typecheck/should_fail/T8450.stderr
testsuite/tests/typecheck/should_fail/T8450.stderr
+9
-13
testsuite/tests/typecheck/should_fail/T8883.stderr
testsuite/tests/typecheck/should_fail/T8883.stderr
+8
-8
testsuite/tests/typecheck/should_fail/T9305.stderr
testsuite/tests/typecheck/should_fail/T9305.stderr
+1
-1
testsuite/tests/typecheck/should_fail/mc21.stderr
testsuite/tests/typecheck/should_fail/mc21.stderr
+9
-9
testsuite/tests/typecheck/should_fail/mc22.stderr
testsuite/tests/typecheck/should_fail/mc22.stderr
+21
-22
testsuite/tests/typecheck/should_fail/mc25.stderr
testsuite/tests/typecheck/should_fail/mc25.stderr
+18
-18
testsuite/tests/typecheck/should_fail/tcfail019.stderr
testsuite/tests/typecheck/should_fail/tcfail019.stderr
+1
-1
testsuite/tests/typecheck/should_fail/tcfail067.stderr
testsuite/tests/typecheck/should_fail/tcfail067.stderr
+2
-2
testsuite/tests/typecheck/should_fail/tcfail068.hs
testsuite/tests/typecheck/should_fail/tcfail068.hs
+1
-1
testsuite/tests/typecheck/should_fail/tcfail068.stderr
testsuite/tests/typecheck/should_fail/tcfail068.stderr
+5
-30
testsuite/tests/typecheck/should_fail/tcfail072.stderr
testsuite/tests/typecheck/should_fail/tcfail072.stderr
+2
-2
testsuite/tests/typecheck/should_fail/tcfail131.stderr
testsuite/tests/typecheck/should_fail/tcfail131.stderr
+1
-4
testsuite/tests/typecheck/should_fail/tcfail143.stderr
testsuite/tests/typecheck/should_fail/tcfail143.stderr
+8
-8
testsuite/tests/typecheck/should_fail/tcfail171.stderr
testsuite/tests/typecheck/should_fail/tcfail171.stderr
+2
-2
testsuite/tests/typecheck/should_fail/tcfail186.stderr
testsuite/tests/typecheck/should_fail/tcfail186.stderr
+8
-8
testsuite/tests/typecheck/should_fail/tcfail201.stderr
testsuite/tests/typecheck/should_fail/tcfail201.stderr
+20
-19
testsuite/tests/typecheck/should_fail/tcfail204.stderr
testsuite/tests/typecheck/should_fail/tcfail204.stderr
+4
-3
testsuite/tests/typecheck/should_run/T5751.hs
testsuite/tests/typecheck/should_run/T5751.hs
+1
-1
testsuite/tests/typecheck/should_run/tcrun036.hs
testsuite/tests/typecheck/should_run/tcrun036.hs
+6
-6
No files found.
testsuite/tests/deSugar/should_compile/T2431.stderr
View file @
5479ae0a
...
...
@@ -2,7 +2,7 @@
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 8, types: 19, coercions: 1}
T2431.$WRefl [InlPrag=INLINE] :: forall a. a
T2431.
:~: a
T2431.$WRefl [InlPrag=INLINE] :: forall a. a :~: a
[GblId[DataConWrapper],
Caf=NoCafRefs,
Str=DmdType,
...
...
@@ -12,12 +12,9 @@ T2431.$WRefl [InlPrag=INLINE] :: forall a. a T2431.:~: a
Tmpl= \ (@ a) -> T2431.Refl @ a @ a @~ <a>_N}]
T2431.$WRefl = \ (@ a) -> T2431.Refl @ a @ a @~ <a>_N
T2431.absurd
:: forall a. GHC.Types.Int T2431.:~: GHC.Types.Bool -> a
absurd :: forall a. Int :~: Bool -> a
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <L,U>b]
T2431.absurd =
\ (@ a) (x :: GHC.Types.Int T2431.:~: GHC.Types.Bool) ->
case x of _ [Occ=Dead] { }
absurd = \ (@ a) (x :: Int :~: Bool) -> case x of _ [Occ=Dead] { }
testsuite/tests/deriving/should_fail/T9071.stderr
View file @
5479ae0a
...
...
@@ -2,7 +2,7 @@
[2 of 2] Compiling T9071 ( T9071.hs, T9071.o )
T9071.hs:7:37:
No instance for (Functor
K
)
No instance for (Functor
Mu
)
arising from the first field of ‘F’ (type ‘Mu (K a)’)
Possible fix:
use a standalone 'deriving instance' declaration,
...
...
testsuite/tests/deriving/should_fail/T9071_2.stderr
View file @
5479ae0a
T9071_2.hs:7:40:
No instance for (Functor
Mu
)
No instance for (Functor
K1
)
arising from the first field of ‘F1’ (type ‘Mu (K1 a)’)
Possible fix:
use a standalone 'deriving instance' declaration,
...
...
testsuite/tests/gadt/T3169.stderr
View file @
5479ae0a
T3169.hs:13:22:
Could not deduce (elt ~ Map b elt)
from the context (Key a, Key b)
bound by the instance declaration at T3169.hs:10:10-36
Couldn't match type ‘elt’ with ‘Map b elt’
‘elt’ is a rigid type variable bound by
the type signature for
lookup :: (a, b) -> Map (a, b) elt -> Maybe elt
...
...
testsuite/tests/gadt/T7293.stderr
View file @
5479ae0a
T7293.hs:24:5:
Couldn't match type ‘'
False’ with ‘'Tru
e’
Couldn't match type ‘'
True’ with ‘'Fals
e’
Inaccessible code in
a pattern with constructor
Nil :: forall a. Vec a 'Zero,
...
...
testsuite/tests/gadt/T7294.stderr
View file @
5479ae0a
T7294.hs:25:5: Warning:
Couldn't match type ‘'
False’ with ‘'Tru
e’
Couldn't match type ‘'
True’ with ‘'Fals
e’
Inaccessible code in
a pattern with constructor
Nil :: forall a. Vec a 'Zero,
...
...
testsuite/tests/gadt/gadt21.stderr
View file @
5479ae0a
gadt21.hs:21:60:
Could not deduce (Ord a1) arising from a use of ‘f’
from the context (a ~ Set a1)
bound by a pattern with constructor
TypeSet :: forall a. Type a -> Type (Set a),
in an equation for ‘withOrdDynExpr’
at gadt21.hs:21:35-43
Possible fix:
add (Ord a1) to the context of
the data constructor ‘TypeSet’
or the data constructor ‘DynExpr’
or the type signature for
withOrdDynExpr :: DynExpr
-> (forall a. Ord a => Expr a -> b) -> Maybe b
In the first argument of ‘Just’, namely ‘(f e)’
In the expression: Just (f e)
In an equation for ‘withOrdDynExpr’:
withOrdDynExpr (DynExpr e@(Const (TypeSet _) _)) f = Just (f e)
gadt21.hs:21:60:
Could not deduce (Ord a1) arising from a use of ‘f’
from the context (a ~ Set a1)
bound by a pattern with constructor
TypeSet :: forall a. Type a -> Type (Set a),
in an equation for ‘withOrdDynExpr’
at gadt21.hs:21:35-43
Possible fix:
add (Ord a1) to the context of the data constructor ‘TypeSet’
In the first argument of ‘Just’, namely ‘(f e)’
In the expression: Just (f e)
In an equation for ‘withOrdDynExpr’:
withOrdDynExpr (DynExpr e@(Const (TypeSet _) _)) f = Just (f e)
testsuite/tests/ghc-api/apirecomp001/apirecomp001.stderr
View file @
5479ae0a
...
...
@@ -3,14 +3,14 @@ B.hs:4:1: Warning:
Top-level binding with no type signature:
answer_to_live_the_universe_and_everything :: Int
B.hs:5:1
3
: Warning:
B.hs:5:1
2
: Warning:
Defaulting the following constraint(s) to type ‘Integer’
(Num a0) arising from the literal ‘1’ at B.hs:5:13
(Enum a0)
arising from the arithmetic sequence ‘1 .. 23 * 2’ at B.hs:5:12-20
In the expression: 1
(Num a0) arising from the literal ‘1’ at B.hs:5:13
In the first argument of ‘length’, namely ‘[1 .. 23 * 2]’
In the first argument of ‘(-)’, namely ‘length [1 .. 23 * 2]’
In the expression: length [1 .. 23 * 2] - 4
A.hs:7:1: Warning:
Top-level binding with no type signature: main :: IO ()
...
...
@@ -19,14 +19,14 @@ B.hs:4:1: Warning:
Top-level binding with no type signature:
answer_to_live_the_universe_and_everything :: Int
B.hs:5:1
3
: Warning:
B.hs:5:1
2
: Warning:
Defaulting the following constraint(s) to type ‘Integer’
(Num a0) arising from the literal ‘1’ at B.hs:5:13
(Enum a0)
arising from the arithmetic sequence ‘1 .. 23 * 2’ at B.hs:5:12-20
In the expression: 1
(Num a0) arising from the literal ‘1’ at B.hs:5:13
In the first argument of ‘length’, namely ‘[1 .. 23 * 2]’
In the first argument of ‘(-)’, namely ‘length [1 .. 23 * 2]’
In the expression: length [1 .. 23 * 2] - 4
A.hs:7:1: Warning:
Top-level binding with no type signature: main :: IO ()
testsuite/tests/ghci.debugger/scripts/break026.stdout
View file @
5479ae0a
Stopped at break026.hs:(5,1)-(7,35)
_result :: t
= _
Stopped at break026.hs:5:16-22
_result :: Integer = _
c :: Integer = 0
go :: Integer -> [t
1] -> Integer = _
xs :: [t
1] = _
Stopped at break026.hs:(6,9)-(7,35)
_result :: t
= _
f :: t
-> t1 -> t = _
Stopped at break026.hs:7:23-35
_result :: Integer = _
c :: Integer = 0
f :: Integer -> Integer -> Integer = _
x :: Integer = 1
xs :: [Integer] = _
Stopped at break026.hs:(6,9)-(7,35)
_result :: t
= _
f :: t
-> t1 -> t = _
Stopped at break026.hs:7:23-35
_result :: t
= _
c :: t
= _
f :: t
-> Integer -> t = _
x :: Integer = 2
xs :: [Integer] = _
c = 1
Stopped at break026.hs:(5,1)-(7,35)
_result :: t
= _
Stopped at break026.hs:5:16-22
_result :: Integer = _
c :: Integer = 0
go :: Integer -> [t
1] -> Integer = _
xs :: [t
1] = _
Stopped at break026.hs:(6,9)-(7,35)
_result :: t
= _
f :: t
-> t1 -> t = _
Stopped at break026.hs:7:23-35
_result :: Integer = _
c :: Integer = 0
f :: Integer -> Integer -> Integer = _
x :: Integer = 1
xs :: [Integer] = _
Stopped at break026.hs:(6,9)-(7,35)
_result :: t
= _
f :: t
-> t1 -> t = _
Stopped at break026.hs:7:23-35
_result :: t
= _
c :: t
= _
f :: t
-> Integer -> t = _
x :: Integer = 2
xs :: [Integer] = _
Stopped at break026.hs:7:27-31
_result :: Integer = _
c :: Integer = 0
f :: Integer -> Integer -> Integer = _
x :: Integer = 1
()
1
Stopped at break026.hs:(5,1)-(7,35)
_result :: t
1 = _
Stopped at break026.hs:5:16-22
_result :: Integer = _
c :: Integer = 0
go :: Integer -> [t
] -> Integer = _
xs :: [t
] = _
Stopped at break026.hs:(6,9)-(7,35)
_result :: t
1 = _
f :: t
1 -> t -> t1 = _
Stopped at break026.hs:7:23-35
_result :: Integer = _
c :: Integer = 0
f :: Integer -> Integer -> Integer = _
x :: Integer = 1
xs :: [Integer] = _
Stopped at break026.hs:(6,9)-(7,35)
_result :: t
1 = _
f :: t
1 -> t -> t1 = _
Stopped at break026.hs:7:23-35
_result :: t
1 = _
c :: t
1 = _
f :: t
1 -> Integer -> t1 = _
x :: Integer = 2
xs :: [Integer] = _
c = 1
Stopped at break026.hs:(5,1)-(7,35)
_result :: t
1 = _
Stopped at break026.hs:5:16-22
_result :: Integer = _
c :: Integer = 0
go :: Integer -> [t
] -> Integer = _
xs :: [t
] = _
Stopped at break026.hs:(6,9)-(7,35)
_result :: t
1 = _
f :: t
1 -> t -> t1 = _
Stopped at break026.hs:7:23-35
_result :: Integer = _
c :: Integer = 0
f :: Integer -> Integer -> Integer = _
x :: Integer = 1
xs :: [Integer] = _
Stopped at break026.hs:(6,9)-(7,35)
_result :: t
1 = _
f :: t
1 -> t -> t1 = _
Stopped at break026.hs:7:23-35
_result :: t
1 = _
c :: t
1 = _
f :: t
1 -> Integer -> t1 = _
x :: Integer = 2
xs :: [Integer] = _
Stopped at break026.hs:7:27-31
_result :: Integer = _
c :: Integer = 0
f :: Integer -> Integer -> Integer = _
x :: Integer = 1
()
1
testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs
View file @
5479ae0a
...
...
@@ -41,6 +41,14 @@ class Mergeable a b where
type
MergerType
a
b
merger
::
a
->
b
->
MergerType
a
b
{-
merge ::
forall a b.
(Merger (MergerType a b), Mergeable a b,
UnmergedLeft (MergerType a b) ~ a,
UnmergedRight (MergerType a b) ~ b) =>
a -> b -> Merged (MergerType a b)
-}
merge
x
y
=
mkMerge
(
merger
x
y
)
x
y
data
TakeRight
a
...
...
@@ -117,4 +125,4 @@ instance
type
Merged
(
RightHeadFirst
h1
t1
h2
t2
)
=
h2
:*
Merged
(
MergerType
(
h1
:*
t1
)
t2
)
type
UnmergedLeft
(
RightHeadFirst
h1
t1
h2
t2
)
=
h1
:*
t1
type
UnmergedRight
(
RightHeadFirst
h1
t1
h2
t2
)
=
h2
:*
t2
mkMerge
_
(
h1
:*
t1
)
(
h2
:*
t2
)
=
h2
:*
mkMerge
(
merger
(
h1
:*
t1
)
t2
)
(
h1
:*
t1
)
t2
\ No newline at end of file
mkMerge
_
(
h1
:*
t1
)
(
h2
:*
t2
)
=
h2
:*
mkMerge
(
merger
(
h1
:*
t1
)
t2
)
(
h1
:*
t1
)
t2
testsuite/tests/indexed-types/should_compile/PushInAsGivens.stderr
0 → 100644
View file @
5479ae0a
\ No newline at end of file
testsuite/tests/indexed-types/should_compile/PushedInAsGivens.hs
View file @
5479ae0a
...
...
@@ -8,7 +8,7 @@ type family F a
bar
y
=
let
foo
::
(
F
Int
~
[
a
])
=>
a
->
Int
foo
x
=
length
[
x
,
y
]
in
(
y
,
foo
y
)
in
(
y
,
foo
y
)
-- This example demonstrates why we need to push in
...
...
@@ -20,5 +20,12 @@ bar y = let foo :: (F Int ~ [a]) => a -> Int
-- Given/Solved, it will be discarded when we meet the given (F Int ~ [a]) and
-- we will not be able to solve the implication constraint.
-- Oct 14: actually this example is _really_ strange, and doesn't illustrate
-- the real issue in Trac #4935, for which there is a separate test
--
-- The example here requires us to infer a type
-- bar :: F Int ~ [a] => ...
-- which is a strange type to quantify over; better to complain about
-- having no instance for F Int.
testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
0 → 100644
View file @
5479ae0a
PushedInAsGivens.hs:10:31:
Couldn't match expected type ‘a1’ with actual type ‘a’
because type variable ‘a1’ would escape its scope
This (rigid, skolem) type variable is bound by
the type signature for foo :: (F Int ~ [a1]) => a1 -> Int
at PushedInAsGivens.hs:9:20-44
Relevant bindings include
x :: a1 (bound at PushedInAsGivens.hs:10:17)
foo :: a1 -> Int (bound at PushedInAsGivens.hs:10:13)
y :: a (bound at PushedInAsGivens.hs:9:5)
bar :: a -> (a, Int) (bound at PushedInAsGivens.hs:9:1)
In the expression: y
In the first argument of ‘length’, namely ‘[x, y]’
PushedInAsGivens.hs:11:15:
Couldn't match expected type ‘[a]’ with actual type ‘F Int’
Relevant bindings include
y :: a (bound at PushedInAsGivens.hs:9:5)
bar :: a -> (a, Int) (bound at PushedInAsGivens.hs:9:1)
In the expression: foo y
In the expression: (y, foo y)
In the expression:
let
foo :: (F Int ~ [a]) => a -> Int
foo x = length [...]
in (y, foo y)
testsuite/tests/indexed-types/should_compile/Simple13.hs
View file @
5479ae0a
...
...
@@ -16,3 +16,33 @@ mkf p = undefined
foo
::
a
~
[
F
a
]
=>
a
->
a
foo
p
=
same
p
(
mkf
p
)
{- p :: a
[G] g : a ~ [F a]
[W] w : a ~ [F a]
--->
g' = g;[x] g'=aq4
[G] g' : a ~ [fsk] g=aqW
[W] x : F a ~ fsk x=aq3
[W] w : a ~ [F a]
--> subst a
x = F g' ; x2
[W] x2 : F fsk ~ fsk x2=aq5
--> (subst a)
w = g' ; w2
[W] w2 : [fsk] ~ [F a]
--> decompose
w2 = [w3]
[W] w3 : fsk ~ F a
cycle is
aq3 = Sym (F aq4) ; aq5 x = Sym (F g') ; x2
aq4 = apw ; aq3 g' =
-}
testsuite/tests/indexed-types/should_compile/Simple8.hs
View file @
5479ae0a
...
...
@@ -8,7 +8,7 @@ type family F a
-- works if one of the duplicates is removed.
type
instance
F
()
=
()
type
instance
F
()
=
()
--
type instance F () = ()
foo
::
F
()
->
()
foo
x
=
x
...
...
testsuite/tests/indexed-types/should_compile/T3017.stderr
View file @
5479ae0a
TYPE SIGNATURES
emptyL :: forall a. ListColl a
test2 ::
forall c t t1. (
Coll c, Num t1, Num t
, Elem c ~ (t, t1)) => c -> c
forall c t t1. (
Num t, Num t1, Coll c
, Elem c ~ (t, t1)) => c -> c
TYPE CONSTRUCTORS
class Coll c where
type family Elem c :: * open
...
...
testsuite/tests/indexed-types/should_compile/T3208b.stderr
View file @
5479ae0a
T3208b.hs:15:10:
Could not deduce (STerm o0 ~
STerm a
)
Could not deduce (STerm o0 ~
OTerm o0
)
from the context (OTerm a ~ STerm a, OBJECT a, SUBST a)
bound by the type signature for
fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
at T3208b.hs:14:9-56
NB: ‘STerm’ is a type function, and may not be injective
The type variable ‘o0’ is ambiguous
Expected type: STerm o0
Actual type: OTerm o0
Relevant bindings include
f :: a (bound at T3208b.hs:15:6)
fce' :: a -> c (bound at T3208b.hs:15:1)
In the expression: fce (apply f)
In an equation for ‘fce'’: fce' f = fce (apply f)
T3208b.hs:15:15:
Could not deduce (OTerm o0 ~
S
Term a)
Could not deduce (OTerm o0 ~
O
Term a)
from the context (OTerm a ~ STerm a, OBJECT a, SUBST a)
bound by the type signature for
fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c
at T3208b.hs:14:9-56
NB: ‘OTerm’ is a type function, and may not be injective
The type variable ‘o0’ is ambiguous
Expected type: STerm a
Actual type: OTerm o0
Relevant bindings include
f :: a (bound at T3208b.hs:15:6)
fce' :: a -> c (bound at T3208b.hs:15:1)
...
...
testsuite/tests/indexed-types/should_compile/T3826.hs
View file @
5479ae0a
...
...
@@ -6,10 +6,56 @@ class C a where
type
E
a
c
::
E
a
->
a
->
a
data
T
a
=
T
a
data
T
a
=
MkT
a
-- MkT :: a -> T a
instance
C
(
T
a
)
where
type
E
(
T
a
)
=
a
c
x
(
T
_
)
=
T
x
instance
C
(
T
b
)
where
type
E
(
T
b
)
=
b
c
x
(
MkT
_
)
=
MkT
x
f
t
@
(
MkT
x
)
=
c
x
t
{- c :: E alpha -> alpha -> alpha
t :: T beta
x :: beta
f :: T beta -> gamma
[W] C alpha
[W] E alpha ~ beta
[W] alpha ~ T beta
[W] gamma ~ alpha
---> beta = t_aqf alpha = t_aqg
alpha := T beta
gamma := alpha
[W] E (T beta) ~ beta
-->
[W] ufsk ~ beta
[W] E (T beta) ~ ufsk
--> (swap and subst)
beta := ufsk
[W] x : E (T ufsk) ~ ufsk (do not rewrite RHS)
take a step ax: E (T beta) ~ beta
-->
[W] ufsk
--------------------------
But what about this?
--------------------------
axiom F [a] = F [a]
x : F [a] ~ fsk
step
ax : F [a] ~ F [a]
flatten
ax ; x : F [a] ~ fsk
x = ax ; x Oh dear!
-}
f
t
@
(
T
x
)
=
c
x
t
testsuite/tests/indexed-types/should_compile/T4494.hs
View file @
5479ae0a
...
...
@@ -10,3 +10,23 @@ bar = error "urk"
call
::
F
Bool
->
Int
call
x
=
bar
(
\
_
->
x
)
(
undefined
::
H
(
F
Bool
))
{-
[W] H (F Bool) ~ H alpha
[W] alpha ~ F Bool
-->
F Bool ~ fuv0
H fuv0 ~ fuv1
H alpha ~ fuv2
fuv1 ~ fuv2
alpha ~ fuv0
flatten
~~~~~~~
fuv0 := alpha
fuv1 := fuv2
alpha := F Bool
-}
testsuite/tests/indexed-types/should_compile/T7804.hs
View file @
5479ae0a
...
...
@@ -8,3 +8,15 @@ data Proxy a = P
sDFMap
::
(
forall
a
.
Proxy
f
->
Proxy
a
->
Proxy
(
F
f
a
))
->
Int
sDFMap
_
=
3
{-
flat cache
[G] F f_aqh aqj ~ fsk_aqp
[G] F f_aqg aqj ~ fsk_aqq
[W] aqk : f_aqh[2] ~ f_aqg
[w] aql : fsk_aqp ~ fsk_aqq
[G] F f_agh a_aqj ~ F f_aqg
-}
\ No newline at end of file
testsuite/tests/indexed-types/should_compile/all.T
View file @
5479ae0a
...
...
@@ -170,7 +170,7 @@ test('T4981-V2', normal, compile, [''])
test
('
T4981-V3
',
normal
,
compile
,
[''])
test
('
T5002
',
normal
,
compile
,
[''])
test
('
PushedInAsGivens
',
normal
,
compile
,
[''])
test
('
PushedInAsGivens
',
normal
,
compile
_fail
,
[''])
# Superclass equalities
test
('
T4338
',
normal
,
compile
,
[''])
...
...
testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.hs
View file @
5479ae0a
{-# LANGUAGE TypeFamilies, FunctionalDependencies, FlexibleContexts, GADTs, ScopedTypeVariables #-}
module
ExtraTcsUntch
where
module
ExtraTcsUntch
where
class
C
x
y
|
x
->
y
where
class
C
x
y
|
x
->
y
where
op
::
x
->
y
->
()
instance
C
[
a
]
[
a
]
...
...
@@ -13,22 +13,24 @@ type family F a :: *
h
::
F
Int
->
()
h
=
undefined
data
TEx
where
TEx
::
a
->
TEx
data
TEx
where
TEx
::
a
->
TEx
f
x
=
f
x
=
let
g1
::
forall
b
.
b
->
()
g1
_
=
h
[
x
]
g2
z
=
case
z
of
TEx
y
->
(
h
[[
undefined
]],
op
x
[
y
])
in
(
g1
'3'
,
g2
undefined
)
{- This example comes from Note [Extra TcS Untouchables] in TcSimplify. It demonstrates
{- This example comes from Note [Extra TcS Untouchables] in TcSimplify. It demonstrates
why when floating equalities out of an implication constraint we must record the free
variables of the equalities as untouchables. With GHC 7.4.1 this program gives a Core
Lint error because of an existential escaping.
Lint error because of an existential escaping.
assuming x:beta
...
...
@@ -39,16 +41,21 @@ f x =
{- Assume x:beta
From g1 we get (forall b. F Int ~ [beta])
From g2 we get (forall c. 0 => F Int ~ [[alpha]] /\ C beta [c])
Floating we get
F Int ~ [beta], F Int ~ [[alpha]], alpha ~ alpha', forall c. C beta [c]
= { alpha := alpha' }
= beta ~ [alpha'], F Int ~ [[alpha']], forall c. C beta [c]
= { beta := [alpha']
F Int ~ [[alpha']], forall c. C [alpha'] [c]
= F Int ~ [[alpha']], forall c. (C [alpha'] [c], alpha' ~ c)
From g1 we get [W] (forall b. F Int ~ [beta])
From g2 we get [W] (forall c. 0 => F Int ~ [[alpha]] /\ C beta [c])