PARSER: simplify

This commit is contained in:
hasufell 2015-01-09 04:05:04 +01:00
parent 8058a43ee4
commit d0e155d7c1
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
1 changed files with 1 additions and 2 deletions

View File

@ -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