Commit 229e6bf1 authored by Hans-Peter Deifel's avatar Hans-Peter Deifel 🐢
Browse files

Fix whitespace

parent c7fc3340
......@@ -86,13 +86,13 @@ testFileMinimize mini =
process file `shouldReturn` minimized
where
process :: FilePath -> IO String
process file =
P.readFile P.defaultConfig file >>=
process file =
P.readFile P.defaultConfig file >>=
\case
Left err -> return err
Right (f, (symTab, enc)) -> do
part <- stToIO (refine (Proxy :: Proxy (Desorted SomeFunctor)) enc True)
let
let
(enc', symTab') = minimize f enc symTab part
return (LT.unpack . Build.toLazyText $ Build.fromText (printParseableFunctor f)
......@@ -103,18 +103,18 @@ testFileMinimize mini =
testFileMinimizeIdentity :: FilePath -> Spec
testFileMinimizeIdentity file =
specify ("minimizeIdentity " <> file) $ do
P.readFile P.defaultConfig file >>=
P.readFile P.defaultConfig file >>=
\case
Left err -> expectationFailure $ "initialParse: " <> err
Right (f, (symTab, enc)) -> do
part <- stToIO (refine (Proxy :: Proxy (Desorted SomeFunctor)) enc True)
let
let
(enc', symTab') = minimize f enc symTab part
coalgebra = Build.fromText (printParseableFunctor f)
coalgebra = Build.fromText (printParseableFunctor f)
<> "\n\n"
<> printEncoding enc' (anonymizeSymbols symTab') (sortTable f)
reparsed = P.parseCoalgebra P.defaultConfig "(minimized)" $ LT.toStrict (Build.toLazyText coalgebra)
case reparsed of
Left err -> expectationFailure $ "parseMinimized: " <> err
......@@ -123,7 +123,7 @@ testFileMinimizeIdentity file =
let
(enc''', symTab''') = minimize f' enc'' symTab'' part'
Build.fromText (printParseableFunctor f)
Build.fromText (printParseableFunctor f)
<> "\n\n"
<> (printEncoding enc''' (anonymizeSymbols symTab''') (sortTable f')) `shouldBe`
<> (printEncoding enc''' (anonymizeSymbols symTab''') (sortTable f')) `shouldBe`
coalgebra
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment