packages feed

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

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

{- | The name @outputImageInfo@, targeting @'Maybe' 'Document.Build.ImageInfo.ImageInfo'@: information about an output file, if it is an image.

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

@since 0.2.0.0
-}
module Document.Build.Name.OutputImageInfo (
  OutputImageInfoLike (..),
) where

import Control.Lens (Optic)
import Document.Build.ImageInfo (ImageInfo)

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

@since 0.2.0.0
-}
class OutputImageInfoLike p f x x' where
  outputImageInfo ::
    Optic p f x x' (Maybe ImageInfo) (Maybe ImageInfo)

{- | Identity

@since 0.2.0.0
-}
instance (x' ~ Maybe ImageInfo) => OutputImageInfoLike p f (Maybe ImageInfo) x' where
  outputImageInfo =
    id
  {-# INLINE outputImageInfo #-}