2 import Translator (HsValueMap)
5 data FlatFunction = FlatFunction {
6 args :: [SignalDefMap],
13 type SignalUseMap = HsValueMap SignalUse
14 type SignalDefMap = HsValueMap SignalDef
16 data SignalUse = SignalUse {
20 data SignalDef = SignalDef {
25 appFunc :: HsFunction,
26 appArgs :: [SignalUseMap],
27 appRes :: SignalDefMap
30 data CondDef = CondDef {
37 -- | How is a given (single) value in a function's type (ie, argument or
38 -- return value) used?
40 Port -- ^ Use it as a port (input or output)
41 | State Int -- ^ Use it as state (input or output). The int is used to
42 -- match input state to output state.
43 | HighOrder { -- ^ Use it as a high order function input
44 hoName :: String, -- ^ Which function is passed in?
45 hoArgs :: [HsUseMap] -- ^ Which arguments are already applied? This
46 -- ^ map should only contain Port and other
51 type HsUseMap = HsValueMap HsValueUse
53 data HsFunction = HsFunction {
55 hsFuncArgs :: [HsUseMap],
60 String, -- ^ The bind name
61 Either -- ^ The bind value which is either
62 SignalUse -- ^ a signal
64 HsValueUse, -- ^ or a HighOrder function
65 [SignalUse] -- ^ With these signals already applied to it
68 -- vim: set ts=8 sw=2 sts=2 expandtab: