X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=FlattenTypes.hs;h=409c2ac249970f3e1f12593bdfb7431977a40a67;hb=ed9f3e71c71db41d85a9dabb3a676f4c342b8266;hp=fc778165b91e068cd095729bb5bb05f9e105e20a;hpb=e273d2759db01787f0599a1cbe9059864e1704d7;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/FlattenTypes.hs b/FlattenTypes.hs index fc77816..409c2ac 100644 --- a/FlattenTypes.hs +++ b/FlattenTypes.hs @@ -16,11 +16,14 @@ type SignalId = Int -- | A map of a Haskell value to signal ids type SignalMap = HsValueMap SignalId +-- | A state identifier +type StateId = Int + -- | How is a given (single) value in a function's type (ie, argument or -- return value) used? data HsValueUse = Port -- ^ Use it as a port (input or output) - | State Int -- ^ Use it as state (input or output). The int is used to + | State StateId -- ^ Use it as state (input or output). The int is used to -- match input state to output state. | HighOrder { -- ^ Use it as a high order function input hoName :: String, -- ^ Which function is passed in? @@ -92,8 +95,8 @@ data SigUse = SigPortIn -- | Use as an input port | SigPortOut -- | Use as an input port | SigInternal -- | Use as an internal signal - | SigStateOld Int -- | Use as the current internal state - | SigStateNew Int -- | Use as the new internal state + | SigStateOld StateId -- | Use as the current internal state + | SigStateNew StateId -- | Use as the new internal state | SigSubState -- | Do not use, state variable is used in a subcircuit -- | Is this a port signal use?