import InputOutput import Functions import Parser -- Function Main --main = control (parser (input "twoboxes.dat")) --je = do {c <- parser "12 21"; return c} -- Testes test = " 3 4 7 2 5 3 54\n 7 10 9 10 3 1 600\n10 9 4 8 1 6 312\n 3 9 5 1 6 4 111\n 4 3 2 7 6 1 -18\n 3 3 1 9 5 4 -171\n 5 9 9 1 7 6 36 3\n 1 2 9 3 9 2 -36\n 2 6 8 2 6 10 -24\n 8 1 10 7 5 1 45\n" test':: Num a => [a] test' = [3,4,7,2,5,3,54,7,10,9,10,3,1,600,10,9,4,8,1,6,312,3,9,5,1,6,4,111,4,3,2,7,6,1,-18,3,3,1,9,5,4,-171,5,9,9,1,7,6,36,3,1,2,9,3,9,2,-36,2,6,8,2,6,10,-24,8,1,10,7,5,1,45] test1 = control [3,-3,-7,-2,-5,-13,54,7,10,9,10,3,1,600,1,1,1,1,1,1,6] test2 = control [1,2,3] escritura = output "output" test1 letura = input "output" arch = input "twoboxes.dat" arch2 = readFile "twoboxes.dat"