packages feed

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

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

{- | The name @inputFilesNeeded@, targeting 'Int': the number of input files that a command needs.

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

@since 0.2.0.0
-}
module Document.Build.Name.InputFilesNeeded (
  InputFilesNeededLike (..),
) where

import Control.Lens (Optic)

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

@since 0.2.0.0
-}
class InputFilesNeededLike p f x x' where
  inputFilesNeeded ::
    Optic p f x x' Int Int

{- | Identity

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