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 #3640
Ticket #3640
: BadPun.hs
File BadPun.hs,
204 bytes
(added by cjs,
4 years
ago)
Demonstration of bad puns in where clauses.
Line
1
{-# LANGUAGE NamedFieldPuns #-}
2
3
data
Record
=
Record
{
f1
,
f2
,
f3
::
Int
}
4
5
goodPun
Record
{
f1
,
f2
,
f3
}
=
f1
+
f2
+
f3
6
7
badPun
record
=
f1
+
f2
+
f3
8
where
Record
{
f1
=
f1
,
f2
,
f3
}
=
record
9
10
main
=
return
()
Download in other formats:
Original Format