on master help sign in
Update for rename of `crash` to `todo`
commit72911f0f2ac114ad14f4b84c449066afc6a87d92 authorEvan Czaplicki <evancz@users.noreply.github.com> dateTue 3 Apr 2018, 14:30 (9 years ago) parent7ddee33
2 files changed+4−4
compiler/src/Generate/JavaScript/Expression.hs+3−3 compiler/src/Reporting/Error/Pattern.hs+1−1
compiler/src/Generate/JavaScript/Expression.hs+3−3
@@ -287,18 +287,18 @@ generateRecord mode fields =
287287
288288generateDebug :: N.Name -> ModuleName.Canonical -> R.Region -> Maybe N.Name -> JS.Expr
289289generateDebug name (ModuleName.Canonical _ home) region unhandledValueName =
290− if name /= "crash" then
290+ if name /= "todo" then
291291 JS.Ref (Name.fromGlobal ModuleName.debug name)
292292 else
293293 case unhandledValueName of
294294 Nothing ->
295− JS.Call (JS.Ref (Name.fromKernel N.utils "crash")) $
295+ JS.Call (JS.Ref (Name.fromKernel N.debug "todo")) $
296296 [ JS.String (N.toBuilder home)
297297 , regionToJsExpr region
298298 ]
299299
300300 Just valueName ->
301− JS.Call (JS.Ref (Name.fromKernel N.utils "crashCase")) $
301+ JS.Call (JS.Ref (Name.fromKernel N.debug "todoCase")) $
302302 [ JS.String (N.toBuilder home)
303303 , regionToJsExpr region
304304 , JS.Ref (Name.fromLocal valueName)
compiler/src/Reporting/Error/Pattern.hs+1−1
@@ -84,7 +84,7 @@ toReport source err =
8484 , H.reflow $
8585 "I would have to crash if I saw one of those. Add branches for them!"
8686 , H.link "Hint"
87− "If you want to write the code for each branch later, use `Debug.crash` as a placeholder. Read"
87+ "If you want to write the code for each branch later, use `Debug.todo` as a placeholder. Read"
8888 "missing-patterns"
8989 "for more guidance on this workflow."
9090 ]