on master help sign in
Fix erasure from mkForeignPrim.
commit0d332f83a20b8167a2aa925367bd1c07a09f49d6 authorMatus Tejiscak <ziman@functor.sk> dateThu 30 Apr 2015, 22:12 (11 years ago) parent59f5e64
1 file changed+4−5
src/Idris/Erasure.hs+4−5
src/Idris/Erasure.hs+4−5
@@ -382,12 +382,11 @@ buildDepMap ci used externs ctx startNames
382382 P (DCon _ _ _) n _ -> conditionalDeps n args -- depends on whether (n,#) is used
383383
384384 -- mkForeign* calls must be special-cased because they are variadic
385− -- All arguments must be marked as used, except for the first one,
386− -- which is the (Foreign a) spec that defines the type
387− -- and is not needed at runtime.
385+ -- All arguments must be marked as used, except for the first four,
386+ -- which define the call type and are not needed at runtime.
388387 P _ (UN n) _
389− | n `elem` map T.pack ["mkForeignPrim"]
390− -> unconditionalDeps args -- (drop 1 args)
388+ | n == T.pack "mkForeignPrim"
389+ -> unconditionalDeps $ drop 4 args
391390
392391 -- a bound variable might draw in additional dependencies,
393392 -- think: f x = x 0 <-- here, `x' _is_ used