Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,334
Issues
4,334
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
371
Merge Requests
371
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
4c0ec20d
Commit
4c0ec20d
authored
Apr 24, 2012
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test Trac
#6035
,
#6036
parent
f2d5b3ef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
0 deletions
+45
-0
testsuite/tests/polykinds/T6035.hs
testsuite/tests/polykinds/T6035.hs
+28
-0
testsuite/tests/polykinds/T6036.hs
testsuite/tests/polykinds/T6036.hs
+17
-0
No files found.
testsuite/tests/polykinds/T6035.hs
0 → 100644
View file @
4c0ec20d
{-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, KindSignatures, GADTs, TypeOperators
#-}
module
T6035
where
data
Nat
=
Zero
|
Succ
Nat
type
family
Sing
(
a
::
k
)
::
k
->
*
data
SNat
n
where
SZero
::
SNat
Zero
SSucc
::
SNat
n
->
SNat
(
Succ
n
)
data
SList
(
a
::
[
k
])
where
SNil
::
SList
'
[]
SCons
::
Sing
h
h
->
SList
t
->
SList
(
h
'
:
t
)
type
instance
Sing
(
a
::
Nat
)
=
SNat
type
instance
Sing
(
a
::
[
k
])
=
SList
nil
::
SList
'
[]
nil
=
SNil
zero
::
SList
'
[
'
[]
]
zero
=
SCons
SNil
SNil
term
::
SList
'
[
'
[
Zero
],
'
[]
]
term
=
SCons
(
SCons
SZero
SNil
)
(
SCons
SNil
SNil
)
testsuite/tests/polykinds/T6036.hs
0 → 100644
View file @
4c0ec20d
{-# LANGUAGE DataKinds, TypeFamilies, PolyKinds, GADTs #-}
module
T6036
where
data
family
Sing
(
a
::
k
)
data
instance
Sing
(
a
::
Maybe
k
)
where
SNothing
::
Sing
'Nothing
SJust
::
Sing
b
->
Sing
(
'Just
b
)
data
Nat
=
Zero
|
Succ
Nat
data
instance
Sing
(
a
::
Nat
)
where
SZero
::
Sing
Zero
SSucc
::
Sing
n
->
Sing
(
Succ
n
)
term
=
SJust
SZero
Write
Preview
Markdown
is supported
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