on master help sign in
switch to "custom type" and "variants" as much as possible

Fixes https://github.com/elm/compiler/pull/1847

commita3ae92dcc04a91ac8e404a545f43f90875becf4d authorEvan Czaplicki <evancz@users.noreply.github.com> dateFri 19 Jul 2019, 13:43 (7 years ago) parent212552f
1 file changed+4−4
compiler/src/Reporting/Error/Canonicalize.hs+4−4
compiler/src/Reporting/Error/Canonicalize.hs+4−4
@@ -274,7 +274,7 @@ toReport source err =
274274 "You have declared that `" ++ Name.toChars name ++ "` is an effect type:"
275275 ,
276276 D.reflow $
277− "But I cannot find a union type named `" ++ Name.toChars name ++ "` in this file!"
277+ "But I cannot find a custom type named `" ++ Name.toChars name ++ "` in this file!"
278278 )
279279
280280 EffectFunctionNotFound region name ->
@@ -342,7 +342,7 @@ toReport source err =
342342 Code.toSnippet source region Nothing
343343 (
344344 D.reflow $
345− "The (..) syntax is for exposing union type constructors. It cannot be used with a type alias like `"
345+ "The (..) syntax is for exposing variants of a custom type. It cannot be used with a type alias like `"
346346 ++ Name.toChars name ++ "` though."
347347 ,
348348 D.reflow $
@@ -355,12 +355,12 @@ toReport source err =
355355 (
356356 D.reflow $
357357 "You are trying to import the `" <> Name.toChars ctor
358− <> "` type constructor by name:"
358+ <> "` variant by name:"
359359 ,
360360 D.fillSep
361361 ["Try","importing",D.green (D.fromName tipe <> "(..)"),"instead."
362362 ,"The","dots","mean","“expose","the",D.fromName tipe,"type","and"
363− ,"all","its","constructors”","so","it","gives","you","access","to"
363+ ,"all","its","variants","so","it","gives","you","access","to"
364364 , D.fromName ctor <> "."
365365 ]
366366 )