From: Matthijs Kooijman Date: Tue, 3 Mar 2009 23:50:09 +0000 (+0100) Subject: Remove the now obsolete getOwnStates. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=1916a5498a667b3d1cd4321d555ab40c0a55de00;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Remove the now obsolete getOwnStates. --- diff --git a/Flatten.hs b/Flatten.hs index 1eaa0ff..325f742 100644 --- a/Flatten.hs +++ b/Flatten.hs @@ -442,28 +442,4 @@ stateList :: stateList uses signals = Maybe.catMaybes $ Foldable.toList $ zipValueMapsWith filterState signals uses --- | Returns pairs of signals that should be mapped to state in this function. -getOwnStates :: - HsFunction -- | The function to look at - -> FlatFunction -- | The function to look at - -> [(StateId, SignalInfo, SignalInfo)] - -- | The state signals. The first is the state number, the second the - -- signal to assign the current state to, the last is the signal - -- that holds the new state. - -getOwnStates hsfunc flatfunc = - [(old_num, old_info, new_info) - | (old_num, old_info) <- args_states - , (new_num, new_info) <- res_states - , old_num == new_num] - where - sigs = flat_sigs flatfunc - -- Translate args and res to lists of (statenum, sigid) - args = concat $ zipWith stateList (hsFuncArgs hsfunc) (flat_args flatfunc) - res = stateList (hsFuncRes hsfunc) (flat_res flatfunc) - -- Replace the second tuple element with the corresponding SignalInfo - args_states = map (Arrow.second $ signalInfo sigs) args - res_states = map (Arrow.second $ signalInfo sigs) res - - -- vim: set ts=8 sw=2 sts=2 expandtab: