packages feed

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

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

-- | The name @catastrophic@, which targets @()@. It names a field or constructor of @Consequence@.
module ReOC.Name.Catastrophic (
  CatastrophicLike (..),
) where

import Control.Lens (Optic)

class CatastrophicLike p f x x' where
  catastrophic ::
    Optic p f x x' () ()

-- | Identity
instance (x' ~ ()) => CatastrophicLike p f () x' where
  catastrophic = id