Skip to content

Add a lookupKey function to aid with sharing / interning #546

@sjakobi

Description

@sjakobi

I noticed that haskell-language-server is putting a lot of effort into reducing memory usage by replacing certain keys with the keys that are already stored in a map. There is an explanation here, and another instance here: haskell/haskell-language-server#4759 ( a bit embarrassing for me ;) )

I wonder if we could make this much simpler if we'd offer a function

lookupKey :: Hashable k => k -> HashMap k v -> Maybe k

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions