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
|
-- |Convert a text String with multiple vertices and faces into
|
||||||
-- a list of vertices, ordered by the faces specification.
|
-- a list of vertices, ordered by the faces specification.
|
||||||
facesToArr :: B.ByteString -> [[PT]]
|
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)
|
(faces str)
|
||||||
where
|
where
|
||||||
meshs = meshToArr
|
|
||||||
faces = rights . fmap (parseOnly parseFace) . B.lines
|
faces = rights . fmap (parseOnly parseFace) . B.lines
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user