Created
November 5, 2014 18:13
-
-
Save codedmart/a029c7edef5e73a799ff to your computer and use it in GitHub Desktop.
Possible solution for run h $ line [[1, 2],[3,4],[5,6]] :: IO Line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Looks like run h $ line [[1,2],[3,4],[5,6]] :: IO Line was not matching on Array v so was falling to mempty | |
-- This solution return (in Show form) fromList [LonLat 1 2,LonLat 3 4,LonLat 5 6] | |
instance FromDatum a => FromDatum (Vector a) where | |
parseDatum (Array v) = fmap V.fromList . mapM parseDatum $ V.toList v | |
parseDatum (Line l) = fmap V.fromList . mapM (parseDatum . toDatum) $ V.toList l | |
parseDatum _ = mempty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment