packages feed

singletons-base-3.5: tests/compile-and-dump/Singletons/T433.golden

Singletons/T433.hs:(0,0)-(0,0): Splicing declarations
    promote
      [d| konst1 :: a -> Bool -> a
          konst1 x _ = x
          konst2 :: a -> Maybe Bool -> a
          konst2 x _ = x
          f local
            = g
            where
                g :: forall a. a -> a
                g x = konst1 (x :: a) local
          foo :: forall a. a -> ()
          foo x = const () (Nothing :: Maybe a)
          id2 :: forall a. a -> a
          id2 x = id (x :: a)
          id3 :: a -> a
          id3 (x :: b) = id (x :: b)
          id4 :: forall a. a -> a
          id4 (x :: a) = id (x :: a)
          id5 :: forall a. a -> a
          id5
            = g
            where
                g = id :: a -> a
          id6 :: a -> a
          id6 (x :: b)
            = g
            where
                g = (x :: b)
          id7 (x :: b)
            = g
            where
                g = (x :: b)
          id8 :: a -> a
          id8 x
            = g x True
            where
                g :: b -> a -> b
                g y _ = y |]
  ======>
    konst1 :: a -> Bool -> a
    konst1 x _ = x
    konst2 :: a -> Maybe Bool -> a
    konst2 x _ = x
    f local
      = g
      where
          g :: forall a. a -> a
          g x = konst1 (x :: a) local
    foo :: forall a. a -> ()
    foo x = const () (Nothing :: Maybe a)
    id2 :: forall a. a -> a
    id2 x = id (x :: a)
    id3 :: a -> a
    id3 (x :: b) = id (x :: b)
    id4 :: forall a. a -> a
    id4 (x :: a) = id (x :: a)
    id5 :: forall a. a -> a
    id5
      = g
      where
          g = id :: a -> a
    id6 :: a -> a
    id6 (x :: b)
      = g
      where
          g = x :: b
    id7 (x :: b)
      = g
      where
          g = x :: b
    id8 :: a -> a
    id8 x
      = g x True
      where
          g :: b -> a -> b
          g y _ = y
    data Let0123456789876543210GSym0 (x0123456789876543210 :: a0123456789876543210) :: (~>) b0123456789876543210 ((~>) a0123456789876543210 b0123456789876543210)
      where
        Let0123456789876543210GSym0KindInference :: SameKind (Apply (Let0123456789876543210GSym0 x0123456789876543210) arg) (Let0123456789876543210GSym1 x0123456789876543210 arg) =>
                                                    Let0123456789876543210GSym0 x0123456789876543210 a0123456789876543210
    type instance Apply @b0123456789876543210 @((~>) a0123456789876543210 b0123456789876543210) (Let0123456789876543210GSym0 x0123456789876543210) a0123456789876543210 = Let0123456789876543210GSym1 x0123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings (Let0123456789876543210GSym0 x0123456789876543210) where
      suppressUnusedWarnings
        = snd ((,) Let0123456789876543210GSym0KindInference ())
    data Let0123456789876543210GSym1 (x0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) :: (~>) a0123456789876543210 b0123456789876543210
      where
        Let0123456789876543210GSym1KindInference :: SameKind (Apply (Let0123456789876543210GSym1 x0123456789876543210 a0123456789876543210) arg) (Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210 arg) =>
                                                    Let0123456789876543210GSym1 x0123456789876543210 a0123456789876543210 a0123456789876543210
    type instance Apply @a0123456789876543210 @b0123456789876543210 (Let0123456789876543210GSym1 x0123456789876543210 a0123456789876543210) a0123456789876543210 = Let0123456789876543210G x0123456789876543210 a0123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings (Let0123456789876543210GSym1 x0123456789876543210 a0123456789876543210) where
      suppressUnusedWarnings
        = snd ((,) Let0123456789876543210GSym1KindInference ())
    type family Let0123456789876543210GSym2 (x0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) (a0123456789876543210 :: a0123456789876543210) :: b0123456789876543210 where
      Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210 a0123456789876543210 = Let0123456789876543210G x0123456789876543210 a0123456789876543210 a0123456789876543210
    type family Let0123456789876543210G (x0123456789876543210 :: a0123456789876543210) (a :: b) (a :: a) :: b where
      Let0123456789876543210G x y _ = y
    type family Let0123456789876543210GSym0 b0123456789876543210 (x0123456789876543210 :: b0123456789876543210) where
      Let0123456789876543210GSym0 b0123456789876543210 x0123456789876543210 = Let0123456789876543210G b0123456789876543210 x0123456789876543210
    type family Let0123456789876543210G b0123456789876543210 (x0123456789876543210 :: b0123456789876543210) where
      Let0123456789876543210G b x = x :: b
    type family Let0123456789876543210GSym0 b0123456789876543210 (x0123456789876543210 :: b0123456789876543210) where
      Let0123456789876543210GSym0 b0123456789876543210 x0123456789876543210 = Let0123456789876543210G b0123456789876543210 x0123456789876543210
    type family Let0123456789876543210G b0123456789876543210 (x0123456789876543210 :: b0123456789876543210) where
      Let0123456789876543210G b x = x :: b
    type family Let0123456789876543210GSym0 a0123456789876543210 (a_01234567898765432100123456789876543210 :: a0123456789876543210) where
      Let0123456789876543210GSym0 a0123456789876543210 a_01234567898765432100123456789876543210 = Let0123456789876543210G a0123456789876543210 a_01234567898765432100123456789876543210
    type family Let0123456789876543210G a0123456789876543210 (a_01234567898765432100123456789876543210 :: a0123456789876543210) where
      Let0123456789876543210G a a_0123456789876543210 = IdSym0 :: (~>) a a
    data Let0123456789876543210GSym0 local0123456789876543210 :: (~>) a0123456789876543210 a0123456789876543210
      where
        Let0123456789876543210GSym0KindInference :: SameKind (Apply (Let0123456789876543210GSym0 local0123456789876543210) arg) (Let0123456789876543210GSym1 local0123456789876543210 arg) =>
                                                    Let0123456789876543210GSym0 local0123456789876543210 a0123456789876543210
    type instance Apply @a0123456789876543210 @a0123456789876543210 (Let0123456789876543210GSym0 local0123456789876543210) a0123456789876543210 = Let0123456789876543210G local0123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings (Let0123456789876543210GSym0 local0123456789876543210) where
      suppressUnusedWarnings
        = snd ((,) Let0123456789876543210GSym0KindInference ())
    type family Let0123456789876543210GSym1 local0123456789876543210 (a0123456789876543210 :: a0123456789876543210) :: a0123456789876543210 where
      Let0123456789876543210GSym1 local0123456789876543210 a0123456789876543210 = Let0123456789876543210G local0123456789876543210 a0123456789876543210
    type family Let0123456789876543210G local0123456789876543210 (a :: a) :: a where
      Let0123456789876543210G local (x :: a) = Apply (Apply Konst1Sym0 (x :: a)) local
    type Id8Sym0 :: (~>) a a
    data Id8Sym0 :: (~>) a a
      where
        Id8Sym0KindInference :: SameKind (Apply Id8Sym0 arg) (Id8Sym1 arg) =>
                                Id8Sym0 a0123456789876543210
    type instance Apply @a @a Id8Sym0 a0123456789876543210 = Id8 a0123456789876543210
    instance SuppressUnusedWarnings Id8Sym0 where
      suppressUnusedWarnings = snd ((,) Id8Sym0KindInference ())
    type Id8Sym1 :: a -> a
    type family Id8Sym1 @a (a0123456789876543210 :: a) :: a where
      Id8Sym1 a0123456789876543210 = Id8 a0123456789876543210
    data Id7Sym0 a0123456789876543210
      where
        Id7Sym0KindInference :: SameKind (Apply Id7Sym0 arg) (Id7Sym1 arg) =>
                                Id7Sym0 a0123456789876543210
    type instance Apply @_ @_ Id7Sym0 a0123456789876543210 = Id7 a0123456789876543210
    instance SuppressUnusedWarnings Id7Sym0 where
      suppressUnusedWarnings = snd ((,) Id7Sym0KindInference ())
    type family Id7Sym1 a0123456789876543210 where
      Id7Sym1 a0123456789876543210 = Id7 a0123456789876543210
    type Id6Sym0 :: (~>) a a
    data Id6Sym0 :: (~>) a a
      where
        Id6Sym0KindInference :: SameKind (Apply Id6Sym0 arg) (Id6Sym1 arg) =>
                                Id6Sym0 a0123456789876543210
    type instance Apply @a @a Id6Sym0 a0123456789876543210 = Id6 a0123456789876543210
    instance SuppressUnusedWarnings Id6Sym0 where
      suppressUnusedWarnings = snd ((,) Id6Sym0KindInference ())
    type Id6Sym1 :: a -> a
    type family Id6Sym1 @a (a0123456789876543210 :: a) :: a where
      Id6Sym1 a0123456789876543210 = Id6 a0123456789876543210
    type Id5Sym0 :: forall a. (~>) a a
    data Id5Sym0 :: (~>) a a
      where
        Id5Sym0KindInference :: SameKind (Apply Id5Sym0 arg) (Id5Sym1 arg) =>
                                Id5Sym0 a0123456789876543210
    type instance Apply @a @a Id5Sym0 a0123456789876543210 = Id5 a0123456789876543210
    instance SuppressUnusedWarnings Id5Sym0 where
      suppressUnusedWarnings = snd ((,) Id5Sym0KindInference ())
    type Id5Sym1 :: forall a. a -> a
    type family Id5Sym1 @a (a0123456789876543210 :: a) :: a where
      Id5Sym1 a0123456789876543210 = Id5 a0123456789876543210
    type Id4Sym0 :: forall a. (~>) a a
    data Id4Sym0 :: (~>) a a
      where
        Id4Sym0KindInference :: SameKind (Apply Id4Sym0 arg) (Id4Sym1 arg) =>
                                Id4Sym0 a0123456789876543210
    type instance Apply @a @a Id4Sym0 a0123456789876543210 = Id4 a0123456789876543210
    instance SuppressUnusedWarnings Id4Sym0 where
      suppressUnusedWarnings = snd ((,) Id4Sym0KindInference ())
    type Id4Sym1 :: forall a. a -> a
    type family Id4Sym1 @a (a0123456789876543210 :: a) :: a where
      Id4Sym1 a0123456789876543210 = Id4 a0123456789876543210
    type Id3Sym0 :: (~>) a a
    data Id3Sym0 :: (~>) a a
      where
        Id3Sym0KindInference :: SameKind (Apply Id3Sym0 arg) (Id3Sym1 arg) =>
                                Id3Sym0 a0123456789876543210
    type instance Apply @a @a Id3Sym0 a0123456789876543210 = Id3 a0123456789876543210
    instance SuppressUnusedWarnings Id3Sym0 where
      suppressUnusedWarnings = snd ((,) Id3Sym0KindInference ())
    type Id3Sym1 :: a -> a
    type family Id3Sym1 @a (a0123456789876543210 :: a) :: a where
      Id3Sym1 a0123456789876543210 = Id3 a0123456789876543210
    type Id2Sym0 :: forall a. (~>) a a
    data Id2Sym0 :: (~>) a a
      where
        Id2Sym0KindInference :: SameKind (Apply Id2Sym0 arg) (Id2Sym1 arg) =>
                                Id2Sym0 a0123456789876543210
    type instance Apply @a @a Id2Sym0 a0123456789876543210 = Id2 a0123456789876543210
    instance SuppressUnusedWarnings Id2Sym0 where
      suppressUnusedWarnings = snd ((,) Id2Sym0KindInference ())
    type Id2Sym1 :: forall a. a -> a
    type family Id2Sym1 @a (a0123456789876543210 :: a) :: a where
      Id2Sym1 a0123456789876543210 = Id2 a0123456789876543210
    type FooSym0 :: forall a. (~>) a ()
    data FooSym0 :: (~>) a ()
      where
        FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
                                FooSym0 a0123456789876543210
    type instance Apply @a @() FooSym0 a0123456789876543210 = Foo a0123456789876543210
    instance SuppressUnusedWarnings FooSym0 where
      suppressUnusedWarnings = snd ((,) FooSym0KindInference ())
    type FooSym1 :: forall a. a -> ()
    type family FooSym1 @a (a0123456789876543210 :: a) :: () where
      FooSym1 a0123456789876543210 = Foo a0123456789876543210
    data FSym0 a0123456789876543210
      where
        FSym0KindInference :: SameKind (Apply FSym0 arg) (FSym1 arg) =>
                              FSym0 a0123456789876543210
    type instance Apply @_ @_ FSym0 a0123456789876543210 = F a0123456789876543210
    instance SuppressUnusedWarnings FSym0 where
      suppressUnusedWarnings = snd ((,) FSym0KindInference ())
    type family FSym1 a0123456789876543210 where
      FSym1 a0123456789876543210 = F a0123456789876543210
    type Konst2Sym0 :: (~>) a ((~>) (Maybe Bool) a)
    data Konst2Sym0 :: (~>) a ((~>) (Maybe Bool) a)
      where
        Konst2Sym0KindInference :: SameKind (Apply Konst2Sym0 arg) (Konst2Sym1 arg) =>
                                   Konst2Sym0 a0123456789876543210
    type instance Apply @a @((~>) (Maybe Bool) a) Konst2Sym0 a0123456789876543210 = Konst2Sym1 a0123456789876543210
    instance SuppressUnusedWarnings Konst2Sym0 where
      suppressUnusedWarnings = snd ((,) Konst2Sym0KindInference ())
    type Konst2Sym1 :: a -> (~>) (Maybe Bool) a
    data Konst2Sym1 (a0123456789876543210 :: a) :: (~>) (Maybe Bool) a
      where
        Konst2Sym1KindInference :: SameKind (Apply (Konst2Sym1 a0123456789876543210) arg) (Konst2Sym2 a0123456789876543210 arg) =>
                                   Konst2Sym1 a0123456789876543210 a0123456789876543210
    type instance Apply @(Maybe Bool) @a (Konst2Sym1 a0123456789876543210) a0123456789876543210 = Konst2 a0123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings (Konst2Sym1 a0123456789876543210) where
      suppressUnusedWarnings = snd ((,) Konst2Sym1KindInference ())
    type Konst2Sym2 :: a -> Maybe Bool -> a
    type family Konst2Sym2 @a (a0123456789876543210 :: a) (a0123456789876543210 :: Maybe Bool) :: a where
      Konst2Sym2 a0123456789876543210 a0123456789876543210 = Konst2 a0123456789876543210 a0123456789876543210
    type Konst1Sym0 :: (~>) a ((~>) Bool a)
    data Konst1Sym0 :: (~>) a ((~>) Bool a)
      where
        Konst1Sym0KindInference :: SameKind (Apply Konst1Sym0 arg) (Konst1Sym1 arg) =>
                                   Konst1Sym0 a0123456789876543210
    type instance Apply @a @((~>) Bool a) Konst1Sym0 a0123456789876543210 = Konst1Sym1 a0123456789876543210
    instance SuppressUnusedWarnings Konst1Sym0 where
      suppressUnusedWarnings = snd ((,) Konst1Sym0KindInference ())
    type Konst1Sym1 :: a -> (~>) Bool a
    data Konst1Sym1 (a0123456789876543210 :: a) :: (~>) Bool a
      where
        Konst1Sym1KindInference :: SameKind (Apply (Konst1Sym1 a0123456789876543210) arg) (Konst1Sym2 a0123456789876543210 arg) =>
                                   Konst1Sym1 a0123456789876543210 a0123456789876543210
    type instance Apply @Bool @a (Konst1Sym1 a0123456789876543210) a0123456789876543210 = Konst1 a0123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings (Konst1Sym1 a0123456789876543210) where
      suppressUnusedWarnings = snd ((,) Konst1Sym1KindInference ())
    type Konst1Sym2 :: a -> Bool -> a
    type family Konst1Sym2 @a (a0123456789876543210 :: a) (a0123456789876543210 :: Bool) :: a where
      Konst1Sym2 a0123456789876543210 a0123456789876543210 = Konst1 a0123456789876543210 a0123456789876543210
    type Id8 :: a -> a
    type family Id8 @a (a :: a) :: a where
      Id8 x = Apply (Apply (Let0123456789876543210GSym0 x) x) TrueSym0
    type family Id7 a where
      Id7 (x :: b) = Let0123456789876543210GSym0 b x
    type Id6 :: a -> a
    type family Id6 @a (a :: a) :: a where
      Id6 (x :: b) = Let0123456789876543210GSym0 b x
    type Id5 :: forall a. a -> a
    type family Id5 @a (a :: a) :: a where
      Id5 @a (a_0123456789876543210 :: a) = Apply (Let0123456789876543210GSym0 a a_0123456789876543210) a_0123456789876543210
    type Id4 :: forall a. a -> a
    type family Id4 @a (a :: a) :: a where
      Id4 @a (x :: a :: a) = Apply IdSym0 (x :: a)
    type Id3 :: a -> a
    type family Id3 @a (a :: a) :: a where
      Id3 (x :: b) = Apply IdSym0 (x :: b)
    type Id2 :: forall a. a -> a
    type family Id2 @a (a :: a) :: a where
      Id2 @a (x :: a) = Apply IdSym0 (x :: a)
    type Foo :: forall a. a -> ()
    type family Foo @a (a :: a) :: () where
      Foo @a (x :: a) = Apply (Apply ConstSym0 Tuple0Sym0) (NothingSym0 :: Maybe a)
    type family F a where
      F local = Let0123456789876543210GSym0 local
    type Konst2 :: a -> Maybe Bool -> a
    type family Konst2 @a (a :: a) (a :: Maybe Bool) :: a where
      Konst2 x _ = x
    type Konst1 :: a -> Bool -> a
    type family Konst1 @a (a :: a) (a :: Bool) :: a where
      Konst1 x _ = x