GHC Trac Home
GHC Home
Joining In
Working on GHC
Mailing Lists & IRC
GHC Contributors
Documentation
Status Reports
Repositories
Building Guide
Commentary
Debugging
View Tickets
All Bugs
All Tasks
All Feature Req's
All Proposals
My Tickets
Tickets I Created
By Milestone
By OS
By Architecture
Patches for review
Create Ticket
New Bug
New Task
New Feature Req
Wiki
Title Index
Recent Changes
Wiki Notes
Search:
Login
Help/Guide
About Trac
Register
Forgot your password?
Preferences
Wiki
Timeline
Roadmap
View Tickets
Dashboard
Blog
Context Navigation
Back to Ticket #5857
Ticket #5857
: Singletons.hs
File Singletons.hs,
272 bytes
(added by goldfire,
16 months
ago)
Template Haskell code
Line
1
module
Singletons
where
2
3
import
Language.Haskell.TH
4
5
bar
::
Q
[
Dec
]
6
bar
=
do
7
indexName
<-
newName
"n"
8
return
[
DataD
[]
9
(
mkName
"Foo"
)
10
[]
11
[
NormalC
(
mkName
"Baz"
)
[(
NotStrict
,
VarT
indexName
)]]
12
[]
]
13
14
15
Download in other formats:
Original Format