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
1
Issues
1
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
Alexis King
GHC
Commits
1f911de4
Commit
1f911de4
authored
Nov 08, 2019
by
Brian Wignall
Committed by
Marge Bot
Nov 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add IsList instance for ZipList (closes #17433)
parent
1f98e47d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
libraries/base/GHC/Exts.hs
libraries/base/GHC/Exts.hs
+9
-1
No files found.
libraries/base/GHC/Exts.hs
View file @
1f911de4
...
...
@@ -113,6 +113,8 @@ import Data.Ord
import
Data.Version
(
Version
(
..
),
makeVersion
)
import
qualified
Debug.Trace
import
Control.Applicative
(
ZipList
(
..
))
-- XXX This should really be in Data.Tuple, where the definitions are
maxTupleSize
::
Int
maxTupleSize
=
62
...
...
@@ -209,6 +211,12 @@ instance IsList [a] where
fromList
=
id
toList
=
id
-- | @since
instance
IsList
(
ZipList
a
)
where
type
(
Item
(
ZipList
a
))
=
a
fromList
=
ZipList
toList
(
ZipList
as
)
=
as
-- | @since 4.9.0.0
instance
IsList
(
NonEmpty
a
)
where
type
Item
(
NonEmpty
a
)
=
a
...
...
@@ -261,7 +269,7 @@ atomicModifyMutVar# mv f s =
-- 'SmallMutableArray#' is either the original 'SmallMutableArray#'
-- resized in-place or, if not possible, a newly allocated
-- 'SmallMutableArray#' with the original content copied over.
--
--
-- To avoid undefined behaviour, the original 'SmallMutableArray#' shall
-- not be accessed anymore after a 'resizeSmallMutableArray#' has been
-- performed. Moreover, no reference to the old one should be kept in order
...
...
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