Skip to content

Instantly share code, notes, and snippets.

@jamiecook
Created June 29, 2017 13:54
Show Gist options
  • Save jamiecook/a6385ef4e607433602dad55e6caf7263 to your computer and use it in GitHub Desktop.
Save jamiecook/a6385ef4e607433602dad55e6caf7263 to your computer and use it in GitHub Desktop.
readHex :: BC.ByteString -> Some Geometry
readHex bs = runGeos $ do
r <- S.createReader
g <- S.readHex r bs
convertGeometryFromRaw g
readLotsOfHex :: [BC.ByteString] -> [Some Geometry]
readLotsOfHex bs = runGeos $ do
r <- S.createReader
x <- mapM (S.readHex r) bs
return x
/Users/jamie/src/geos/src/Data/Geometry/Geos/Serialize.hs:25:20: error:
• Couldn't match type ‘R.Geom’ with ‘Some Geometry’
Expected type: [Some Geometry]
Actual type: [R.Geom]
• In the expression:
runGeos
$ do { r <- S.createReader;
x <- mapM (S.readHex r) bs;
return x }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment