packages feed

document-build-0.2.0.0: src/Document/Build/Name/MissingStrings.hs

{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -Wall #-}

{- | The name @missingStrings@, targeting @'NonEmpty' 'String'@: the strings that a file does not contain.

Any value of the target type has the name, as the identity.

@since 0.2.0.0
-}
module Document.Build.Name.MissingStrings (
  MissingStringsLike (..),
) where

import Control.Lens (Optic)
import Data.List.NonEmpty (NonEmpty)

{- | A field or a constructor named @missingStrings@.

@since 0.2.0.0
-}
class MissingStringsLike p f x x' where
  missingStrings ::
    Optic p f x x' (NonEmpty String) (NonEmpty String)

{- | Identity

@since 0.2.0.0
-}
instance (x' ~ NonEmpty String) => MissingStringsLike p f (NonEmpty String) x' where
  missingStrings =
    id
  {-# INLINE missingStrings #-}