hs-bindgen-1.0.0.0: src-internal/HsBindgen/Orphans.hs
{-# OPTIONS_GHC -fno-warn-orphans #-}
module HsBindgen.Orphans () where
import Data.GADT.Compare (GEq (geq))
import Data.Type.Equality ((:~:) (Refl))
import DeBruijn (Idx, idxToInt)
import Unsafe.Coerce (unsafeCoerce)
{-------------------------------------------------------------------------------
DeBruijn
-------------------------------------------------------------------------------}
instance GEq Idx where
geq i j
| idxToInt i == idxToInt j = Just $ unsafeCoerce Refl
| otherwise = Nothing