Added a NameExternal item to NameSource, to stop using NamePredefined for externals

This commit is contained in:
Neil Brown 2009-04-04 14:56:00 +00:00
parent df21bf23ae
commit 2a321d7910
2 changed files with 2 additions and 1 deletions

View File

@ -72,6 +72,7 @@ data NameSource
= NameUser -- ^ A name from the source program
| NameNonce -- ^ A name the compiler generated
| NamePredefined -- ^ A magic name without definition (e.g. the Rain timer)
| NameExternal -- ^ A name from an external PRAGMA
deriving (Show, Eq, Typeable, Data)
-- | The direction of a channel.

View File

@ -1439,7 +1439,7 @@ pragma = do m <- getPosition >>* sourcePosToMeta
modify $ \st -> st
{ csExternals = (A.nameName n, (ext, fs)) : csExternals st
}
return $ Just (A.Specification m origN sp, nt, (Just n, A.NamePredefined))
return $ Just (A.Specification m origN sp, nt, (Just n, A.NameExternal))
ns <- case (prag, mprod) of
(Just (_, pragStr), Just prod) -> do
let column = metaColumn m + fromMaybe 0 (findIndex (=='\"') rawP)