PARSER: simplify
This commit is contained in:
parent
8058a43ee4
commit
d0e155d7c1
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user