packages feed

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

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

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

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

class InvalidText1Like p f x x' where
  invalidText1 ::
    Optic p f x x' Text Text

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