packages feed

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

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

{- | The name @targetFile@, targeting @()@: the constructor of a target that is a file.

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

@since 0.2.0.0
-}
module Document.Build.Name.TargetFile (
  TargetFileLike (..),
) where

import Control.Lens (Optic)

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

@since 0.2.0.0
-}
class TargetFileLike p f x x' where
  targetFile ::
    Optic p f x x' () ()

{- | Identity

@since 0.2.0.0
-}
instance (x' ~ ()) => TargetFileLike p f () x' where
  targetFile =
    id
  {-# INLINE targetFile #-}