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
accd944a
Commit
accd944a
authored
May 16, 2012
by
Simon Peyton Jones
Browse files
Test Trac
#6015
and
#6068
parent
d93dc415
Changes
5
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/polykinds/T6015a.hs
0 → 100644
View file @
accd944a
{-# LANGUAGE PolyKinds, KindSignatures, FunctionalDependencies, FlexibleInstances,
UndecidableInstances, TypeOperators, DataKinds, FlexibleContexts #-}
module
T6015a
where
import
Prelude
hiding
((
++
))
data
T
a
=
T
class
((
a
::
[
k
])
++
(
b
::
[
k
]))
(
c
::
[
k
])
|
a
b
->
c
instance
(
'
[]
++
b
)
b
instance
(
a
++
b
)
c
=>
((
x
'
:
a
)
++
b
)
(
x
'
:
c
)
test
=
T
::
(
'
[
True
]
++
'
[]
)
l
=>
T
l
testsuite/tests/polykinds/T6068.hs
0 → 100644
View file @
accd944a
{-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, GADTs, MultiParamTypeClasses,
FunctionalDependencies, FlexibleInstances, UndecidableInstances, ExistentialQuantification #-}
module
T6068
where
import
Prelude
hiding
(
Maybe
,
Nothing
)
data
Maybe
::
*
->
*
where
Nothing
::
Maybe
a
data
family
Sing
(
a
::
k
)
data
instance
Sing
(
a
::
Maybe
k
)
where
SNothing
::
Sing
Nothing
data
KProxy
(
a
::
*
)
=
KProxy
data
Existential
(
p
::
KProxy
k
)
=
forall
(
a
::
k
)
.
Exists
(
Sing
a
)
class
HasSingleton
a
(
kp
::
KProxy
k
)
|
a
->
kp
where
exists
::
a
->
Existential
kp
instance
forall
a
(
mp
::
KProxy
(
Maybe
ak
))
.
HasSingleton
(
Maybe
a
)
mp
where
exists
Nothing
=
Exists
SNothing
-- instance forall (a ::*) (mp :: KProxy (Maybe ak)). HasSingleton (Maybe ak) (Maybe a) mp where
-- exists Nothing = Exists SNothing
testsuite/tests/polykinds/T6068.script
0 → 100644
View file @
accd944a
:l T6068
:t exists Nothing
testsuite/tests/polykinds/T6068.stdout
0 → 100644
View file @
accd944a
exists Nothing :: Existential (Maybe *) kp
testsuite/tests/polykinds/all.T
View file @
accd944a
...
...
@@ -46,3 +46,5 @@ test('T6044', normal, compile, [''])
test
('
T6054
',
normal
,
run_command
,
['
$MAKE -s --no-print-directory T6054
'])
test
('
T6081
',
normal
,
compile
,
[''])
test
('
T6015
',
normal
,
compile
,
[''])
test
('
T6015a
',
normal
,
compile
,
[''])
test
('
T6068
',
normal
,
ghci_script
,
['
T6068.script
'])
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