Renamed the TestUtil and TreeUtil modules to TestUtils and TreeUtils, to be consistent with the Utils module

This commit is contained in:
Neil Brown 2007-12-13 19:05:29 +00:00
parent 51d5d50d45
commit 26dd2fa5c4
17 changed files with 24 additions and 24 deletions

View File

@ -38,7 +38,7 @@ genHeader = [
,"" ,""
,"import qualified AST as A" ,"import qualified AST as A"
,"import Pattern" ,"import Pattern"
,"import TreeUtil" ,"import TreeUtils"
-- Could probably auto-generate these, too: -- Could probably auto-generate these, too:
,"type F0 = Pattern" ,"type F0 = Pattern"
,"type F1 = (Data a0) => a0 -> Pattern" ,"type F1 = (Data a0) => a0 -> Pattern"

View File

@ -56,7 +56,7 @@ tock_SOURCES_hs += transformations/Unnest.hs transformations/RainUsageCheck.hs t
tock_SOURCES_hs += transformations/SimplifyComms.hs transformations/ArrayUsageCheck.hs tock_SOURCES_hs += transformations/SimplifyComms.hs transformations/ArrayUsageCheck.hs
tock_SOURCES_hs += frontends/PreprocessOccam.hs frontends/ParseRain.hs frontends/StructureOccam.hs tock_SOURCES_hs += frontends/PreprocessOccam.hs frontends/ParseRain.hs frontends/StructureOccam.hs
tock_SOURCES_hs += frontends/ParseOccam.hs frontends/RainTypes.hs frontends/RainPasses.hs frontends/ParseUtils.hs tock_SOURCES_hs += frontends/ParseOccam.hs frontends/RainTypes.hs frontends/RainPasses.hs frontends/ParseUtils.hs
tock_SOURCES_hs += common/Pass.hs common/TreeUtil.hs common/Intrinsics.hs common/EvalLiterals.hs tock_SOURCES_hs += common/Pass.hs common/TreeUtils.hs common/Intrinsics.hs common/EvalLiterals.hs
tock_SOURCES_hs += common/Pattern.hs common/Errors.hs common/ShowCode.hs common/PrettyShow.hs tock_SOURCES_hs += common/Pattern.hs common/Errors.hs common/ShowCode.hs common/PrettyShow.hs
tock_SOURCES_hs += common/EvalConstants.hs common/Utils.hs common/CompState.hs common/Types.hs tock_SOURCES_hs += common/EvalConstants.hs common/Utils.hs common/CompState.hs common/Types.hs
tock_SOURCES_hs += common/Metadata.hs common/AST.hs common/FlowGraph.hs common/FlowAlgorithms.hs tock_SOURCES_hs += common/Metadata.hs common/AST.hs common/FlowGraph.hs common/FlowAlgorithms.hs
@ -71,7 +71,7 @@ tock_SOURCES = $(tock_SOURCES_hs) frontends/LexOccam.x frontends/LexRain.x
tocktest_SOURCES = $(tock_SOURCES) tocktest_SOURCES = $(tock_SOURCES)
tocktest_SOURCES += transformations/PassTest.hs transformations/RainUsageCheckTest.hs tocktest_SOURCES += transformations/PassTest.hs transformations/RainUsageCheckTest.hs
tocktest_SOURCES += backends/GenerateCTest.hs backends/BackendPassesTest.hs tocktest_SOURCES += backends/GenerateCTest.hs backends/BackendPassesTest.hs
tocktest_SOURCES += common/TestUtil.hs common/CommonTest.hs common/FlowGraphTest.hs tocktest_SOURCES += common/TestUtils.hs common/CommonTest.hs common/FlowGraphTest.hs
tocktest_SOURCES += frontends/ParseRainTest.hs frontends/RainPassesTest.hs frontends/RainTypesTest.hs tocktest_SOURCES += frontends/ParseRainTest.hs frontends/RainPassesTest.hs frontends/RainTypesTest.hs
tocktest_SOURCES += TestMain.hs tocktest_SOURCES += TestMain.hs

View File

@ -50,7 +50,7 @@ import qualified PassTest (tests)
import qualified RainPassesTest (tests) import qualified RainPassesTest (tests)
import qualified RainTypesTest (tests) import qualified RainTypesTest (tests)
import qualified RainUsageCheckTest (qcTests) import qualified RainUsageCheckTest (qcTests)
import TestUtil import TestUtils
import Utils import Utils
-- We run all the HUnit tests before all the QuickCheck tests. -- We run all the HUnit tests before all the QuickCheck tests.

View File

@ -27,8 +27,8 @@ import Test.HUnit hiding (State)
import qualified AST as A import qualified AST as A
import BackendPasses import BackendPasses
import Pattern import Pattern
import TestUtil import TestUtils
import TreeUtil import TreeUtils
-- | Test WaitUntil guard (should be unchanged) -- | Test WaitUntil guard (should be unchanged)
testTransformWaitFor0 :: Test testTransformWaitFor0 :: Test

View File

@ -45,7 +45,7 @@ import Errors
import GenerateC import GenerateC
import GenerateCPPCSP import GenerateCPPCSP
import Metadata import Metadata
import TestUtil import TestUtils
-- | A few helper functions for writing certain characters (that won't appear in our generated C/C++ source) -- | A few helper functions for writing certain characters (that won't appear in our generated C/C++ source)
-- to the WriterT monad. Useful as simple placeholders/special values during testers. -- to the WriterT monad. Useful as simple placeholders/special values during testers.

View File

@ -26,7 +26,7 @@ import Test.HUnit hiding (State)
import qualified AST as A import qualified AST as A
import Metadata import Metadata
import TreeUtil import TreeUtils
import Types import Types
-- | Tests the isSafeConversion function: -- | Tests the isSafeConversion function:

View File

@ -50,7 +50,7 @@ import Data.Graph.Inductive
import qualified AST as A import qualified AST as A
import Metadata import Metadata
import TreeUtil import TreeUtils
import Utils import Utils
-- | A node will either have zero links out, one or more Seq links, or one or more Par links. -- | A node will either have zero links out, one or more Seq links, or one or more Par links.

View File

@ -37,7 +37,7 @@ import qualified AST as A
import FlowGraph import FlowGraph
import Metadata import Metadata
import PrettyShow import PrettyShow
import TestUtil import TestUtils
import Utils import Utils
-- | Makes a distinctive metatag for testing. The function is one-to-one. -- | Makes a distinctive metatag for testing. The function is one-to-one.

View File

@ -30,7 +30,7 @@ import CompState
import Errors import Errors
import Metadata import Metadata
import PrettyShow import PrettyShow
import TreeUtil import TreeUtils
-- | The monad in which AST-mangling passes operate. -- | The monad in which AST-mangling passes operate.
type PassM = ErrorT ErrorReport (StateT CompState IO) type PassM = ErrorT ErrorReport (StateT CompState IO)

View File

@ -36,7 +36,7 @@ If they are not equal, it shows them (using 'show') with the given message prefi
-} -}
module TestUtil where module TestUtils where
import Control.Monad.Error import Control.Monad.Error
import Control.Monad.State import Control.Monad.State
@ -52,7 +52,7 @@ import Metadata (Meta,emptyMeta)
import Pass import Pass
import Pattern import Pattern
import PrettyShow import PrettyShow
import TreeUtil import TreeUtils
import Types import Types
import Utils import Utils

View File

@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>. with this program. If not, see <http://www.gnu.org/licenses/>.
-} -}
module TreeUtil ( module TreeUtils (
MatchErrors, MatchErrors,
AnyDataItem(..), Items, castADI, AnyDataItem(..), Items, castADI,
assertPatternMatch, getMatchedItems, assertPatternMatch, getMatchedItems,

View File

@ -46,8 +46,8 @@ import qualified LexRain as L
import Metadata (Meta,emptyMeta) import Metadata (Meta,emptyMeta)
import qualified ParseRain as RP import qualified ParseRain as RP
import Pattern import Pattern
import TestUtil import TestUtils
import TreeUtil import TreeUtils
data ParseTest a = Show a => ExpPass (String, RP.RainParser a , (a -> Assertion)) | ExpFail (String, RP.RainParser a) data ParseTest a = Show a => ExpPass (String, RP.RainParser a , (a -> Assertion)) | ExpFail (String, RP.RainParser a)

View File

@ -31,7 +31,7 @@ import Metadata
import Pass import Pass
import Pattern import Pattern
import RainTypes import RainTypes
import TreeUtil import TreeUtils
import Types import Types
-- | An ordered list of the Rain-specific passes to be run. -- | An ordered list of the Rain-specific passes to be run.

View File

@ -42,8 +42,8 @@ import Pattern
import RainPasses import RainPasses
import RainTypes import RainTypes
import TagAST import TagAST
import TestUtil import TestUtils
import TreeUtil import TreeUtils
-- | A helper function that returns a simple A.Structured item (A.OnlyP m $ A.Skip m). -- | A helper function that returns a simple A.Structured item (A.OnlyP m $ A.Skip m).
skipP :: A.Structured skipP :: A.Structured

View File

@ -31,8 +31,8 @@ import Pass
import Pattern import Pattern
import RainTypes import RainTypes
import TagAST import TagAST
import TestUtil import TestUtils
import TreeUtil import TreeUtils
import Types import Types
-- | Tests that constants in expressions are folded properly. TODO these tests could do with a lot of expanding. -- | Tests that constants in expressions are folded properly. TODO these tests could do with a lot of expanding.

View File

@ -30,8 +30,8 @@ import Metadata
import Pattern import Pattern
import SimplifyComms import SimplifyComms
import SimplifyExprs import SimplifyExprs
import TestUtil import TestUtils
import TreeUtil import TreeUtils
-- | A handy typed version of Nothing for use with A.Declaration -- | A handy typed version of Nothing for use with A.Declaration
noInit :: Maybe A.Expression noInit :: Maybe A.Expression

View File

@ -33,7 +33,7 @@ import qualified AST as A
import FlowGraph import FlowGraph
import Metadata import Metadata
import RainUsageCheck import RainUsageCheck
import TestUtil import TestUtils
import Utils import Utils