ZUAMLONY
ZUAMLONY

Reputation: 53

Data.Map vs Data.Map.Strict and Data.Map.Lazy

I understand Data.Map.Lazy and Data.Map.Strict are different. But what exactly are you importing when you import Data.Map: the strict one, the lazy one or a combination?

Upvotes: 5

Views: 1156

Answers (1)

daniel gratzer
daniel gratzer

Reputation: 53901

The lazy one. Looking at the docs the

 module Data.Map.Lazy

means it's re-exporting all of the lazy stuff. It used to provide a few additional functions, but these are all deprecated in favor of Data.Foldable and the strict version of Map.

Edit: The second line of the documentation on the linked page states that it reexports the lazy version as well.

An efficient implementation of ordered maps from keys to values (dictionaries).

This module re-exports the value lazy Lazy API, plus several value strict functions from Strict.

The functions it mentions are all deprecated however.

Upvotes: 9

Related Questions