Skip to content

Commit 17d20b5

Browse files
committed
core: derivation test, use Text.Lazy.IO
1 parent 42f56f5 commit 17d20b5

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

hnix-store-core/tests/Derivation.hs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,20 @@ import Test.Tasty.Golden (goldenVsFile)
77
import System.Nix.Derivation (parseDerivation, buildDerivation)
88

99
import Data.Default.Class (Default(def))
10-
import qualified Data.Attoparsec.Text
11-
import qualified Data.Text.IO
12-
import qualified Data.Text.Lazy
10+
import qualified Data.Attoparsec.Text.Lazy
11+
import qualified Data.Text.Lazy.IO
1312
import qualified Data.Text.Lazy.Builder
1413

1514
processDerivation :: FilePath -> FilePath -> IO ()
1615
processDerivation source dest = do
17-
contents <- Data.Text.IO.readFile source
16+
contents <- Data.Text.Lazy.IO.readFile source
1817
either
1918
fail
20-
(Data.Text.IO.writeFile dest
21-
. Data.Text.Lazy.toStrict
19+
(Data.Text.Lazy.IO.writeFile dest
2220
. Data.Text.Lazy.Builder.toLazyText
2321
. buildDerivation def
2422
)
25-
(Data.Attoparsec.Text.parseOnly
23+
(Data.Attoparsec.Text.Lazy.parseOnly
2624
(parseDerivation def)
2725
contents
2826
)

0 commit comments

Comments
 (0)