packages feed

filepather-0.8.0.0: src/System/FilePather/Name/StepInput.hs

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

{- | The name @stepInput@, targeting 'FilePath': the input file of a step.

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

@since 0.8.0.0
-}
module System.FilePather.Name.StepInput (
  StepInputLike (..),
) where

import Control.Lens (Optic)

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

@since 0.8.0.0
-}
class StepInputLike p f x x' where
  stepInput ::
    Optic p f x x' FilePath FilePath

{- | Identity

@since 0.8.0.0
-}
instance (x' ~ FilePath) => StepInputLike p f FilePath x' where
  stepInput =
    id
  {-# INLINE stepInput #-}