module Data.AssocList.List.Concept
    (

    -- * Association list type
      AssocList

    -- * Related modules
    -- $relatedModules

    -- * Exception
    , MissingAssocListKey (..)

    ) where

-- base
import Control.Exception (Exception)
import Data.Typeable     (Typeable)
import Prelude           (Eq, Show)

-- $relatedModules
-- * "Data.AssocList.List.Eq" - Functions that involve @Eq@ constraints
--   on the keys
-- * "Data.AssocList.List.Equivalence" - Most of the same functions as
--   the @Eq@ module, but with an @Equivalence@ parameter instead of an
--   @Eq@ constraint
-- * "Data.AssocList.List.Predicate" - Most of the same functions as the
--   @Eq@ module, but specifying keys using a @Predicate@ rather than a
--   particular key
-- * "Data.AssocList.List.Ord" - Functions that involve @Ord@ constraints
--   on the keys
-- * "Data.AssocList.List.Comparison" - The same functions as the @Ord@
--   module, but with a @Comparison@ parameter instead of an @Ord@
--   constraint.

type AssocList a b = [(a, b)]

-- | This exception shows up when one attempts to retrieve a value by key
-- from an association list using a partial function with a type signature
-- such as
--
-- > (!) :: Eq a => AssocList a b -> a -> b
--
-- but no result can be obtained because the requested key is not present
-- exists in the mapping.

data MissingAssocListKey = MissingAssocListKey
  deriving (MissingAssocListKey -> MissingAssocListKey -> Bool
(MissingAssocListKey -> MissingAssocListKey -> Bool)
-> (MissingAssocListKey -> MissingAssocListKey -> Bool)
-> Eq MissingAssocListKey
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MissingAssocListKey -> MissingAssocListKey -> Bool
$c/= :: MissingAssocListKey -> MissingAssocListKey -> Bool
== :: MissingAssocListKey -> MissingAssocListKey -> Bool
$c== :: MissingAssocListKey -> MissingAssocListKey -> Bool
Eq, Int -> MissingAssocListKey -> ShowS
[MissingAssocListKey] -> ShowS
MissingAssocListKey -> String
(Int -> MissingAssocListKey -> ShowS)
-> (MissingAssocListKey -> String)
-> ([MissingAssocListKey] -> ShowS)
-> Show MissingAssocListKey
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MissingAssocListKey] -> ShowS
$cshowList :: [MissingAssocListKey] -> ShowS
show :: MissingAssocListKey -> String
$cshow :: MissingAssocListKey -> String
showsPrec :: Int -> MissingAssocListKey -> ShowS
$cshowsPrec :: Int -> MissingAssocListKey -> ShowS
Show, Typeable)

instance Exception MissingAssocListKey