packages feed

casa-reoc-0.1.0.0: src/ReOC/Name/InvalidFormText.hs

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

-- | The name @invalidFormText@, which targets @Text@. It names a field or constructor of @InvalidValue@.
module ReOC.Name.InvalidFormText (
  InvalidFormTextLike (..),
) where

import Control.Lens (Optic)
import Data.Text (Text)

class InvalidFormTextLike p f x x' where
  invalidFormText ::
    Optic p f x x' Text Text

-- | Identity
instance (x' ~ Text) => InvalidFormTextLike p f Text x' where
  invalidFormText = id