on master help sign in
Never compile 'void'
6cbfdd3Edwin Brady
src/IRTS/Compiler.hs+6
@@ -246,6 +246,12 @@ irTerm vs env tm@(App _ f a) = do
246 | r == txt "replace"
246 | r == txt "replace"
247 -> irTerm vs env arg
247 -> irTerm vs env arg
248
248
249+ -- 'void' doesn't have any pattern clauses and only gets called on
250+ -- erased things in higher order contexts (also a TMP HACK...)
251+ (P _ (UN r) _, _)
252+ | r == txt "void"
253+ -> return LNothing
254+
249 -- Laziness, the old way
255 -- Laziness, the old way
250 (P _ (UN l) _, [_, arg])
256 (P _ (UN l) _, [_, arg])
251 | l == txt "lazy"
257 | l == txt "lazy"