Fixed the abbreviation modes of claimed channels a bit
This doesn't solve the problem (see #95), but it at least properly confines the problem to shared channel bundles, rather than affecting shared normal channels too.
This commit is contained in:
parent
ea2d00355c
commit
19cd8085d2
|
@ -926,7 +926,15 @@ inferTypes = occamOnlyPass "Infer types"
|
|||
t'' <- case t' of
|
||||
A.Infer -> astTypeOf (A.ActualClaim v')
|
||||
_ -> return t'
|
||||
return $ addId $ A.Is m am' t'' (A.ActualClaim v')
|
||||
am'' <- case t'' of
|
||||
-- CLAIMed channel bundles are ValAbbrev, as they may
|
||||
-- not be altered:
|
||||
A.ChanDataType {} ->
|
||||
do modifyName n $ \nd -> nd { A.ndAbbrevMode = A.ValAbbrev }
|
||||
return A.ValAbbrev
|
||||
-- CLAIMed normal channels are as before:
|
||||
_ -> return am'
|
||||
return $ addId $ A.Is m am'' t'' (A.ActualClaim v')
|
||||
A.Is m am t (A.ActualChannelArray vs) ->
|
||||
-- No expressions in this -- but we may need to infer the type
|
||||
-- of the variable if it's something like "cs IS [c]:".
|
||||
|
|
|
@ -1608,7 +1608,7 @@ claimSpec
|
|||
n <- getName v >>= getOrigName
|
||||
eol
|
||||
indent
|
||||
return ([(A.Specification m (A.Name m n) $ A.Is m A.ValAbbrev A.Infer $ A.ActualClaim v, ChannelName, normalName)], outdent)
|
||||
return ([(A.Specification m (A.Name m n) $ A.Is m A.Abbrev A.Infer $ A.ActualClaim v, ChannelName, normalName)], outdent)
|
||||
where
|
||||
getName :: A.Variable -> OccParser A.Name
|
||||
getName (A.Variable _ n) = return n
|
||||
|
|
Loading…
Reference in New Issue
Block a user