Opened 8 years ago

Closed 6 years ago

Last modified 6 years ago

#667 closed feature request (wontfix)

Efficient Map <-> Set conversions

Reported by: jpbernardy Owned by: jpbernardy
Priority: normal Milestone: Not GHC
Component: libraries/base Version: 6.4.1
Keywords: Data Map Set collections Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: N/A Blocked By:
Blocking: Related Tickets:

Description (last modified by jpbernardy)

We should be able to convert a Set into a Map without re-computation of the tree Shape. (initially proposed by John Meacham)

Change History (11)

comment:1 Changed 8 years ago by jpbernardy

  • Keywords collections added

comment:2 Changed 8 years ago by jpbernardy

  • Description modified (diff)

comment:3 Changed 8 years ago by jpbernardy

This requires to move the tree structures to another module, so Set and Map can both see the structure.

Providing, toTree and "unsafeFromTree" would allow the user to implement his own algorithms.

comment:4 Changed 8 years ago by jpbernardy

This requires moving the raw tree types to their own module so Map can see Set structure and vice-versa. Note that this will be given for free if we move to A. Hey's AVL trees.

comment:5 Changed 8 years ago by jpbernardy

This ticket is resolved for the new AVL-based types.

comment:6 Changed 8 years ago by jpbernardy

  • Owner set to jpbernardy
  • Status changed from new to assigned

comment:7 Changed 8 years ago by igloo

  • Milestone set to 6.8
  • Test Case set to N/A

comment:8 Changed 6 years ago by simonmar

  • Milestone changed from 6.8 branch to Not GHC

comment:9 Changed 6 years ago by igloo

  • Resolution set to wontfix
  • Status changed from assigned to closed

The conversion functions should be proposed with the library submissions process:
http://www.haskell.org/haskellwiki/Library_submissions

comment:10 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:11 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.