X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=FlattenTypes.hs;h=9f080f70666eec1755c8df1897b4c5ff507222f8;hb=c9878e08917311385ce7edbb93f548788cf9df14;hp=ce1f22dc00bbece034db0108d6ae6b6f52217cc0;hpb=e2a1b9504807512be2e613c9e8822658be6fa626;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/FlattenTypes.hs b/FlattenTypes.hs index ce1f22d..9f080f7 100644 --- a/FlattenTypes.hs +++ b/FlattenTypes.hs @@ -96,6 +96,23 @@ data SigUse = | SigStateNew Int -- | Use as the new internal state | SigSubState -- | Do not use, state variable is used in a subcircuit +-- | Is this a port signal use? +isPortSigUse :: SigUse -> Bool +isPortSigUse SigPortIn = True +isPortSigUse SigPortOut = True +isPortSigUse _ = False + +-- | Is this a state signal use? Returns false for substate. +isStateSigUse :: SigUse -> Bool +isStateSigUse (SigStateOld _) = True +isStateSigUse (SigStateNew _) = True +isStateSigUse _ = False + +-- | Is this an internal signal use? +isInternalSigUse :: SigUse -> Bool +isInternalSigUse SigInternal = True +isInternalSigUse _ = False + -- | Information on a signal definition data SignalInfo = SignalInfo { sigName :: Maybe String,