setDeadKey deads dead@(CustomDead i d) =
  case find ((≡) (__baseChar d) ∘ BaseChar ∘ fst) deads of
    Just (_, m) → pure (CustomDead i d { __actionMap = m })
    Nothing → dead <$ tell ["dead key ‘" ⊕ c ⊕ "’ is not defined"]
  where
    c = maybe "unknown" (:[]) (baseCharToChar (__baseChar d))
setDeadKey _ l = pure l

setLigatures ∷ [(Pos, Int, String)] → Layout → Layout
setLigatur
setDeadKey ∷ Logger m ⇒ [(Char, ActionMap)] → Letter → m Letter
setDeadKey deads dead@(CustomDead i d) =
  case find ((≡) (__baseChar d) ∘ BaseChar ∘ fst) deads of
    Just (_, m) → pure (CustomDead i d { __actionMap = m })
    Nothing → dead <$ tell ["dead key ‘" ⊕ c ⊕ "’ is not defined"]
  where
    c = maybe "unknown" (:[]) (baseCharToChar (__baseChar d))
setDeadKey deads dead@(CustomDead i d) =
  case find ((≡) (__baseChar d) ∘ BaseChar ∘ fst) deads of
    Just (_, m) → pure (CustomDead i d { __actionMap = m })
    Nothing → dead <$ tell ["dead key ‘" ⊕ c ⊕ "’ is not defined"]
  where
    c = maybe "unknown" (:[]) (baseCharToChar (__baseChar d))