@@ -65,7 +65,7 @@ portTypes expr =
6565 ST.Type v
6666 | V.isJson v -> return ()
6767 | V.isPrimitive v -> return ()
68− | otherwise -> err' True "an unsupported type"
68+ | otherwise -> err "an unsupported type"
6969
7070 ST.App t [] -> valid t
7171
@@ -78,7 +78,7 @@ portTypes expr =
7878 ST.App (ST.Type v) ts
7979 | V.isTuple v -> mapM_ valid ts
8080
81− ST.App _ _ -> err' True "an unsupported type"
81+ ST.App _ _ -> err "an unsupported type"
8282
8383 ST.Var _ -> err "free type variables"
8484
@@ -109,8 +109,7 @@ portTypes expr =
109109 dir inMsg outMsg = case direction of { In -> inMsg ; Out -> outMsg }
110110 txt = P.text . concat
111111
112− err = err' False
113− err' couldBeAlias kind =
112+ err kind =
114113 throw $
115114 [ txt [ "Type Error: the value ", dir "coming in" "sent out"
116115 , " through port '", name, "' is invalid." ]
@@ -119,11 +118,6 @@ portTypes expr =
119118 , txt [ "Acceptable values for ", dir "incoming" "outgoing", " ports include:" ]
120119 , txt [ " Ints, Floats, Bools, Strings, Maybes, Lists, Arrays, Tuples," ]
121120 , txt [ " Json.Values, ", dir "" "first-order functions, ", "and concrete records." ]
122− ] ++ if couldBeAlias then aliasWarning else []
123−
124− aliasWarning =
125− [ txt [ "\nType aliases are not expanded for this check (yet) so you need to do that" ]
126− , txt [ "manually for now (e.g. {x:Int,y:Int} instead of a type alias of that type)." ]
127121 ]
128122
129123occurs :: (String, TT.Variable) -> StateT TS.SolverState IO ()