Skip to content

Commit f6bdfb0

Browse files
committed
mkProxy -> mkTypeProxyExpr
1 parent 5fe0639 commit f6bdfb0

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/comp/GenFuncWrap.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ funcDef errh symt i oqt@(CQType _ ot) i_ n (CQType _ t) =
246246
-- the result is either an actionvalue or a value
247247
isAV = isActionValue symt r
248248

249-
fnp = mkProxy $ TAp (cTCon idStrArg) $ cTStr (getIdFString i) (getIdPosition i)
249+
fnp = mkTypeProxyExpr $ TAp (cTCon idStrArg) $ cTStr (getIdFString i) (getIdPosition i)
250250
expr = cVApply id_fromWrapField [fnp, CVar i_]
251251
in
252252
-- XXX this code works for Action/ActionValue foreign funcs,

src/comp/GenWrap.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ genTo pps ty mk =
11081108
localPrefix = joinStrings_ currentPre localPrefix1
11091109
prefix = stringLiteralAt noPosition localPrefix
11101110
arg_names = mkList (getPosition f) [stringLiteralAt (getPosition i) (getIdString i) | i <- aIds]
1111-
fnp = mkProxy $ TAp (cTCon idStrArg) $ cTStr (fieldPathName prefixes f)(getIdPosition f)
1111+
fnp = mkTypeProxyExpr $ TAp (cTCon idStrArg) $ cTStr (fieldPathName prefixes f)(getIdPosition f)
11121112
-- XXX idEmpty is a horrible way to know no more selection is required
11131113
let ec = if f == idEmpty then sel else CSelect sel (setInternal f)
11141114
let e = CApply (CVar id_toWrapField) [fnp, prefix, arg_names, ec]
@@ -1202,7 +1202,7 @@ genFrom pps ty var =
12021202
let qs = if (hasNoRdy || isClock || isReset || isIot)
12031203
then [] else [CQFilter meth_guard]
12041204

1205-
let fnp = mkProxy $ TAp (cTCon idStrArg) $ cTStr (fieldPathName prefixes f) (getIdPosition f)
1205+
let fnp = mkTypeProxyExpr $ TAp (cTCon idStrArg) $ cTStr (fieldPathName prefixes f) (getIdPosition f)
12061206
let e = CApply (CVar id_fromWrapField) [fnp, sel binf]
12071207
return (f, e, qs)
12081208

@@ -1615,7 +1615,7 @@ mkFromBind true_ifc_ids var ft =
16151615
let meth_guard = CApply eUnpack [sel wbinf]
16161616
let qs = if (wbinf `elem` true_ifc_ids || isClock || isReset || isIot)
16171617
then [] else [CQFilter meth_guard]
1618-
let fnp = mkProxy $ TAp (cTCon idStrArg) $ cTStr (fieldPathName prefixes f) (getIdPosition f)
1618+
let fnp = mkTypeProxyExpr $ TAp (cTCon idStrArg) $ cTStr (fieldPathName prefixes f) (getIdPosition f)
16191619
let e = CApply (CVar id_fromWrapField) [fnp, sel binf]
16201620
return (f, e, qs)
16211621

@@ -2201,8 +2201,8 @@ mkFieldSavePortTypeStmts v ifcId = concatMapM $ meth noPrefixes ifcId
22012201
Just str -> joinStrings_ currentPre str
22022202
Nothing -> joinStrings_ currentPre methodStr
22032203

2204-
let fproxy = mkProxy $ TAp (cTCon idStrArg) $ cTStr (fieldPathName prefixes f) (getIdPosition f)
2205-
proxy = mkProxy $ foldr arrow r as
2204+
let fproxy = mkTypeProxyExpr $ TAp (cTCon idStrArg) $ cTStr (fieldPathName prefixes f) (getIdPosition f)
2205+
proxy = mkTypeProxyExpr $ foldr arrow r as
22062206
prefix = stringLiteralAt noPosition localPrefix
22072207
arg_names = mkList (getPosition f) [stringLiteralAt (getPosition i) (getIdString i) | i <- aIds]
22082208
result = stringLiteralAt noPosition resultName

src/comp/GenWrapUtils.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ getDefArgs dcls t =
8888

8989
-- ====================
9090

91-
mkProxy :: CType -> CExpr
92-
mkProxy ty = CHasType (CAny (getPosition ty) UNotUsed) $ CQType [] ty
91+
mkTypeProxyExpr :: CType -> CExpr
92+
mkTypeProxyExpr ty = CHasType (CAny (getPosition ty) UNotUsed) $ CQType [] ty
9393

9494

0 commit comments

Comments
 (0)