TrieMap-0.5.2: Data/TrieMap/Sized.hs
{-# LANGUAGE Rank2Types #-}
module Data.TrieMap.Sized where
-- class Sized f where
-- getSize :: f a -> Int
--
-- newtype Elem a = Elem {getElem :: a}
--
-- instance Sized Elem where
-- getSize _ = 1
type Sized a = a -> Int
newtype Elem a = Elem {getElem :: a}
elemSize :: Sized (Elem a)
elemSize _ = 1