{-# LANGUAGE NoBangPatterns #-}--------------------------------------------------------------------------------- | Linearly usable maps and sets on identifiers-----------------------------------------------------------------------------moduleData.IdMap(moduleData.IdMap.Core,inserts,(!),setInsert,setInserts)where------------------------------------importData.IdMap.CoreimportData.List(foldl')------------------------------------infixl8!-- better to be weaker than (~>)(!)::Ii=>Mapika->Idk->am!i=maybe(error"Data.IdMap.!")id(lookUpim)inserts::Ii=>Mapika->[(Idk,a)]->Mapikainserts=foldl'(\m(i,x)->insertixm)-- | /O(1)/. Insert a new key in the set. If the key is already in the set, the original set is returned.---- After insertion, the original set may not be used.setInsert::Ii=>Idk->Setik->SetiksetInsertk=insertk()setInserts::Ii=>Setik->[Idk]->SetiksetInserts=foldl'(flipsetInsert)