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
Alex D
GHC
Commits
e954c4d1
Commit
e954c4d1
authored
Dec 08, 2006
by
Pepe Iborra
Browse files
Added more tests with newtypes
parent
b358d0fd
Changes
8
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/ghci.debugger/Test.hs
View file @
e954c4d1
...
...
@@ -13,6 +13,18 @@ data List1 a = Nil | a :^ (List1 a)
newtype
MyInt
=
My
Int
deriving
(
Eq
,
Show
,
Num
,
Enum
)
newtype
MkT
a
=
MkT
a
deriving
(
Show
)
data
MkT2
a
=
MkT2
(
MkT
a
)
deriving
Show
data
Param2
s
r
=
P2
(
FakeSTRef
r
(
s
(
Param2
s
r
)))
|
P2Nil
data
FakeSTRef
r
s
=
Ref
s
testParam2
=
O
(
P2
(
Ref
P2Nil
))
infixr
5
:^
--test T{t=t1} = undefined
...
...
testsuite/tests/ghc-regress/ghci.debugger/scripts/all.T
View file @
e954c4d1
...
...
@@ -12,4 +12,8 @@ test('print010', normal, ghci_script, ['print010.script'])
test
('
print011
',
normal
,
ghci_script
,
['
print011.script
'])
test
('
print012
',
normal
,
ghci_script
,
['
print012.script
'])
test
('
print013
',
normal
,
ghci_script
,
['
print013.script
'])
test
('
print014
',
normal
,
ghci_script
,
['
print014.script
'])
\ No newline at end of file
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
testsuite/tests/ghc-regress/ghci.debugger/scripts/print015.script
0 → 100644
View file @
e954c4d1
-- Data.Set makes for a wondeful test of unboxed fields
:m +Data.Set
let s = fromList [1,2,3]
s
:p s
testsuite/tests/ghc-regress/ghci.debugger/scripts/print015.stdout
0 → 100644
View file @
e954c4d1
fromList [1,2,3]
s = fromList [1,2,3]
testsuite/tests/ghc-regress/ghci.debugger/scripts/print016.script
0 → 100644
View file @
e954c4d1
-- Type reconstruction with newtypes involved, more gruesome. Can't solve this one for now
:set -fglasgow-exts
:l ../Test
let a = map MkT [1..2]
:p a
seq _t1 ()
:p a
seq _t2 ()
:p a
\ No newline at end of file
testsuite/tests/ghc-regress/ghci.debugger/scripts/print016.stdout
0 → 100644
View file @
e954c4d1
a = (_t1::[MkT Integer])
()
a = [(_t2::MkT Integer) | (_t3::[MkT Integer])]
()
a = [MkT 1 | (_t4::[MkT Integer])]
testsuite/tests/ghc-regress/ghci.debugger/scripts/print017.script
0 → 100644
View file @
e954c4d1
-- More newtypes goodness
:set -fglasgow-exts
:l ../Test
let a = map (MkT2 . MkT) [1..2]
:p a
seq _t1 ()
:p a
seq _t2 ()
:p a
seq _t4 ()
:p a
testsuite/tests/ghc-regress/ghci.debugger/scripts/print017.stdout
0 → 100644
View file @
e954c4d1
a = (_t1::[MkT2 Integer])
()
a = [(_t2::MkT2 Integer) | (_t3::[MkT2 Integer])]
()
a = [MkT2 (_t4::MkT Integer) | (_t5::[MkT2 Integer])]
()
a = [MkT2 (MkT 1) | (_t6::[MkT2 Integer])]
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