@@ -438,20 +438,20 @@ problemToHint problem =
438 T.MissingArgs _ -> []
438 T.MissingArgs _ -> []
439 T.ReturnMismatch -> []
439 T.ReturnMismatch -> []
441− T.BadFlexSuper super _ tipe ->
441+ T.BadFlexSuper direction super _ tipe ->
442 case tipe of
442 case tipe of
443− T.Lambda _ _ _ -> badFlexSuper super tipe
443+ T.Lambda _ _ _ -> badFlexSuper direction super tipe
444 T.Infinite -> []
444 T.Infinite -> []
445 T.Error -> []
445 T.Error -> []
446 T.FlexVar _ -> []
446 T.FlexVar _ -> []
447 T.FlexSuper s _ -> badFlexFlexSuper super s
447 T.FlexSuper s _ -> badFlexFlexSuper super s
448 T.RigidVar y -> badRigidVar y (toASuperThing super)
448 T.RigidVar y -> badRigidVar y (toASuperThing super)
449 T.RigidSuper s _ -> badRigidSuper s (toASuperThing super)
449 T.RigidSuper s _ -> badRigidSuper s (toASuperThing super)
450− T.Type _ _ _ -> badFlexSuper super tipe
450+ T.Type _ _ _ -> badFlexSuper direction super tipe
451− T.Record _ _ -> badFlexSuper super tipe
451+ T.Record _ _ -> badFlexSuper direction super tipe
452− T.Unit -> badFlexSuper super tipe
452+ T.Unit -> badFlexSuper direction super tipe
453− T.Tuple _ _ _ -> badFlexSuper super tipe
453+ T.Tuple _ _ _ -> badFlexSuper direction super tipe
454− T.Alias _ _ _ _ -> badFlexSuper super tipe
454+ T.Alias _ _ _ _ -> badFlexSuper direction super tipe
456 T.BadRigidVar x tipe ->
456 T.BadRigidVar x tipe ->
457 case tipe of
457 case tipe of
@@ -535,7 +535,7 @@ badDoubleRigid x y =
535 [ D.toSimpleHint $
535 [ D.toSimpleHint $
536 "Your type annotation uses `" ++ N.toString x ++ "` and `" ++ N.toString y ++
536 "Your type annotation uses `" ++ N.toString x ++ "` and `" ++ N.toString y ++
537 "` as separate type variables. Your code seems to be saying they are the\
537 "` as separate type variables. Your code seems to be saying they are the\
538− \ same though! Maybe they should be the same in your type annotation?\
538+ \ same though. Maybe they should be the same in your type annotation?\
539 \ Maybe your code uses them in a weird way?"
539 \ Maybe your code uses them in a weird way?"
540 , D.reflowLink "Read" "type-annotations" "for more advice!"
540 , D.reflowLink "Read" "type-annotations" "for more advice!"
@@ -554,30 +554,16 @@ toASuperThing super =
554-- BAD SUPER HINTS
554-- BAD SUPER HINTS
557−badFlexSuper :: T.Super -> T.Type -> [D.Doc]
557+badFlexSuper :: T.Direction -> T.Super -> T.Type -> [D.Doc]
558−badFlexSuper super tipe =
558+badFlexSuper direction super tipe =
559 case super of
559 case super of
560 T.Comparable ->
560 T.Comparable ->
561 [ D.toSimpleHint "Only ints, floats, chars, strings, lists, and tuples are comparable."
561 [ D.toSimpleHint "Only ints, floats, chars, strings, lists, and tuples are comparable."
564 T.Appendable ->
564 T.Appendable ->
566− T.Type home name _ | T.isInt home name ->
567− [ D.toFancyHint ["Try","using",D.green"String.fromInt","to","convert","it","to","a","string?"]
570− T.Type home name _ | T.isFloat home name ->
571− [ D.toFancyHint ["Try","using",D.green"String.fromFloat","to","convert","it","to","a","string?"]
574− T.FlexSuper T.Number _ ->
575− [ D.toFancyHint ["Try","using",D.green"String.fromInt","to","convert","it","to","a","string?"]
579− [ D.toFancyHint ["Only","strings","and","lists","are","appendable.","Put","it","in",D.green "[]","to","make","it","a","list?"]
565+ [ D.toSimpleHint "Only strings and lists are appendable."
582 T.CompAppend ->
568 T.CompAppend ->
583 [ D.toSimpleHint "Only strings and lists are both comparable and appendable."
569 [ D.toSimpleHint "Only strings and lists are both comparable and appendable."
@@ -586,8 +572,14 @@ badFlexSuper super tipe =
586 T.Number ->
572 T.Number ->
587 case tipe of
573 case tipe of
588 T.Type home name _ | T.isString home name ->
574 T.Type home name _ | T.isString home name ->
577+ [ D.toFancyHint ["Try","using",D.green "String.fromInt","to","convert","it","to","a","string?"]
589− [ D.toFancyHint ["Try","using",D.green"String.toInt","to","convert","it","to","a","number?"]
581+ [ D.toFancyHint ["Try","using",D.green "String.toInt","to","convert","it","to","an","integer?"]
593 [ D.toFancyHint ["Only",D.green "Int","and",D.green "Float","values","work","as","numbers."]
585 [ D.toFancyHint ["Only",D.green "Int","and",D.green "Float","values","work","as","numbers."]