Skip to content
GitLab
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
266dc32e
Commit
266dc32e
authored
Oct 05, 2006
by
rl@cse.unsw.edu.au
Browse files
Test separate compilation with indexed types
parent
b504085d
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/indexed-types/Ind2_help.hs
0 → 100644
View file @
266dc32e
{-# OPTIONS -findexed-types #-}
module
Ind2_help
where
class
C
a
where
data
T
a
::
*
unT
::
T
a
->
a
mkT
::
a
->
T
a
instance
(
C
a
,
C
b
)
=>
C
(
a
,
b
)
where
data
T
(
a
,
b
)
=
TProd
(
T
a
)
(
T
b
)
unT
(
TProd
x
y
)
=
(
unT
x
,
unT
y
)
mkT
(
x
,
y
)
=
TProd
(
mkT
x
)
(
mkT
y
)
testsuite/tests/ghc-regress/indexed-types/all.T
View file @
266dc32e
test
('
ind1
',
normal
,
compile
,
[''])
test
('
ind1
',
normal
,
compile
,
[''])
test
('
ind2
',
normal
,
multimod_compile
,
['
ind2
',
'
-v0
'])
clean
(['
Ind2_help.hi
',
'
Ind2_help.o
'])
testsuite/tests/ghc-regress/indexed-types/ind2.hs
0 → 100644
View file @
266dc32e
{-# OPTIONS -findexed-types #-}
module
ShouldCompile
where
import
Ind2_help
(
C
(
..
))
zipT
::
(
C
a
,
C
b
)
=>
T
a
->
T
b
->
T
(
a
,
b
)
zipT
x
y
=
mkT
(
unT
x
,
unT
y
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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