projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make record selectors into ordinary functions
[ghc-hetmet.git]
/
compiler
/
coreSyn
/
CoreUtils.lhs
diff --git
a/compiler/coreSyn/CoreUtils.lhs
b/compiler/coreSyn/CoreUtils.lhs
index
44ca27a
..
25224a6
100644
(file)
--- a/
compiler/coreSyn/CoreUtils.lhs
+++ b/
compiler/coreSyn/CoreUtils.lhs
@@
-498,10
+498,10
@@
exprIsCheap other_expr -- Applications and variables
go (Var _) [] = True -- Just a type application of a variable
-- (f t1 t2 t3) counts as WHNF
go (Var f) args
go (Var _) [] = True -- Just a type application of a variable
-- (f t1 t2 t3) counts as WHNF
go (Var f) args
- = case globalIdDetails f of
- RecordSelId {} -> go_sel args
- ClassOpId _ -> go_sel args
- PrimOpId op -> go_primop op args
+ = case idDetails f of
+ RecSelId {} -> go_sel args
+ ClassOpId _ -> go_sel args
+ PrimOpId op -> go_primop op args
DataConWorkId _ -> go_pap args
_ | length args < idArity f -> go_pap args
DataConWorkId _ -> go_pap args
_ | length args < idArity f -> go_pap args
@@
-578,7
+578,7
@@
exprOkForSpeculation (Note _ e) = exprOkForSpeculation e
exprOkForSpeculation (Cast e _) = exprOkForSpeculation e
exprOkForSpeculation other_expr
= case collectArgs other_expr of
exprOkForSpeculation (Cast e _) = exprOkForSpeculation e
exprOkForSpeculation other_expr
= case collectArgs other_expr of
- (Var f, args) -> spec_ok (globalIdDetails f) args
+ (Var f, args) -> spec_ok (idDetails f) args
_ -> False
where
_ -> False
where