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
4672e2eb
Commit
4672e2eb
authored
Jun 14, 2018
by
Ben Gamari
🐢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
relnotes: Add mention of QuantifiedConstraints
parent
e4c41ec2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
docs/users_guide/8.6.1-notes.rst
docs/users_guide/8.6.1-notes.rst
+13
-0
docs/users_guide/glasgow_exts.rst
docs/users_guide/glasgow_exts.rst
+9
-0
No files found.
docs/users_guide/8.6.1-notes.rst
View file @
4672e2eb
...
...
@@ -28,6 +28,19 @@ Full details
Language
~~~~~~~~
- Use of quantified type variables in constraints is now allowed via the
:extension:`QuantifiedConstraints` language extension. This long-awaited feature
enables users to encode significantly more precision in their types. For instance,
the common ``MonadTrans`` typeclass could now make the expectation that an
applied transformer is must be a ``Monad`` ::
class (forall a. Monad m => Monad (t m)) => MonadTrans t where {- ... -}
Additionally, quantification can enable terminating instance resolution
where this previously was not possible. See :ref:`quantified-constraints` for
details.
- A new :extension:`DerivingVia` language extension has been added which allows
the use of the ``via`` deriving strategy. For instance: ::
...
...
docs/users_guide/glasgow_exts.rst
View file @
4672e2eb
...
...
@@ -9707,9 +9707,18 @@ contexts and superclasses, but to do so you must use
:extension:`UndecidableInstances` to signal that you don't mind if the type
checker fails to terminate.
.. _quantified-constraints:
Quantified constraints
======================
.. extension:: QuantifiedConstraints
:shortdesc: Allow ``forall`` quantifiers in constraints.
:since: 8.6.1
Allow constraints to quantify over types.
The extension :extension:`QuantifiedConstraints` introduces **quantified constraints**,
which give a new level of expressiveness in constraints. For example, consider ::
...
...
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