packages feed

singletons-2.4: tests/compile-and-dump/Singletons/EqInstances.ghc84.template

Singletons/EqInstances.hs:0:0:: Splicing declarations
    singEqInstances [''Foo, ''Empty]
  ======>
    instance SEq Foo => SEq Foo where
      (%==) SFLeaf SFLeaf = STrue
      (%==) SFLeaf ((:%+:) _ _) = SFalse
      (%==) ((:%+:) _ _) SFLeaf = SFalse
      (%==) ((:%+:) a a) ((:%+:) b b)
        = ((%&&) (((%==) a) b)) (((%==) a) b)
    type family Equals_0123456789876543210 (a :: Foo) (b :: Foo) :: Bool where
      Equals_0123456789876543210 FLeaf FLeaf = TrueSym0
      Equals_0123456789876543210 ((:+:) a a) ((:+:) b b) = (&&) ((==) a b) ((==) a b)
      Equals_0123456789876543210 (_ :: Foo) (_ :: Foo) = FalseSym0
    instance PEq Foo where
      type (==) a b = Equals_0123456789876543210 a b
    instance SEq Empty where
      (%==) _ _ = STrue
    type family Equals_0123456789876543210 (a :: Empty) (b :: Empty) :: Bool where
      Equals_0123456789876543210 (_ :: Empty) (_ :: Empty) = TrueSym0
    instance PEq Empty where
      type (==) a b = Equals_0123456789876543210 a b