Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gershomb
GHC
Commits
e483775c
Commit
e483775c
authored
4 years ago
by
Daniel Winograd-Cort
Committed by
Marge Bot
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update changelog and release notes for Data.Type.Ord change
parent
e145e44c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/users_guide/9.2.1-notes.rst
+24
-0
24 additions, 0 deletions
docs/users_guide/9.2.1-notes.rst
libraries/base/changelog.md
+8
-0
8 additions, 0 deletions
libraries/base/changelog.md
with
32 additions
and
0 deletions
docs/users_guide/9.2.1-notes.rst
+
24
−
0
View file @
e483775c
...
...
@@ -234,6 +234,30 @@ Eventlog
charVal :: forall n proxy. KnownChar n => proxy n -> Char
charVal' :: forall n. KnownChar n => Proxy# n -> Char
- A new kind-polymorphic ``Compare`` type family was added in ``Data.Type.Ord``
and has type instances for ``Nat``, ``Symbol``, and ``Char``. Furthermore,
the ``(<=?)`` type (and ``(<=)``) from ``GHC.TypeNats`` is now governed by
this type family (as well as new comparison type operators that are exported
by ``Data.Type.Ord``). This has two important repercussions. First, GHC can
no longer deduce that all natural numbers are greater than or equal to zero.
For instance, ::
test1 :: Proxy (0 <=? x) -> Proxy True
test1 = id
which previously type checked will now result in a type error. Second, when
these comparison type operators are used very generically, a kind may need to
be provided. For example, ::
test2 :: Proxy (x <=? x) -> Proxy True
test2 = id
will now generate a type error because GHC does not know the kind of ``x``.
To fix this, one must provide an explicit kind, perhaps by changing the type
to: ::
test2 :: forall (x :: Nat). Proxy (x <=? x) -> Proxy True
- On POSIX, ``System.IO.openFile`` can no longer leak a file descriptor if it
is interrupted by an asynchronous exception (#19114, #19115).
...
...
This diff is collapsed.
Click to expand it.
libraries/base/changelog.md
+
8
−
0
View file @
e483775c
...
...
@@ -8,6 +8,14 @@
in order to define instances for
`Nat`
. Also, different instances for
`Nat`
and
`Natural`
won't typecheck anymore.
*
Add
`Data.Type.Ord`
as a module for type-level comparison operations. The
`(<=?)`
type operator from
`GHC.TypeNats`
, previously kind-specific to
`Nat`
, is now kind-polymorphic and governed by the
`Compare`
type family in
`Data.Type.Ord`
. Note that this means GHC will no longer deduce
`0 <= n`
for all
`n`
any more.
*
Add
`cmpNat`
,
`cmpSymbol`
, and
`cmpChar`
to
`GHC.TypeNats`
and
`GHC.TypeLits`
.
*
Add
`Semigroup`
and
`Monoid`
instances for
`Data.Functor.Product`
and
`Data.Functor.Compose`
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment