Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
5806d7e5
Commit
5806d7e5
authored
Feb 18, 2007
by
mnislaih
Browse files
Add test for type refinement with :print in GHCi
parent
7109d1e6
Changes
5
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/ghci.debugger/Test.hs
View file @
5806d7e5
...
...
@@ -33,3 +33,8 @@ instance Show Show1 where
type
Just1
=
Maybe
data
Unary
=
Unary
poly
::
a
->
()
poly
x
=
seq
x
()
\ No newline at end of file
testsuite/tests/ghc-regress/ghci.debugger/scripts/all.T
View file @
5806d7e5
...
...
@@ -16,4 +16,5 @@ test('print014', normal, ghci_script, ['print014.script'])
test
('
print015
',
normal
,
ghci_script
,
['
print015.script
'])
test
('
print016
',
normal
,
ghci_script
,
['
print016.script
'])
test
('
print017
',
normal
,
ghci_script
,
['
print017.script
'])
\ No newline at end of file
test
('
print017
',
normal
,
ghci_script
,
['
print017.script
'])
test
('
print018
',
normal
,
ghci_script
,
['
print018.script
'])
\ No newline at end of file
testsuite/tests/ghc-regress/ghci.debugger/scripts/print018.script
0 → 100644
View file @
5806d7e5
-- Test type reconstruction of Constants
-- Found by Bernie Pope
:set -fglasgow-exts
:set -fdebugging
:l ../Test
:break add Test.Test2 40
poly Unary
:p x
:t x
seq x ()
:p x
:t x
x
testsuite/tests/ghc-regress/ghci.debugger/scripts/print018.stderr
0 → 100644
View file @
5806d7e5
<interactive>:1:0:
No instance for (Show Unary)
arising from a use of `print' at <interactive>:1:0
Possible fix: add an instance declaration for (Show Unary)
In the expression: print it
In a 'do' expression: print it
testsuite/tests/ghc-regress/ghci.debugger/scripts/print018.stdout
0 → 100644
View file @
5806d7e5
Breakpoint set at main:Test.Test2:40:9
Stopped at a breakpoint in ../Test.hs:40. Local bindings in scope:
_result :: (), x :: a
../Test.hs:40:9-16> x = (_t1::a)
../Test.hs:40:9-16> x :: GHC.Base.Unknown
../Test.hs:40:9-16> ()
../Test.hs:40:9-16> x = Unary
../Test.hs:40:9-16> x :: Unary
../Test.hs:40:9-16> ../Test.hs:40:9-16> Returning to normal execution...
()
Write
Preview
Supports
Markdown
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