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
a325b73c
Commit
a325b73c
authored
Jul 23, 2001
by
simonpj
Browse files
[project @ 2001-07-23 09:45:08 by simonpj]
Add tc131
parent
92ee7edc
Changes
2
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/typecheck/should_compile/all.T
View file @
a325b73c
...
...
@@ -134,3 +134,4 @@ test "tc127" { myvtc("") }
test
"
tc128
"
{
myvtc
("")
}
test
"
tc129
"
{
myvtc
("")
}
test
"
tc130
"
{
myvtc
("")
}
test
"
tc131
"
{
myvtc
("")
}
testsuite/tests/ghc-regress/typecheck/should_compile/tc131.hs
0 → 100644
View file @
a325b73c
{-# OPTIONS -fglasgow-exts #-}
-- !!! Typechecking of functional dependencies
-- Showed up (another) bug in the newtype-squashing machinery
module
ShouldCompile
where
class
Split2
a
b
|
a
->
b
,
b
->
a
where
combine2
::
(
b
,
b
)
->
a
class
Split4
a
b
|
a
->
b
,
b
->
a
where
combine4
::
(
b
,
b
)
->
a
newtype
Word16
=
Word16
Int
newtype
Word32
=
Word32
Int
newtype
Word64
=
Word64
Int
instance
Split2
Word32
Word16
where
combine2
=
undefined
instance
Split2
Word64
Word32
where
combine2
a
=
undefined
instance
Split4
Word64
Word16
where
combine4
(
a
,
b
)
=
combine2
(
(
combine2
(
a
,
b
)),
combine2
(
a
,
b
))
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