Commits

Doug Burke  committed 2e7bfaf

Troubles with building twitter-enumerator means using old versions of certain packages, even though had been using later versions. Gah.

  • Participants
  • Parent commits 488223f

Comments (0)

Files changed (3)

File ConvertUnknown.hs

 
 import Data.Attoparsec.Text hiding (take, takeWhile)
 import qualified Data.Attoparsec.Text as A
--- import Data.Attoparsec.Number
+import Data.Attoparsec.Number
 
 import qualified Data.Aeson as J
 import Data.Aeson ((.=), (.:), (.:?))
 multi :: Parser a -> Parser [a]
 multi p = p `sepBy` char ','
 
+{-
+This is defined for us in attoparsec 0.10 but due to contraint issues using 0.9, 
+so use the following hack, which doesn't quite match the attoparsec version.
+-}
+number :: Parser Number          
+number = 
+  (I <$> decimal) 
+  <|> (I <$> signed decimal) 
+  <|> (D <$> double)
+  
 value :: Parser J.Value
 value = objs
         <|> J.Array <$> avals
       
       rt = rsRetweetedStatus
       
-  in (userArcs ++ srcArcs ++ htArcs ++ mArcs ++ uArcs ++
+      -- in case the orginal tweet is unknown
+      origR = mkTweetURI (userScreenName (statusUser rt)) (statusId rt)
+      -- (origArcs, origR) = sToRDF rt
+      
+  in (userArcs ++ srcArcs ++ htArcs ++ mArcs ++ uArcs ++ -- origArcs ++
       [ t sioccontent txt
       , t siocid rsId
       , t siochas_creator uR
       , t dctcreated (getTime rsCreatedAt)
       , t rdfType blogPost 
-      , t siocreply_of (mkTweetURI (userScreenName (statusUser rt)) (statusId rt)) -- TODO: is this best predicate?
+      , t siocreply_of origR
       , t fromStreaming True
       , t isRetweet True
       ], twR)

File astrosearch.cabal

   Build-Depends:
     acid-state == 0.6.*,
     aeson == 0.5.*,
-    attoparsec == 0.10.*,
+    attoparsec >= 0.8.6.1 && < 0.11,
     authenticate == 0.10.*,
     base >= 3 && < 5,
     bytestring == 0.9.*,
-    case-insensitive == 0.4.*,
+    case-insensitive >= 0.2 && < 0.4,
     containers == 0.4.*,
     directory == 1.1.*,
     enumerator == 0.4.*,
     filepath == 1.2.*,
-    http-enumerator == 0.7.*,
+    http-enumerator > 0.6.6 && < 0.7,
     mtl == 2.0.*,
     network == 2.3.*,
     safecopy == 0.6.*,
   Build-Depends:
     acid-state == 0.6.*,
     aeson == 0.5.*,
-    attoparsec == 0.10.*,
+    attoparsec >= 0.8.6.1 && < 0.11,
     authenticate == 0.10.*,
     base >= 3 && < 5,
     bytestring == 0.9.*,
-    case-insensitive == 0.4.*,
+    case-insensitive >= 0.2 && < 0.4,
     containers == 0.4.*,
     directory == 1.1.*,
     enumerator == 0.4.*,
     filepath == 1.2.*,
-    http-enumerator == 0.7.*,
+    http-enumerator > 0.6.6 && < 0.7,
     mtl == 2.0.*,
     network == 2.3.*,
     safecopy == 0.6.*,
     text == 0.11.*,
     twitter-enumerator == 0.1.*,
-    unordered-containers == 0.1.*
+    unordered-containers >= 0.1 && < 0.3
 
 Executable     astroquery
   Main-Is:     AstroQuery.hs
   Build-Depends:
     acid-state == 0.6.*,
     aeson == 0.5.*,
-    attoparsec == 0.10.*,
+    attoparsec >= 0.8.6.1 && < 0.11,
     authenticate == 0.10.*,
     base >= 3 && < 5,
     bytestring == 0.9.*,
-    case-insensitive == 0.4.*,
+    case-insensitive >= 0.2 && < 0.4,
     containers == 0.4.*,
     directory == 1.1.*,
     enumerator == 0.4.*,
     filepath == 1.2.*,
-    http-enumerator == 0.7.*,
+    http-enumerator > 0.6.6 && < 0.7,
     mtl == 2.0.*,
     network == 2.3.*,
     safecopy == 0.6.*,
     text == 0.11.*,
     twitter-enumerator == 0.1.*,
-    unordered-containers == 0.1.*
+    unordered-containers >= 0.1 && < 0.3
 
 Executable     userconnections
   Main-Is:     UserConnections.hs
     authenticate == 0.10.*,
     base >= 3 && < 5,
     bytestring == 0.9.*,
-    case-insensitive == 0.4.*,
+    case-insensitive >= 0.2 && < 0.4,
     containers == 0.4.*,
     directory == 1.1.*,
     enumerator == 0.4.*,
     filepath == 1.2.*,
-    http-enumerator == 0.7.*,
+    http-enumerator > 0.6.6 && < 0.7,
     mtl == 2.0.*,
     network == 2.3.*,
     safecopy == 0.6.*,
     text == 0.11.*,
     twitter-enumerator == 0.1.*,
-    unordered-containers == 0.1.*
+    unordered-containers >= 0.1 && < 0.3
 
 Executable     usercount
   Main-Is:     UserCount.hs
     authenticate == 0.10.*,
     base >= 3 && < 5,
     bytestring == 0.9.*,
-    case-insensitive == 0.4.*,
+    case-insensitive >= 0.2 && < 0.4,
     containers == 0.4.*,
     directory == 1.1.*,
     enumerator == 0.4.*,
     filepath == 1.2.*,
-    http-enumerator == 0.7.*,
+    http-enumerator > 0.6.6 && < 0.7,
     mtl == 2.0.*,
     network == 2.3.*,
     safecopy == 0.6.*,
     text == 0.11.*,
     twitter-enumerator == 0.1.*,
-    unordered-containers == 0.1.*
+    unordered-containers >= 0.1 && < 0.3
 
 Executable     avatars
   Main-Is:     Avatars.hs
   Build-Depends:
     acid-state == 0.6.*,
     aeson == 0.5.*,
-    attoparsec == 0.10.*,
+    attoparsec >= 0.8.6.1 && < 0.11,
     authenticate == 0.10.*,
     base >= 3 && < 5,
     bytestring == 0.9.*,
-    case-insensitive == 0.4.*,
+    case-insensitive >= 0.2 && < 0.4,
     containers == 0.4.*,
     directory == 1.1.*,
     enumerator == 0.4.*,
     filepath == 1.2.*,
-    http-enumerator == 0.7.*,
+    http-enumerator > 0.6.6 && < 0.7,
     mtl == 2.0.*,
     network == 2.3.*,
     safecopy == 0.6.*,
     text == 0.11.*,
     twitter-enumerator == 0.1.*,
-    unordered-containers == 0.1.*
+    unordered-containers >= 0.1 && < 0.3
 
 Executable     validate
   Main-Is:     Validate.hs
   Build-Depends:
     acid-state == 0.6.*,
     aeson == 0.5.*,
-    attoparsec == 0.10.*,
+    attoparsec >= 0.8.6.1 && < 0.11,
     authenticate == 0.10.*,
     base >= 3 && < 5,
     bytestring == 0.9.*,
-    case-insensitive == 0.4.*,
+    case-insensitive >= 0.2 && < 0.4,
     containers == 0.4.*,
     directory == 1.1.*,
     enumerator == 0.4.*,
     filepath == 1.2.*,
-    -- http-enumerator == 0.7.*,
+    -- http-enumerator > 0.6.6 && < 0.7,
     mtl == 2.0.*,
     network == 2.3.*,
     safecopy == 0.6.*,
     text == 0.11.*,
     twitter-enumerator == 0.1.*,
-    unordered-containers == 0.1.*
+    unordered-containers >= 0.1 && < 0.3
 
 Executable     tokenize
   Main-Is:     Tokenize.hs
     authenticate == 0.10.*,
     base >= 3 && < 5,
     bytestring == 0.9.*,
-    case-insensitive == 0.4.*,
+    case-insensitive >= 0.2 && < 0.4,
     containers == 0.4.*,
     directory == 1.1.*,
     enumerator == 0.4.*,
     filepath == 1.2.*,
-    http-enumerator == 0.7.*,
+    http-enumerator > 0.6.6 && < 0.7,
     mtl == 2.0.*,
     network == 2.3.*,
     safecopy == 0.6.*,
     text == 0.11.*,
     tokenize == 0.1.*,
     twitter-enumerator == 0.1.*,
-    unordered-containers == 0.1.*
+    unordered-containers >= 0.1 && < 0.3
 
 Executable     tweethist
   Main-Is:     TweetHist.hs
     authenticate == 0.10.*,
     base >= 3 && < 5,
     bytestring == 0.9.*,
-    case-insensitive == 0.4.*,
+    case-insensitive >= 0.2 && < 0.4,
     containers == 0.4.*,
     directory == 1.1.*,
     enumerator == 0.4.*,
     filepath == 1.2.*,
-    http-enumerator == 0.7.*,
+    http-enumerator > 0.6.6 && < 0.7,
     mtl == 2.0.*,
     network == 2.3.*,
     old-locale == 1.0.*,
     statistics == 0.10.*,
     time == 1.2.*,
     twitter-enumerator == 0.1.*,
-    unordered-containers == 0.1.*,
+    unordered-containers >= 0.1 && < 0.3,
     vector == 0.9.*
 
 Executable     quickdump
     acid-state == 0.6.*,
     authenticate == 0.10.*,
     base >= 3 && < 5,
-    case-insensitive == 0.4.*,
+    case-insensitive >= 0.2 && < 0.4,
     containers == 0.4.*,
     directory == 1.1.*,
     enumerator == 0.4.*,
     filepath == 1.2.*,
-    http-enumerator == 0.7.*,
+    http-enumerator > 0.6.6 && < 0.7,
     mtl == 2.0.*,
     network == 2.3.*,
     old-locale == 1.0.*,
     time == 1.2.*,
     tokenize == 0.1.*,
     twitter-enumerator == 0.1.*,
-    unordered-containers == 0.1.*
+    unordered-containers >= 0.1 && < 0.3
 
 Executable     convertunknown
   Main-Is:     ConvertUnknown.hs
     acid-state == 0.6.*,
     aeson == 0.5.*,
     authenticate == 0.10.*,
-    attoparsec == 0.10.*,
+    attoparsec >= 0.8.6.1 && < 0.11,
+    attoparsec-text == 0.8.*,
     base >= 3 && < 5,
     containers == 0.4.*,
     network == 2.3.*,
     safecopy == 0.6.*,
     text == 0.11.*,
     twitter-enumerator == 0.1.*,
-    unordered-containers == 0.1.*,
+    unordered-containers >= 0.1 && < 0.3,
     vector == 0.9.*
 
 Executable     tordf
     text == 0.11.*,
     time == 1.2.*,
     twitter-enumerator == 0.1.*,
-    unordered-containers == 0.1.*,
+    unordered-containers >= 0.1 && < 0.3,
     vector == 0.9.*