Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 721
ZUAMLONY Avatar asked Sep 25 '13 19:09

ZUAMLONY


1 Answers

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.

like image 133
Daniel Gratzer Avatar answered Oct 12 '22 09:10

Daniel Gratzer