packages feed

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

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

{- | The name @commandLineProgram@, targeting 'FilePath': the program of a command line.

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

@since 0.2.0.0
-}
module Document.Build.Name.CommandLineProgram (
  CommandLineProgramLike (..),
) where

import Control.Lens (Optic)

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

@since 0.2.0.0
-}
class CommandLineProgramLike p f x x' where
  commandLineProgram ::
    Optic p f x x' FilePath FilePath

{- | Identity

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