X-Git-Url: https://mattmccutchen.net/match/match.git/blobdiff_plain/a81e898068277b8f58c595faf698168dcfd83a49..refs/heads/test-20210812:/program/TestUtils.hs diff --git a/program/TestUtils.hs b/program/TestUtils.hs index 60b6f62..e842587 100644 --- a/program/TestUtils.hs +++ b/program/TestUtils.hs @@ -2,14 +2,17 @@ module TestUtils where import Control.Concurrent import Data.Array.IArray import Data.Graph.Inductive.Graph -import Data.Graph.Inductive.Graphviz +-- I couldn't find this module any more. ~ 2021-08-12 +--import Data.Graph.Inductive.Graphviz import Data.Graph.Inductive.Tree import Data.List import System.IO import System.Random import System.Posix.IO import System.Posix.Time -import System.Process +-- createPipe creates an ambiguity with System.Posix.IO.createPipe. I think +-- either should work, so hide this one. +import System.Process hiding (createPipe) import PMInstance import PMConfig import ProposalMatcher @@ -65,6 +68,9 @@ createHandlePipe = do wH <- fdToHandle wFd return (rH, wH) +{- Comment this out because it depends on Data.Graph.Inductive.Graphviz, which I + don't have access to at the moment. + -- GHCi seems to crash if I call this on a "showInstanceAsGraph" result without -- having previously forced evaluation of the matching. goGraph :: (Show a, Show b, Graph gr) => gr a b -> IO () @@ -81,6 +87,8 @@ goGraph theGraph = -- Then open the file. goFile fname +-} + -- Both-ways list difference (/\) :: Eq a => [a] -> [a] -> ([a], [a]) l1 /\ l2 = (l1 \\ l2, l2 \\ l1)