Added a NameExternal item to NameSource, to stop using NamePredefined for externals
This commit is contained in:
parent
df21bf23ae
commit
2a321d7910
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user