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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
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
Alex D
GHC
Commits
14f9af49
Commit
14f9af49
authored
Dec 18, 2010
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document GADTSyntax extension
parent
8415c28b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
docs/users_guide/flags.xml
docs/users_guide/flags.xml
+7
-0
docs/users_guide/glasgow_exts.xml
docs/users_guide/glasgow_exts.xml
+2
-1
No files found.
docs/users_guide/flags.xml
View file @
14f9af49
...
...
@@ -762,6 +762,13 @@
<entry>
dynamic
</entry>
<entry><option>
-XNoGADTs
</option></entry>
</row>
<row>
<entry><option>
-XGADTSyntax
</option></entry>
<entry>
Enable
<link
linkend=
"gadt-style"
>
generalised algebraic data type syntax
</link>
.
</entry>
<entry>
dynamic
</entry>
<entry><option>
-XNoGADTSyntax
</option></entry>
</row>
<row>
<entry><option>
-XTypeFamilies
</option></entry>
<entry>
Enable
<link
linkend=
"type-families"
>
type families
</link>
.
</entry>
...
...
docs/users_guide/glasgow_exts.xml
View file @
14f9af49
...
...
@@ -2434,7 +2434,8 @@ declarations. Define your own instances!
<sect2
id=
"gadt-style"
>
<title>
Declaring data types with explicit constructor signatures
</title>
<para>
GHC allows you to declare an algebraic data type by
<para>
When the
<literal>
GADTSyntax
</literal>
extension is enabled,
GHC allows you to declare an algebraic data type by
giving the type signatures of constructors explicitly. For example:
<programlisting>
data Maybe a where
...
...
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