packages feed

singletons-2.4: tests/compile-and-dump/Promote/Newtypes.ghc84.template

Promote/Newtypes.hs:(0,0)-(0,0): Splicing declarations
    promote
      [d| newtype Foo
            = Foo Nat
            deriving Eq
          newtype Bar = Bar {unBar :: Nat} |]
  ======>
    newtype Foo
      = Foo Nat
      deriving Eq
    newtype Bar = Bar {unBar :: Nat}
    type family Equals_0123456789876543210 (a :: Foo) (b :: Foo) :: Bool where
      Equals_0123456789876543210 (Foo a) (Foo b) = (==) a b
      Equals_0123456789876543210 (_ :: Foo) (_ :: Foo) = FalseSym0
    instance PEq Foo where
      type (==) a b = Equals_0123456789876543210 a b
    type UnBarSym1 (t :: Bar) = UnBar t
    instance SuppressUnusedWarnings UnBarSym0 where
      suppressUnusedWarnings
        = snd ((GHC.Tuple.(,) UnBarSym0KindInference) GHC.Tuple.())
    data UnBarSym0 (l :: TyFun Bar Nat)
      = forall arg. SameKind (Apply UnBarSym0 arg) (UnBarSym1 arg) =>
        UnBarSym0KindInference
    type instance Apply UnBarSym0 l = UnBar l
    type family UnBar (a :: Bar) :: Nat where
      UnBar (Bar field) = field
    type FooSym1 (t :: Nat) = Foo t
    instance SuppressUnusedWarnings FooSym0 where
      suppressUnusedWarnings
        = snd ((GHC.Tuple.(,) FooSym0KindInference) GHC.Tuple.())
    data FooSym0 (l :: TyFun Nat Foo)
      = forall arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
        FooSym0KindInference
    type instance Apply FooSym0 l = Foo l
    type BarSym1 (t :: Nat) = Bar t
    instance SuppressUnusedWarnings BarSym0 where
      suppressUnusedWarnings
        = snd ((GHC.Tuple.(,) BarSym0KindInference) GHC.Tuple.())
    data BarSym0 (l :: TyFun Nat Bar)
      = forall arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
        BarSym0KindInference
    type instance Apply BarSym0 l = Bar l