packages feed

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

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

-- | The name @givenElements@, which targets @Natural@. It names a field or constructor of @TooMany@.
module ReOC.Name.GivenElements (
  GivenElementsLike (..),
) where

import Control.Lens (Optic)
import Numeric.Natural (Natural)

class GivenElementsLike p f x x' where
  givenElements ::
    Optic p f x x' Natural Natural

-- | Identity
instance (x' ~ Natural) => GivenElementsLike p f Natural x' where
  givenElements = id