packages feed

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

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

{- | The name @imageHeight@, targeting 'Int': the height of an image, in pixels.

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

@since 0.2.0.0
-}
module Document.Build.Name.ImageHeight (
  ImageHeightLike (..),
) where

import Control.Lens (Optic)

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

@since 0.2.0.0
-}
class ImageHeightLike p f x x' where
  imageHeight ::
    Optic p f x x' Int Int

{- | Identity

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