packages feed

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

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

{- | The name @outputDirectory@, targeting 'FilePath': the output directory of a build, which it removes and writes to.

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

@since 0.2.0.0
-}
module Document.Build.Name.OutputDirectory (
  OutputDirectoryLike (..),
) where

import Control.Lens (Optic)

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

@since 0.2.0.0
-}
class OutputDirectoryLike p f x x' where
  outputDirectory ::
    Optic p f x x' FilePath FilePath

{- | Identity

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