projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Trac #4501: a transposition error in DynFlags
[ghc-hetmet.git]
/
compiler
/
basicTypes
/
Id.lhs
diff --git
a/compiler/basicTypes/Id.lhs
b/compiler/basicTypes/Id.lhs
index
3640693
..
65ab644
100644
(file)
--- a/
compiler/basicTypes/Id.lhs
+++ b/
compiler/basicTypes/Id.lhs
@@
-76,6
+76,7
@@
module Id (
idOccInfo,
-- ** Writing 'IdInfo' fields
idOccInfo,
-- ** Writing 'IdInfo' fields
+ setIdUnfoldingLazily,
setIdUnfolding,
setIdArity,
setIdDemandInfo,
setIdUnfolding,
setIdArity,
setIdDemandInfo,
@@
-119,7
+120,8
@@
import Util( count )
import StaticFlags
-- infixl so you can say (id `set` a `set` b)
import StaticFlags
-- infixl so you can say (id `set` a `set` b)
-infixl 1 `setIdUnfolding`,
+infixl 1 `setIdUnfoldingLazily`,
+ `setIdUnfolding`,
`setIdArity`,
`setIdOccInfo`,
`setIdDemandInfo`,
`setIdArity`,
`setIdOccInfo`,
`setIdDemandInfo`,
@@
-170,7
+172,7
@@
localiseId :: Id -> Id
-- Make an with the same unique and type as the
-- incoming Id, but with an *Internal* Name and *LocalId* flavour
localiseId id
-- Make an with the same unique and type as the
-- incoming Id, but with an *Internal* Name and *LocalId* flavour
localiseId id
- | isLocalId id && isInternalName name
+ | ASSERT( isId id ) isLocalId id && isInternalName name
= id
| otherwise
= mkLocalIdWithInfo (localiseName name) (idType id) (idInfo id)
= id
| otherwise
= mkLocalIdWithInfo (localiseName name) (idType id) (idInfo id)
@@
-496,6
+498,9
@@
realIdUnfolding :: Id -> Unfolding
-- Expose the unfolding if there is one, including for loop breakers
realIdUnfolding id = unfoldingInfo (idInfo id)
-- Expose the unfolding if there is one, including for loop breakers
realIdUnfolding id = unfoldingInfo (idInfo id)
+setIdUnfoldingLazily :: Id -> Unfolding -> Id
+setIdUnfoldingLazily id unfolding = modifyIdInfo (`setUnfoldingInfoLazily` unfolding) id
+
setIdUnfolding :: Id -> Unfolding -> Id
setIdUnfolding id unfolding = modifyIdInfo (`setUnfoldingInfo` unfolding) id
setIdUnfolding :: Id -> Unfolding -> Id
setIdUnfolding id unfolding = modifyIdInfo (`setUnfoldingInfo` unfolding) id