[Git][ghc/ghc][master] Rename the singleton tuple GHC.Tuple.Unit to GHC.Tuple.Solo

Marge Bot gitlab at gitlab.haskell.org
Mon Jun 1 10:40:09 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
68b71c4a by Tom Ellis at 2020-06-01T06:39:55-04:00
Rename the singleton tuple GHC.Tuple.Unit to GHC.Tuple.Solo

- - - - -


22 changed files:

- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Utils.hs
- compiler/GHC/Core/Make.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/HsToCore/Utils.hs
- compiler/GHC/Iface/Type.hs
- compiler/GHC/Tc/Gen/HsType.hs
- libraries/ghc-prim/GHC/Tuple.hs
- libraries/ghc-prim/changelog.md
- libraries/template-haskell/Language/Haskell/TH/Syntax.hs
- testsuite/tests/deriving/should_fail/T15073.stderr
- testsuite/tests/ghc-api/annotations/parseTree.stdout
- testsuite/tests/th/T17380.stderr
- testsuite/tests/th/T18097.hs
- testsuite/tests/th/T8761.stderr
- testsuite/tests/th/TH_1tuple.stderr
- testsuite/tests/th/TH_Promoted1Tuple.stderr
- testsuite/tests/th/TH_tuple1.stdout
- testsuite/tests/typecheck/should_compile/holes.stderr
- testsuite/tests/typecheck/should_compile/holes3.stderr


Changes:

=====================================
compiler/GHC/Builtin/Types.hs
=====================================
@@ -723,10 +723,10 @@ bit odd:
   1-tuples:  ??
   0-tuples:  ()     ()#
 
-Zero-tuples have used up the logical name. So we use 'Unit' and 'Unit#'
+Zero-tuples have used up the logical name. So we use 'Solo' and 'Solo#'
 for one-tuples.  So in ghc-prim:GHC.Tuple we see the declarations:
   data ()     = ()
-  data Unit a = Unit a
+  data Solo a = Solo a
   data (a,b)  = (a,b)
 
 There is no way to write a boxed one-tuple in Haskell using tuple syntax.
@@ -736,7 +736,7 @@ They can, however, be written using other methods:
 2. They can be generated by way of Template Haskell or in `deriving` code.
 
 There is nothing special about one-tuples in Core; in particular, they have no
-custom pretty-printing, just using `Unit`.
+custom pretty-printing, just using `Solo`.
 
 Note that there is *not* a unary constraint tuple, unlike for other forms of
 tuples. See [Ignore unary constraint tuples] in GHC.Tc.Gen.HsType for more
@@ -749,24 +749,24 @@ Note [Don't flatten tuples from HsSyn] in GHC.Core.Make.
 -- Wrinkle: Make boxed one-tuple names have known keys
 -----
 
-We make boxed one-tuple names have known keys so that `data Unit a = Unit a`,
+We make boxed one-tuple names have known keys so that `data Solo a = Solo a`,
 defined in GHC.Tuple, will be used when one-tuples are spliced in through
 Template Haskell. This program (from #18097) crucially relies on this:
 
-  case $( tupE [ [| "ok" |] ] ) of Unit x -> putStrLn x
+  case $( tupE [ [| "ok" |] ] ) of Solo x -> putStrLn x
 
-Unless Unit has a known key, the type of `$( tupE [ [| "ok" |] ] )` (an
-ExplicitTuple of length 1) will not match the type of Unit (an ordinary
-data constructor used in a pattern). Making Unit known-key allows GHC to make
+Unless Solo has a known key, the type of `$( tupE [ [| "ok" |] ] )` (an
+ExplicitTuple of length 1) will not match the type of Solo (an ordinary
+data constructor used in a pattern). Making Solo known-key allows GHC to make
 this connection.
 
-Unlike Unit, every other tuple is /not/ known-key
+Unlike Solo, every other tuple is /not/ known-key
 (see Note [Infinite families of known-key names] in GHC.Builtin.Names). The
 main reason for this exception is that other tuples are written with special
 syntax, and as a result, they are renamed using a special `isBuiltInOcc_maybe`
 function (see Note [Built-in syntax and the OrigNameCache] in GHC.Types.Name.Cache).
-In contrast, Unit is just an ordinary data type with no special syntax, so it
-doesn't really make sense to handle it in `isBuiltInOcc_maybe`. Making Unit
+In contrast, Solo is just an ordinary data type with no special syntax, so it
+doesn't really make sense to handle it in `isBuiltInOcc_maybe`. Making Solo
 known-key is the next-best way to teach the internals of the compiler about it.
 -}
 
@@ -791,7 +791,7 @@ isBuiltInOcc_maybe occ =
       "->"   -> Just funTyConName
 
       -- boxed tuple data/tycon
-      -- We deliberately exclude Unit (the boxed 1-tuple).
+      -- We deliberately exclude Solo (the boxed 1-tuple).
       -- See Note [One-tuples] (Wrinkle: Make boxed one-tuple names have known keys)
       "()"    -> Just $ tup_name Boxed 0
       _ | Just rest <- "(" `BS.stripPrefix` name
@@ -801,7 +801,7 @@ isBuiltInOcc_maybe occ =
 
       -- unboxed tuple data/tycon
       "(##)"  -> Just $ tup_name Unboxed 0
-      "Unit#" -> Just $ tup_name Unboxed 1
+      "Solo#" -> Just $ tup_name Unboxed 1
       _ | Just rest <- "(#" `BS.stripPrefix` name
         , (commas, rest') <- BS.span (==',') rest
         , "#)" <- rest'
@@ -851,17 +851,17 @@ mkTupleStr Unboxed = mkUnboxedTupleStr
 
 mkBoxedTupleStr :: Arity -> String
 mkBoxedTupleStr 0  = "()"
-mkBoxedTupleStr 1  = "Unit"   -- See Note [One-tuples]
+mkBoxedTupleStr 1  = "Solo"   -- See Note [One-tuples]
 mkBoxedTupleStr ar = '(' : commas ar ++ ")"
 
 mkUnboxedTupleStr :: Arity -> String
 mkUnboxedTupleStr 0  = "(##)"
-mkUnboxedTupleStr 1  = "Unit#"  -- See Note [One-tuples]
+mkUnboxedTupleStr 1  = "Solo#"  -- See Note [One-tuples]
 mkUnboxedTupleStr ar = "(#" ++ commas ar ++ "#)"
 
 mkConstraintTupleStr :: Arity -> String
 mkConstraintTupleStr 0  = "(%%)"
-mkConstraintTupleStr 1  = "Unit%"   -- See Note [One-tuples]
+mkConstraintTupleStr 1  = "Solo%"   -- See Note [One-tuples]
 mkConstraintTupleStr ar = "(%" ++ commas ar ++ "%)"
 
 commas :: Arity -> String


=====================================
compiler/GHC/Builtin/Utils.hs
=====================================
@@ -127,7 +127,7 @@ knownKeyNames
     all_names =
       -- We exclude most tuples from this list—see
       -- Note [Infinite families of known-key names] in GHC.Builtin.Names.
-      -- We make an exception for Unit (i.e., the boxed 1-tuple), since it does
+      -- We make an exception for Solo (i.e., the boxed 1-tuple), since it does
       -- not use special syntax like other tuples.
       -- See Note [One-tuples] (Wrinkle: Make boxed one-tuple names have known keys)
       -- in GHC.Builtin.Types.


=====================================
compiler/GHC/Core/Make.hs
=====================================
@@ -344,12 +344,12 @@ We could do one of two things:
     mkCoreTup [e1] = e1
 
 * Build a one-tuple (see Note [One-tuples] in GHC.Builtin.Types)
-    mkCoreTup1 [e1] = Unit e1
+    mkCoreTup1 [e1] = Solo e1
   We use a suffix "1" to indicate this.
 
 Usually we want the former, but occasionally the latter.
 
-NB: The logic in tupleDataCon knows about () and Unit and (,), etc.
+NB: The logic in tupleDataCon knows about () and Solo and (,), etc.
 
 Note [Don't flatten tuples from HsSyn]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


=====================================
compiler/GHC/Hs/Expr.hs
=====================================
@@ -983,7 +983,7 @@ ppr_expr (SectionR _ op expr)
 
 ppr_expr (ExplicitTuple _ exprs boxity)
     -- Special-case unary boxed tuples so that they are pretty-printed as
-    -- `Unit x`, not `(x)`
+    -- `Solo x`, not `(x)`
   | [L _ (Present _ expr)] <- exprs
   , Boxed <- boxity
   = hsep [text (mkTupleStr Boxed 1), ppr expr]


=====================================
compiler/GHC/Hs/Pat.hs
=====================================
@@ -570,7 +570,7 @@ pprPat (SigPat _ pat ty)        = ppr pat <+> dcolon <+> ppr_ty
 pprPat (ListPat _ pats)         = brackets (interpp'SP pats)
 pprPat (TuplePat _ pats bx)
     -- Special-case unary boxed tuples so that they are pretty-printed as
-    -- `Unit x`, not `(x)`
+    -- `Solo x`, not `(x)`
   | [pat] <- pats
   , Boxed <- bx
   = hcat [text (mkTupleStr Boxed 1), pprParendLPat appPrec pat]


=====================================
compiler/GHC/Hs/Type.hs
=====================================
@@ -1663,7 +1663,7 @@ ppr_mono_ty (HsTyVar _ prom (L _ name))
 ppr_mono_ty (HsFunTy _ ty1 ty2)   = ppr_fun_ty ty1 ty2
 ppr_mono_ty (HsTupleTy _ con tys)
     -- Special-case unary boxed tuples so that they are pretty-printed as
-    -- `Unit x`, not `(x)`
+    -- `Solo x`, not `(x)`
   | [ty] <- tys
   , BoxedTuple <- std_con
   = sep [text (mkTupleStr Boxed 1), ppr_mono_lty ty]
@@ -1684,7 +1684,7 @@ ppr_mono_ty (HsExplicitListTy _ prom tys)
   | otherwise       = brackets (interpp'SP tys)
 ppr_mono_ty (HsExplicitTupleTy _ tys)
     -- Special-case unary boxed tuples so that they are pretty-printed as
-    -- `'Unit x`, not `'(x)`
+    -- `'Solo x`, not `'(x)`
   | [ty] <- tys
   = quote $ sep [text (mkTupleStr Boxed 1), ppr_mono_lty ty]
   | otherwise


=====================================
compiler/GHC/HsToCore/Utils.hs
=====================================
@@ -567,10 +567,10 @@ There are two cases.
    * The pattern binds exactly one variable
         let !(Just (Just x) = e in body
      ==>
-       let { t = case e of Just (Just v) -> Unit v
-           ; v = case t of Unit v -> v }
+       let { t = case e of Just (Just v) -> Solo v
+           ; v = case t of Solo v -> v }
        in t `seq` body
-    The 'Unit' is a one-tuple; see Note [One-tuples] in GHC.Builtin.Types
+    The 'Solo' is a one-tuple; see Note [One-tuples] in GHC.Builtin.Types
     Note that forcing 't' makes the pattern match happen,
     but does not force 'v'.
 
@@ -584,8 +584,8 @@ There are two cases.
 ------ Examples ----------
   *   !(_, (_, a)) = e
     ==>
-      t = case e of (_, (_, a)) -> Unit a
-      a = case t of Unit a -> a
+      t = case e of (_, (_, a)) -> Solo a
+      a = case t of Solo a -> a
 
     Note that
      - Forcing 't' will force the pattern to match fully;
@@ -595,8 +595,8 @@ There are two cases.
 
   *   !(Just x) = e
     ==>
-      t = case e of Just x -> Unit x
-      x = case t of Unit x -> x
+      t = case e of Just x -> Solo x
+      x = case t of Solo x -> x
 
     Again, forcing 't' will fail if 'e' yields Nothing.
 
@@ -607,12 +607,12 @@ work out well:
 
     let Just (Just v) = e in body
   ==>
-    let t = case e of Just (Just v) -> Unit v
-        v = case t of Unit v -> v
+    let t = case e of Just (Just v) -> Solo v
+        v = case t of Solo v -> v
     in body
   ==>
-    let v = case (case e of Just (Just v) -> Unit v) of
-              Unit v -> v
+    let v = case (case e of Just (Just v) -> Solo v) of
+              Solo v -> v
     in body
   ==>
     let v = case e of Just (Just v) -> v


=====================================
compiler/GHC/Iface/Type.hs
=====================================
@@ -1524,7 +1524,7 @@ pprTuple ctxt_prec sort promoted args =
     ppr_tuple_app :: [IfaceType] -> SDoc -> SDoc
     ppr_tuple_app args_wo_runtime_reps ppr_args_w_parens
         -- Special-case unary boxed tuples so that they are pretty-printed as
-        -- `Unit x`, not `(x)`
+        -- `Solo x`, not `(x)`
       | [_] <- args_wo_runtime_reps
       , BoxedTuple <- sort
       = let unit_tc_info = IfaceTyConInfo promoted IfaceNormalTyCon


=====================================
compiler/GHC/Tc/Gen/HsType.hs
=====================================
@@ -1051,28 +1051,28 @@ GHC provides unary tuples and unboxed tuples (see Note [One-tuples] in
 GHC.Builtin.Types) but does *not* provide unary constraint tuples. Why? First,
 recall the definition of a unary tuple data type:
 
-  data Unit a = Unit a
+  data Solo a = Solo a
 
-Note that `Unit a` is *not* the same thing as `a`, since Unit is boxed and
-lazy. Therefore, the presence of `Unit` matters semantically. On the other
+Note that `Solo a` is *not* the same thing as `a`, since Solo is boxed and
+lazy. Therefore, the presence of `Solo` matters semantically. On the other
 hand, suppose we had a unary constraint tuple:
 
-  class a => Unit% a
+  class a => Solo% a
 
-This compiles down a newtype (i.e., a cast) in Core, so `Unit% a` is
+This compiles down a newtype (i.e., a cast) in Core, so `Solo% a` is
 semantically equivalent to `a`. Therefore, a 1-tuple constraint would have
 no user-visible impact, nor would it allow you to express anything that
 you couldn't otherwise.
 
-We could simply add Unit% for consistency with tuples (Unit) and unboxed
-tuples (Unit#), but that would require even more magic to wire in another
+We could simply add Solo% for consistency with tuples (Solo) and unboxed
+tuples (Solo#), but that would require even more magic to wire in another
 magical class, so we opt not to do so. We must be careful, however, since
 one can try to sneak in uses of unary constraint tuples through Template
 Haskell, such as in this program (from #17511):
 
   f :: $(pure (ForallT [] [TupleT 1 `AppT` (ConT ''Show `AppT` ConT ''Int)]
                        (ConT ''String)))
-  -- f :: Unit% (Show Int) => String
+  -- f :: Solo% (Show Int) => String
   f = "abc"
 
 This use of `TupleT 1` will produce an HsBoxedOrConstraintTuple of arity 1,
@@ -1081,7 +1081,7 @@ it as thought it were a constraint tuple, which can potentially lead to
 trouble if one attempts to look up the name of a constraint tuple of arity
 1 (as it won't exist). To avoid this trouble, we simply take any unary
 constraint tuples discovered when typechecking and drop them—i.e., treat
-"Unit% a" as though the user had written "a". This is always safe to do
+"Solo% a" as though the user had written "a". This is always safe to do
 since the two constraints should be semantically equivalent.
 -}
 


=====================================
libraries/ghc-prim/GHC/Tuple.hs
=====================================
@@ -29,7 +29,7 @@ data () = ()
 -- The desugarer uses 1-tuples,
 -- but "()" is already used up for 0-tuples
 -- See Note [One-tuples] in GHC.Builtin.Types
-data Unit a = Unit a
+data Solo a = Solo a
 
 data (a,b) = (a,b)
 data (a,b,c) = (a,b,c)


=====================================
libraries/ghc-prim/changelog.md
=====================================
@@ -1,4 +1,4 @@
-## 0.6.2 (edit as necessary)
+## 0.7.0 (edit as necessary)
 
 - Shipped with GHC 8.12.1
 
@@ -17,6 +17,8 @@
   If the folding function is known this allows for unboxing of the
   Char argument resulting in much faster code.
 
+- Renamed the singleton tuple `GHC.Tuple.Unit` to `GHC.Tuple.Solo`.
+
 ## 0.6.1 (edit as necessary)
 
 - Shipped with GHC 8.10.1


=====================================
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
=====================================
@@ -1587,7 +1587,7 @@ mk_tup_name n space boxed
     withParens thing
       | boxed     = "("  ++ thing ++ ")"
       | otherwise = "(#" ++ thing ++ "#)"
-    tup_occ | n == 1    = if boxed then "Unit" else "Unit#"
+    tup_occ | n == 1    = if boxed then "Solo" else "Solo#"
             | otherwise = withParens (replicate n_commas ',')
     n_commas = n - 1
     tup_mod  = mkModName "GHC.Tuple"


=====================================
testsuite/tests/deriving/should_fail/T15073.stderr
=====================================
@@ -3,7 +3,7 @@ T15073.hs:8:12: error:
     • Illegal unboxed tuple type as function argument: (# Foo a #)
       Perhaps you intended to use UnboxedTuples
     • In the type signature:
-        p :: Foo a -> Unit# @'GHC.Types.LiftedRep (Foo a)
+        p :: Foo a -> Solo# @'GHC.Types.LiftedRep (Foo a)
       When typechecking the code for ‘p’
         in a derived instance for ‘P (Foo a)’:
         To see the code I am typechecking, use -ddump-deriv


=====================================
testsuite/tests/ghc-api/annotations/parseTree.stdout
=====================================
@@ -1,11 +1,11 @@
-[(AnnotationTuple.hs:14:20, [p], Unit 1),
- (AnnotationTuple.hs:14:23-29, [p], Unit "hello"),
- (AnnotationTuple.hs:14:35-37, [p], Unit 6.5),
+[(AnnotationTuple.hs:14:20, [p], Solo 1),
+ (AnnotationTuple.hs:14:23-29, [p], Solo "hello"),
+ (AnnotationTuple.hs:14:35-37, [p], Solo 6.5),
  (AnnotationTuple.hs:14:39, [m], ()),
- (AnnotationTuple.hs:14:41-52, [p], Unit [5, 5, 6, 7]),
- (AnnotationTuple.hs:16:8, [p], Unit 1),
- (AnnotationTuple.hs:16:11-17, [p], Unit "hello"),
- (AnnotationTuple.hs:16:20-22, [p], Unit 6.5),
+ (AnnotationTuple.hs:14:41-52, [p], Solo [5, 5, 6, 7]),
+ (AnnotationTuple.hs:16:8, [p], Solo 1),
+ (AnnotationTuple.hs:16:11-17, [p], Solo "hello"),
+ (AnnotationTuple.hs:16:20-22, [p], Solo 6.5),
  (AnnotationTuple.hs:16:24, [m], ()),
  (AnnotationTuple.hs:16:25, [m], ()),
  (AnnotationTuple.hs:16:26, [m], ()), (<no location info>, [m], ())]


=====================================
testsuite/tests/th/T17380.stderr
=====================================
@@ -1,39 +1,39 @@
 
 T17380.hs:9:7: error:
-    • Couldn't match expected type ‘Unit (Maybe String)’
+    • Couldn't match expected type ‘Solo (Maybe String)’
                   with actual type ‘Maybe [Char]’
     • In the expression: Just "wat"
       In an equation for ‘foo’: foo = Just "wat"
 
 T17380.hs:12:8: error:
     • Couldn't match expected type ‘Maybe String’
-                  with actual type ‘Unit (Maybe [Char])’
-    • In the expression: Unit Just "wat"
-      In an equation for ‘bar’: bar = (Unit Just "wat")
+                  with actual type ‘Solo (Maybe [Char])’
+    • In the expression: Solo Just "wat"
+      In an equation for ‘bar’: bar = (Solo Just "wat")
 
 T17380.hs:15:6: error:
-    • Couldn't match expected type ‘Unit (Maybe String)’
+    • Couldn't match expected type ‘Solo (Maybe String)’
                   with actual type ‘Maybe [Char]’
     • In the pattern: Just "wat"
       In an equation for ‘baz’: baz (Just "wat") = Just "frerf"
 
 T17380.hs:18:7: error:
     • Couldn't match expected type ‘Maybe String’
-                  with actual type ‘Unit (Maybe [Char])’
-    • In the pattern: Unit(Just "wat")
-      In an equation for ‘quux’: quux (Unit(Just "wat")) = Just "frerf"
+                  with actual type ‘Solo (Maybe [Char])’
+    • In the pattern: Solo(Just "wat")
+      In an equation for ‘quux’: quux (Solo(Just "wat")) = Just "frerf"
 
 T17380.hs:21:8: error:
-    • Couldn't match type ‘Maybe String’ with ‘'Unit (Maybe String)’
-      Expected type: Proxy ('Unit (Maybe String))
+    • Couldn't match type ‘Maybe String’ with ‘'Solo (Maybe String)’
+      Expected type: Proxy ('Solo (Maybe String))
         Actual type: Proxy (Maybe String)
     • In the expression: Proxy :: Proxy (Maybe String)
       In an equation for ‘quuz’: quuz = Proxy :: Proxy (Maybe String)
 
 T17380.hs:24:8: error:
-    • Couldn't match type ‘'Unit (Maybe String)’ with ‘Maybe String’
+    • Couldn't match type ‘'Solo (Maybe String)’ with ‘Maybe String’
       Expected type: Proxy (Maybe String)
-        Actual type: Proxy ('Unit (Maybe String))
-    • In the expression: Proxy :: Proxy ('Unit Maybe String)
+        Actual type: Proxy ('Solo (Maybe String))
+    • In the expression: Proxy :: Proxy ('Solo Maybe String)
       In an equation for ‘fred’:
-          fred = Proxy :: Proxy ('Unit Maybe String)
+          fred = Proxy :: Proxy ('Solo Maybe String)


=====================================
testsuite/tests/th/T18097.hs
=====================================
@@ -4,11 +4,11 @@ module T18097 where
 import Language.Haskell.TH
 import GHC.Tuple
 
-f = case $( tupE [ [| "ok" |] ] ) of Unit x -> putStrLn x
-g = case Unit "ok" of $( tupP [ [p| x |] ] ) -> putStrLn x
+f = case $( tupE [ [| "ok" |] ] ) of Solo x -> putStrLn x
+g = case Solo "ok" of $( tupP [ [p| x |] ] ) -> putStrLn x
 
 h :: $( tupleT 1 ) String
-h = Unit "ok"
+h = Solo "ok"
 
-i :: Unit String
+i :: Solo String
 i = $( tupE [ [| "ok" |] ] )


=====================================
testsuite/tests/th/T8761.stderr
=====================================
@@ -1,5 +1,5 @@
 pattern Q1 x1_0 x2_1 x3_2 <- ((x1_0, x2_1), [x3_2], _, _)
-pattern x1_0 Q2 x2_1 = GHC.Tuple.Unit (x1_0, x2_1)
+pattern x1_0 Q2 x2_1 = GHC.Tuple.Solo (x1_0, x2_1)
 pattern Q3 {qx3, qy3, qz3} <- ((qx3, qy3), [qz3]) where
                                   Q3 qx3 qy3 qz3 = ((qx3, qy3), [qz3])
 T8761.hs:(16,1)-(39,13): Splicing declarations
@@ -28,7 +28,7 @@ T8761.hs:(16,1)-(39,13): Splicing declarations
        return pats
   ======>
     pattern Q1 x1 x2 x3 <- ((x1, x2), [x3], _, _)
-    pattern x1 `Q2` x2 = Unit(x1, x2)
+    pattern x1 `Q2` x2 = Solo(x1, x2)
     pattern Q3{qx3, qy3, qz3} <- ((qx3, qy3), [qz3]) where
                                 Q3 qx3 qy3 qz3 = ((qx3, qy3), [qz3])
 T8761.hs:(42,1)-(46,29): Splicing declarations


=====================================
testsuite/tests/th/TH_1tuple.stderr
=====================================
@@ -1,7 +1,7 @@
 
 TH_1tuple.hs:11:6: error:
-    • Expecting one more argument to ‘Unit’
-      Expected a type, but ‘Unit’ has kind ‘* -> *’
-    • In an expression type signature: Unit
-      In the expression: 1 :: Unit
-      In an equation for ‘y’: y = (1 :: Unit)
+    • Expecting one more argument to ‘Solo’
+      Expected a type, but ‘Solo’ has kind ‘* -> *’
+    • In an expression type signature: Solo
+      In the expression: 1 :: Solo
+      In an equation for ‘y’: y = (1 :: Solo)


=====================================
testsuite/tests/th/TH_Promoted1Tuple.stderr
=====================================
@@ -1,3 +1,3 @@
 
 TH_Promoted1Tuple.hs:7:2: error:
-    Illegal type: ‘'Unit Int’ Perhaps you intended to use DataKinds
+    Illegal type: ‘'Solo Int’ Perhaps you intended to use DataKinds


=====================================
testsuite/tests/th/TH_tuple1.stdout
=====================================
@@ -1,10 +1,10 @@
 SigE (AppE (AppE (ConE GHC.Tuple.(,)) (LitE (IntegerL 1))) (LitE (IntegerL 2))) (AppT (AppT (ConT GHC.Tuple.(,)) (ConT GHC.Integer.Type.Integer)) (ConT GHC.Integer.Type.Integer))
 GHC.Tuple.(,) 1 2 :: GHC.Tuple.(,) GHC.Integer.Type.Integer
                                    GHC.Integer.Type.Integer
-SigE (AppE (ConE GHC.Tuple.Unit) (LitE (IntegerL 1))) (AppT (ConT GHC.Tuple.Unit) (ConT GHC.Integer.Type.Integer))
-GHC.Tuple.Unit 1 :: GHC.Tuple.Unit GHC.Integer.Type.Integer
+SigE (AppE (ConE GHC.Tuple.Solo) (LitE (IntegerL 1))) (AppT (ConT GHC.Tuple.Solo) (ConT GHC.Integer.Type.Integer))
+GHC.Tuple.Solo 1 :: GHC.Tuple.Solo GHC.Integer.Type.Integer
 SigE (AppE (AppE (ConE GHC.Tuple.(#,#)) (LitE (IntegerL 1))) (LitE (IntegerL 2))) (AppT (AppT (ConT GHC.Tuple.(#,#)) (ConT GHC.Integer.Type.Integer)) (ConT GHC.Integer.Type.Integer))
 GHC.Tuple.(#,#) 1 2 :: GHC.Tuple.(#,#) GHC.Integer.Type.Integer
                                        GHC.Integer.Type.Integer
-SigE (AppE (ConE GHC.Tuple.Unit#) (LitE (IntegerL 1))) (AppT (ConT GHC.Tuple.Unit#) (ConT GHC.Integer.Type.Integer))
-GHC.Tuple.Unit# 1 :: GHC.Tuple.Unit# GHC.Integer.Type.Integer
+SigE (AppE (ConE GHC.Tuple.Solo#) (LitE (IntegerL 1))) (AppT (ConT GHC.Tuple.Solo#) (ConT GHC.Integer.Type.Integer))
+GHC.Tuple.Solo# 1 :: GHC.Tuple.Solo# GHC.Integer.Type.Integer


=====================================
testsuite/tests/typecheck/should_compile/holes.stderr
=====================================
@@ -90,7 +90,7 @@ holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)]
         Nothing :: forall a. Maybe a
         Just :: forall a. a -> Maybe a
         [] :: forall a. [a]
-        Unit :: forall a. a -> Unit a
+        Solo :: forall a. a -> Solo a
         asTypeOf :: forall a. a -> a -> a
         id :: forall a. a -> a
         until :: forall a. (a -> Bool) -> (a -> a) -> a -> a


=====================================
testsuite/tests/typecheck/should_compile/holes3.stderr
=====================================
@@ -93,7 +93,7 @@ holes3.hs:11:15: error:
         Nothing :: forall a. Maybe a
         Just :: forall a. a -> Maybe a
         [] :: forall a. [a]
-        Unit :: forall a. a -> Unit a
+        Solo :: forall a. a -> Solo a
         asTypeOf :: forall a. a -> a -> a
         id :: forall a. a -> a
         until :: forall a. (a -> Bool) -> (a -> a) -> a -> a



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/68b71c4a99ef7c009e0095823950cd12408ad7fe

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/68b71c4a99ef7c009e0095823950cd12408ad7fe
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200601/cb498e43/attachment-0001.html>


More information about the ghc-commits mailing list