From d0e155d7c17d810fb0ab77daa5c6a660660ae369 Mon Sep 17 00:00:00 2001 From: hasufell Date: Fri, 9 Jan 2015 04:05:04 +0100 Subject: [PATCH] PARSER: simplify --- Parser/Meshparser.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Parser/Meshparser.hs b/Parser/Meshparser.hs index 06d51d4..9b61f0b 100644 --- a/Parser/Meshparser.hs +++ b/Parser/Meshparser.hs @@ -13,10 +13,9 @@ import Diagrams.TwoD.Types -- |Convert a text String with multiple vertices and faces into -- a list of vertices, ordered by the faces specification. facesToArr :: B.ByteString -> [[PT]] -facesToArr str = fmap (fmap (\y -> meshs str !! (fromIntegral y - 1))) +facesToArr str = fmap (fmap (\y -> meshToArr str !! (fromIntegral y - 1))) (faces str) where - meshs = meshToArr faces = rights . fmap (parseOnly parseFace) . B.lines