on master help sign in
produce a value for (fromManyNames [])
7b6e571Evan Czaplicki
compiler/src/Data/Name.hs+9−1
@@ -303,7 +303,9 @@ fromManyNames :: [Name] -> Name
303fromManyNames names =
303fromManyNames names =
304 case names of
304 case names of
305 [] ->
305 [] ->
306− error "trying to use fromManyNames on an empty list"
306+ blank
307+ -- this case is needed for (let _ = Debug.log "x" x in ...)
308+ -- but maybe unused patterns should be stripped out instead
307
309
308 Utf8.Utf8 ba# : _ ->
310 Utf8.Utf8 ba# : _ ->
309 let
311 let
@@ -327,6 +329,12 @@ fromManyNames names =
327 )
329 )
328
330
329
331
332+{-# NOINLINE blank #-}
333+blank :: Name
334+blank =
335+ fromWords [0x5F,0x4D,0x24] {-_M$-}
336+
337+
330
338
331-- FROM WORDS
339-- FROM WORDS
332
340