summaryrefslogtreecommitdiff
path: root/ghc/compiler/basicTypes/Name.lhs
diff options
context:
space:
mode:
authorsimonpj <unknown>2001-05-22 13:43:19 +0000
committersimonpj <unknown>2001-05-22 13:43:19 +0000
commitf16228e47dbaf4c5eb710bf507b3b61bc5ad7122 (patch)
tree2c32599c9a62dd63e6128a72c3d449722c053685 /ghc/compiler/basicTypes/Name.lhs
parent7df73aa7332a9e2fb4087aface97e2c5e11bd222 (diff)
downloadhaskell-f16228e47dbaf4c5eb710bf507b3b61bc5ad7122.tar.gz
[project @ 2001-05-22 13:43:14 by simonpj]
------------------------------------------- Towards generalising 'foreign' declarations ------------------------------------------- This is a first step towards generalising 'foreign' declarations to handle langauges other than C. Quite a lot of files are touched, but nothing has really changed. Everything should work exactly as before. But please be on your guard for ccall-related bugs. Main things Basic data types: ForeignCall.lhs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Remove absCSyn/CallConv.lhs * Add prelude/ForeignCall.lhs. This defines the ForeignCall type and its variants * Define ForeignCall.Safety to say whether a call is unsafe or not (was just a boolean). Lots of consequential chuffing. * Remove all CCall stuff from PrimOp, and put it in ForeignCall Take CCallOp out of the PrimOp type (where it was always a glitch) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Add IdInfo.FCallId variant to the type IdInfo.GlobalIdDetails, along with predicates Id.isFCallId, Id.isFCallId_maybe * Add StgSyn.StgOp, to sum PrimOp with FCallOp, because it *is* useful to sum them together in Stg and AbsC land. If nothing else, it minimises changes. Also generally rename "CCall" stuff to "FCall" where it's generic to all foreign calls.
Diffstat (limited to 'ghc/compiler/basicTypes/Name.lhs')
-rw-r--r--ghc/compiler/basicTypes/Name.lhs8
1 files changed, 4 insertions, 4 deletions
diff --git a/ghc/compiler/basicTypes/Name.lhs b/ghc/compiler/basicTypes/Name.lhs
index 229a0e8c9f..303e0c749a 100644
--- a/ghc/compiler/basicTypes/Name.lhs
+++ b/ghc/compiler/basicTypes/Name.lhs
@@ -10,7 +10,7 @@ module Name (
-- The Name type
Name, -- Abstract
- mkLocalName, mkSysLocalName, mkCCallName,
+ mkLocalName, mkSysLocalName, mkFCallName,
mkIPName,
mkGlobalName, mkKnownKeyGlobal, mkWiredInName,
@@ -180,10 +180,10 @@ mkSysLocalName :: Unique -> UserFS -> Name
mkSysLocalName uniq fs = Name { n_uniq = uniq, n_sort = System,
n_occ = mkVarOcc fs, n_loc = noSrcLoc }
-mkCCallName :: Unique -> EncodedString -> Name
+mkFCallName :: Unique -> EncodedString -> Name
-- The encoded string completely describes the ccall
-mkCCallName uniq str = Name { n_uniq = uniq, n_sort = Local,
- n_occ = mkCCallOcc str, n_loc = noSrcLoc }
+mkFCallName uniq str = Name { n_uniq = uniq, n_sort = Local,
+ n_occ = mkFCallOcc str, n_loc = noSrcLoc }
mkIPName :: Unique -> OccName -> Name
mkIPName uniq occ