summaryrefslogtreecommitdiff
path: root/compiler/ghci
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-02-26 01:46:06 +0000
committerIan Lynagh <igloo@earth.li>2012-02-26 13:04:44 +0000
commitae04bd43a2640e17a9035f170d76dae356082f88 (patch)
treef17b95d0840f4ee66ee622c03da1a96058ade347 /compiler/ghci
parent9065bdbf5299097263c35f6e389b018806f6753e (diff)
downloadhaskell-ae04bd43a2640e17a9035f170d76dae356082f88.tar.gz
Implement "value" imports with the CAPI
This allows us to import values (i.e. non-functions) with the CAPI. This means we can access values even if (on some or all platforms) they are simple #defines.
Diffstat (limited to 'compiler/ghci')
-rw-r--r--compiler/ghci/ByteCodeGen.lhs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/ghci/ByteCodeGen.lhs b/compiler/ghci/ByteCodeGen.lhs
index afc51163e3..046d6ec132 100644
--- a/compiler/ghci/ByteCodeGen.lhs
+++ b/compiler/ghci/ByteCodeGen.lhs
@@ -986,7 +986,9 @@ generateCCall d0 s p (CCallSpec target cconv safety) fn args_r_to_l
DynamicTarget
-> return (False, panic "ByteCodeGen.generateCCall(dyn)")
- StaticTarget target _
+ StaticTarget _ _ False ->
+ panic "generateCCall: unexpected FFI value import"
+ StaticTarget target _ True
-> do res <- ioToBc (lookupStaticPtr stdcall_adj_target)
return (True, res)
where