{"action":"created","comment":{"url":"https://api.github.com/repos/tweag/sparkle/pulls/comments/59353399","id":59353399,"diff_hunk":"@@ -4,38 +4,196 @@\n -- marshall/unmarshall Java objects from/into Haskell data types.\n \n {-# LANGUAGE DataKinds #-}\n+{-# LANGUAGE DefaultSignatures #-}\n {-# LANGUAGE FlexibleContexts #-}\n {-# LANGUAGE FlexibleInstances #-}\n+{-# LANGUAGE FunctionalDependencies #-}\n {-# LANGUAGE MultiParamTypeClasses #-}\n {-# LANGUAGE OverloadedStrings #-}\n {-# LANGUAGE PolyKinds #-}\n+{-# LANGUAGE ScopedTypeVariables #-}\n {-# LANGUAGE TypeFamilies #-}\n {-# LANGUAGE TemplateHaskell #-}\n {-# LANGUAGE UndecidableInstances #-}\n \n module Language.Java\n-  ( Type(..)\n+  ( Coercible(..)\n+  , new\n+  , call\n+  , callStatic\n+  , Type(..)\n   , Uncurry\n   , Interp\n   , Reify(..)\n   , Reflect(..)\n+  , Sing\n+  , sing\n   ) where\n \n import Control.Distributed.Closure\n import Control.Distributed.Closure.TH\n import Control.Monad ((<=<), forM, forM_)\n+import Data.Char (chr, digitToInt)\n+import qualified Data.Coerce as Coerce\n import Data.Int\n import Data.ByteString (ByteString)\n-import qualified Data.ByteString as BS\n+import qualified Data.ByteString.Char8 as BS\n import qualified Data.ByteString.Unsafe as BS\n+import Data.Singletons (SingI(..), fromSing)\n import qualified Data.Text.Foreign as Text\n import Data.Text (Text)\n import qualified Data.Vector.Storable as Vector\n import Data.Vector.Storable (Vector)\n import qualified Data.Vector.Storable.Mutable as MVector\n import Data.Vector.Storable.Mutable (IOVector)\n import Foreign (FunPtr, Ptr, Storable, newForeignPtr, withForeignPtr)\n+import Foreign.C (CChar)\n import Foreign.JNI\n+import GHC.TypeLits (KnownSymbol, Symbol)\n+\n+-- | Tag data types that can be coerced in O(1) time without copy to a Java\n+-- object or primitive type (i.e. have the same representation) by declaring an\n+-- instance of this type class for that data type.\n+class SingI ty => Coercible a (ty :: JType) | a -> ty where\n+  coerce :: a -> JValue\n+  unsafeUncoerce :: JValue -> a\n+\n+  default coerce\n+    :: Coerce.Coercible a (J ty)\n+    => a\n+    -> JValue\n+  coerce x = JObject (Coerce.coerce x :: J ty)\n+\n+  default unsafeUncoerce\n+    :: Coerce.Coercible (J ty) a\n+    => JValue\n+    -> a\n+  unsafeUncoerce (JObject obj) = Coerce.coerce (unsafeCast obj :: J ty)\n+  unsafeUncoerce _ =\n+      error \"Cannot unsafeUncoerce: object expected but value of primitive type found.\"\n+\n+-- | The identity instance.\n+instance SingI ty => Coercible (J ty) ty\n+\n+instance Coercible Bool ('Prim \"boolean\") where\n+  coerce x = JBoolean (fromIntegral (fromEnum x))\n+  unsafeUncoerce (JBoolean x) = toEnum (fromIntegral x)\n+  unsafeUncoerce _ = error \"unsafeUncoerce: value doesn't match target type.\"\n+instance Coercible CChar ('Prim \"byte\") where\n+  coerce = JByte\n+  unsafeUncoerce (JByte x) = x\n+  unsafeUncoerce _ = error \"unsafeUncoerce: value doesn't match target type.\"\n+instance Coercible Char ('Prim \"char\") where\n+  coerce x = JChar (fromIntegral (digitToInt x))\n+  unsafeUncoerce (JChar x) = chr (fromIntegral x)\n+  unsafeUncoerce _ = error \"unsafeUncoerce: value doesn't match target type.\"\n+instance Coercible Int8 ('Prim \"short\") where\n+  coerce = JShort\n+  unsafeUncoerce (JShort x) = x\n+  unsafeUncoerce _ = error \"unsafeUncoerce: value doesn't match target type.\"\n+instance Coercible Int32 ('Prim \"int\") where\n+  coerce = JInt\n+  unsafeUncoerce (JInt x) = x\n+  unsafeUncoerce _ = error \"unsafeUncoerce: value doesn't match target type.\"\n+instance Coercible Int64 ('Prim \"long\") where\n+  coerce = JLong\n+  unsafeUncoerce (JLong x) = x\n+  unsafeUncoerce _ = error \"unsafeUncoerce: value doesn't match target type.\"\n+instance Coercible Float ('Prim \"float\") where\n+  coerce = JFloat\n+  unsafeUncoerce (JFloat x) = x\n+  unsafeUncoerce _ = error \"unsafeUncoerce: value doesn't match target type.\"\n+instance Coercible Double ('Prim \"double\") where\n+  coerce = JDouble\n+  unsafeUncoerce (JDouble x) = x\n+  unsafeUncoerce _ = error \"unsafeUncoerce: value doesn't match target type.\"\n+instance Coercible () 'Void where\n+  coerce = error \"Void value undefined.\"\n+  unsafeUncoerce _ = ()\n+\n+-- | NULL terminate byte strings, because those that were not created from\n+-- statically allocated literals aren't guaranteed to be.\n+nullTerminate :: ByteString -> ByteString\n+nullTerminate = (`BS.snoc` '\\0')\n+\n+-- | FindClass() special cases class names: in that case it doesn't want\n+-- a full signature, just the class name.\n+signatureStrip :: ByteString -> ByteString\n+signatureStrip sig | Just ('L', cls) <- BS.uncons sig = BS.init cls\n+signatureStrip sig = sig\n+\n+-- | Creates a new instance of the class whose name is resolved from the return\n+-- type.\n+new\n+  :: forall a sym.\n+     ( Coerce.Coercible a (J ('Class sym))\n+     , Coercible a ('Class sym)\n+     , KnownSymbol sym\n+     )\n+  => [JValue]\n+  -> IO a\n+new args = do\n+    let argsings = map jtypeOf args\n+        voidsing = sing :: Sing 'Void\n+    klass <- findClass (nullTerminate (signatureStrip (signature (sing :: Sing ('Class sym)))))\n+    Coerce.coerce <$> newObject klass (nullTerminate (methodSignature argsings voidsing)) args\n+\n+-- | The Swiss Army knife for calling Java methods. Give it an object or\n+-- any data type coercible to one, the name of a method, and a list of\n+-- arguments. Based on the type indexes of each argument, and based on the\n+-- return type, 'call' will invoke the named method using of the @call*Method@\n+-- family of functions in the JNI API.\n+--\n+-- When the method name is overloaded, use 'upcast' or 'unsafeCast'\n+-- appropriately on the class instance and/or on the arguments to invoke the\n+-- right method.\n+call\n+  :: forall a b ty1 ty2. (Coercible a ty1, Coercible b ty2, Coerce.Coercible a (J ty1))\n+  => a\n+  -> ByteString\n+  -> [JValue]\n+  -> IO b\n+call obj mname args = do\n+    let argsings = map jtypeOf args\n+        retsing = sing :: Sing ty2\n+    klass <- findClass (nullTerminate (signatureStrip (signature (sing :: Sing ty1))))\n+    method <- getMethodID klass mname (nullTerminate (methodSignature argsings retsing))\n+    case retsing of\n+      SPrim \"boolean\" -> unsafeUncoerce . coerce <$> callBooleanMethod obj method args\n+      SPrim \"byte\" -> unsafeUncoerce . coerce <$> callByteMethod obj method args\n+      SPrim \"char\" -> error \"call: unimplemented\"\n+      SPrim \"short\" -> error \"call: unimplemented\"\n+      SPrim \"int\" -> unsafeUncoerce . coerce <$> callIntMethod obj method args\n+      SPrim \"long\" -> unsafeUncoerce . coerce <$> callLongMethod obj method args\n+      SPrim \"float\" -> error \"call: unimplemented\"\n+      SPrim \"double\" -> unsafeUncoerce . coerce <$> callDoubleMethod obj method args\n+      SVoid -> do\n+        callVoidMethod obj method args\n+        -- Anything uncoerces to the void type.\n+        return (unsafeUncoerce undefined)\n+      _ -> unsafeUncoerce . coerce <$> callObjectMethod obj method args\n+\n+-- | Same as 'call', but for static methods.","path":"inline-java/src/Language/Java.hs","position":175,"original_position":175,"commit_id":"5deea46ac4e2f3cf88c2c32851998c6ea067146f","original_commit_id":"5deea46ac4e2f3cf88c2c32851998c6ea067146f","user":{"login":"mboes","id":51356,"avatar_url":"https://avatars.githubusercontent.com/u/51356?v=3","gravatar_id":"","url":"https://api.github.com/users/mboes","html_url":"https://github.com/mboes","followers_url":"https://api.github.com/users/mboes/followers","following_url":"https://api.github.com/users/mboes/following{/other_user}","gists_url":"https://api.github.com/users/mboes/gists{/gist_id}","starred_url":"https://api.github.com/users/mboes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mboes/subscriptions","organizations_url":"https://api.github.com/users/mboes/orgs","repos_url":"https://api.github.com/users/mboes/repos","events_url":"https://api.github.com/users/mboes/events{/privacy}","received_events_url":"https://api.github.com/users/mboes/received_events","type":"User","site_admin":false},"body":"Could you illustrate a use case? I'm not grokking how that function would make invocation of `callStatic` any simpler. Note that technically we could in fact make this just a ByteString. But all other functions pass reflect type related information at Haskell's type level, so that it can be passed implicitly or related to the types of the outputs. I thought it was the more consistent option to make `callStatic` do just the same: make the java class name be a type level symbol.","created_at":"2016-04-12T10:23:52Z","updated_at":"2016-04-12T10:23:52Z","html_url":"https://github.com/tweag/sparkle/pull/31#discussion_r59353399","pull_request_url":"https://api.github.com/repos/tweag/sparkle/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/tweag/sparkle/pulls/comments/59353399"},"html":{"href":"https://github.com/tweag/sparkle/pull/31#discussion_r59353399"},"pull_request":{"href":"https://api.github.com/repos/tweag/sparkle/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/tweag/sparkle/pulls/31","id":66069821,"html_url":"https://github.com/tweag/sparkle/pull/31","diff_url":"https://github.com/tweag/sparkle/pull/31.diff","patch_url":"https://github.com/tweag/sparkle/pull/31.patch","issue_url":"https://api.github.com/repos/tweag/sparkle/issues/31","number":31,"state":"open","locked":false,"title":"Generic new / generic call.","user":{"login":"mboes","id":51356,"avatar_url":"https://avatars.githubusercontent.com/u/51356?v=3","gravatar_id":"","url":"https://api.github.com/users/mboes","html_url":"https://github.com/mboes","followers_url":"https://api.github.com/users/mboes/followers","following_url":"https://api.github.com/users/mboes/following{/other_user}","gists_url":"https://api.github.com/users/mboes/gists{/gist_id}","starred_url":"https://api.github.com/users/mboes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mboes/subscriptions","organizations_url":"https://api.github.com/users/mboes/orgs","repos_url":"https://api.github.com/users/mboes/repos","events_url":"https://api.github.com/users/mboes/events{/privacy}","received_events_url":"https://api.github.com/users/mboes/received_events","type":"User","site_admin":false},"body":"This pair of functions abstracts over the low level JNI API functions.\nInstead of getting a `ClassID`, getting a `MethodID`, constructing\na method signature to resolve any overloading and then calling\nsay `callIntMethod`, you can use `call`, which will do all of that under\nthe hood. Same for `new` and for `callStatic`.\n\nOne important thing to note is that Java object type indexes now have\na semantic role: they are used to generate method signatures at method\ncall sites. Different type indexes yield different method signatures. We\nshould document this somewhere, but not sure that Haddock is the best\nplace for it.","created_at":"2016-04-11T22:00:23Z","updated_at":"2016-04-12T10:23:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db52b3828d95ebfd02b243af9e8d4052429adac7","assignee":{"login":"alpmestan","id":119323,"avatar_url":"https://avatars.githubusercontent.com/u/119323?v=3","gravatar_id":"","url":"https://api.github.com/users/alpmestan","html_url":"https://github.com/alpmestan","followers_url":"https://api.github.com/users/alpmestan/followers","following_url":"https://api.github.com/users/alpmestan/following{/other_user}","gists_url":"https://api.github.com/users/alpmestan/gists{/gist_id}","starred_url":"https://api.github.com/users/alpmestan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alpmestan/subscriptions","organizations_url":"https://api.github.com/users/alpmestan/orgs","repos_url":"https://api.github.com/users/alpmestan/repos","events_url":"https://api.github.com/users/alpmestan/events{/privacy}","received_events_url":"https://api.github.com/users/alpmestan/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/tweag/sparkle/pulls/31/commits","review_comments_url":"https://api.github.com/repos/tweag/sparkle/pulls/31/comments","review_comment_url":"https://api.github.com/repos/tweag/sparkle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tweag/sparkle/issues/31/comments","statuses_url":"https://api.github.com/repos/tweag/sparkle/statuses/5deea46ac4e2f3cf88c2c32851998c6ea067146f","head":{"label":"tweag:generic-call","ref":"generic-call","sha":"5deea46ac4e2f3cf88c2c32851998c6ea067146f","user":{"login":"tweag","id":6057932,"avatar_url":"https://avatars.githubusercontent.com/u/6057932?v=3","gravatar_id":"","url":"https://api.github.com/users/tweag","html_url":"https://github.com/tweag","followers_url":"https://api.github.com/users/tweag/followers","following_url":"https://api.github.com/users/tweag/following{/other_user}","gists_url":"https://api.github.com/users/tweag/gists{/gist_id}","starred_url":"https://api.github.com/users/tweag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tweag/subscriptions","organizations_url":"https://api.github.com/users/tweag/orgs","repos_url":"https://api.github.com/users/tweag/repos","events_url":"https://api.github.com/users/tweag/events{/privacy}","received_events_url":"https://api.github.com/users/tweag/received_events","type":"Organization","site_admin":false},"repo":{"id":45848386,"name":"sparkle","full_name":"tweag/sparkle","owner":{"login":"tweag","id":6057932,"avatar_url":"https://avatars.githubusercontent.com/u/6057932?v=3","gravatar_id":"","url":"https://api.github.com/users/tweag","html_url":"https://github.com/tweag","followers_url":"https://api.github.com/users/tweag/followers","following_url":"https://api.github.com/users/tweag/following{/other_user}","gists_url":"https://api.github.com/users/tweag/gists{/gist_id}","starred_url":"https://api.github.com/users/tweag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tweag/subscriptions","organizations_url":"https://api.github.com/users/tweag/orgs","repos_url":"https://api.github.com/users/tweag/repos","events_url":"https://api.github.com/users/tweag/events{/privacy}","received_events_url":"https://api.github.com/users/tweag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tweag/sparkle","description":"Haskell on Apache Spark.","fork":false,"url":"https://api.github.com/repos/tweag/sparkle","forks_url":"https://api.github.com/repos/tweag/sparkle/forks","keys_url":"https://api.github.com/repos/tweag/sparkle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tweag/sparkle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tweag/sparkle/teams","hooks_url":"https://api.github.com/repos/tweag/sparkle/hooks","issue_events_url":"https://api.github.com/repos/tweag/sparkle/issues/events{/number}","events_url":"https://api.github.com/repos/tweag/sparkle/events","assignees_url":"https://api.github.com/repos/tweag/sparkle/assignees{/user}","branches_url":"https://api.github.com/repos/tweag/sparkle/branches{/branch}","tags_url":"https://api.github.com/repos/tweag/sparkle/tags","blobs_url":"https://api.github.com/repos/tweag/sparkle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tweag/sparkle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tweag/sparkle/git/refs{/sha}","trees_url":"https://api.github.com/repos/tweag/sparkle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tweag/sparkle/statuses/{sha}","languages_url":"https://api.github.com/repos/tweag/sparkle/languages","stargazers_url":"https://api.github.com/repos/tweag/sparkle/stargazers","contributors_url":"https://api.github.com/repos/tweag/sparkle/contributors","subscribers_url":"https://api.github.com/repos/tweag/sparkle/subscribers","subscription_url":"https://api.github.com/repos/tweag/sparkle/subscription","commits_url":"https://api.github.com/repos/tweag/sparkle/commits{/sha}","git_commits_url":"https://api.github.com/repos/tweag/sparkle/git/commits{/sha}","comments_url":"https://api.github.com/repos/tweag/sparkle/comments{/number}","issue_comment_url":"https://api.github.com/repos/tweag/sparkle/issues/comments{/number}","contents_url":"https://api.github.com/repos/tweag/sparkle/contents/{+path}","compare_url":"https://api.github.com/repos/tweag/sparkle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tweag/sparkle/merges","archive_url":"https://api.github.com/repos/tweag/sparkle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tweag/sparkle/downloads","issues_url":"https://api.github.com/repos/tweag/sparkle/issues{/number}","pulls_url":"https://api.github.com/repos/tweag/sparkle/pulls{/number}","milestones_url":"https://api.github.com/repos/tweag/sparkle/milestones{/number}","notifications_url":"https://api.github.com/repos/tweag/sparkle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tweag/sparkle/labels{/name}","releases_url":"https://api.github.com/repos/tweag/sparkle/releases{/id}","deployments_url":"https://api.github.com/repos/tweag/sparkle/deployments","created_at":"2015-11-09T15:49:47Z","updated_at":"2016-04-12T03:46:41Z","pushed_at":"2016-04-11T22:08:54Z","git_url":"git://github.com/tweag/sparkle.git","ssh_url":"git@github.com:tweag/sparkle.git","clone_url":"https://github.com/tweag/sparkle.git","svn_url":"https://github.com/tweag/sparkle","homepage":"","size":372,"stargazers_count":105,"watchers_count":105,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":7,"forks":7,"open_issues":7,"watchers":105,"default_branch":"master"}},"base":{"label":"tweag:master","ref":"master","sha":"ac17938247f4019294e33b435e3f5f4aa9707768","user":{"login":"tweag","id":6057932,"avatar_url":"https://avatars.githubusercontent.com/u/6057932?v=3","gravatar_id":"","url":"https://api.github.com/users/tweag","html_url":"https://github.com/tweag","followers_url":"https://api.github.com/users/tweag/followers","following_url":"https://api.github.com/users/tweag/following{/other_user}","gists_url":"https://api.github.com/users/tweag/gists{/gist_id}","starred_url":"https://api.github.com/users/tweag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tweag/subscriptions","organizations_url":"https://api.github.com/users/tweag/orgs","repos_url":"https://api.github.com/users/tweag/repos","events_url":"https://api.github.com/users/tweag/events{/privacy}","received_events_url":"https://api.github.com/users/tweag/received_events","type":"Organization","site_admin":false},"repo":{"id":45848386,"name":"sparkle","full_name":"tweag/sparkle","owner":{"login":"tweag","id":6057932,"avatar_url":"https://avatars.githubusercontent.com/u/6057932?v=3","gravatar_id":"","url":"https://api.github.com/users/tweag","html_url":"https://github.com/tweag","followers_url":"https://api.github.com/users/tweag/followers","following_url":"https://api.github.com/users/tweag/following{/other_user}","gists_url":"https://api.github.com/users/tweag/gists{/gist_id}","starred_url":"https://api.github.com/users/tweag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tweag/subscriptions","organizations_url":"https://api.github.com/users/tweag/orgs","repos_url":"https://api.github.com/users/tweag/repos","events_url":"https://api.github.com/users/tweag/events{/privacy}","received_events_url":"https://api.github.com/users/tweag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tweag/sparkle","description":"Haskell on Apache Spark.","fork":false,"url":"https://api.github.com/repos/tweag/sparkle","forks_url":"https://api.github.com/repos/tweag/sparkle/forks","keys_url":"https://api.github.com/repos/tweag/sparkle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tweag/sparkle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tweag/sparkle/teams","hooks_url":"https://api.github.com/repos/tweag/sparkle/hooks","issue_events_url":"https://api.github.com/repos/tweag/sparkle/issues/events{/number}","events_url":"https://api.github.com/repos/tweag/sparkle/events","assignees_url":"https://api.github.com/repos/tweag/sparkle/assignees{/user}","branches_url":"https://api.github.com/repos/tweag/sparkle/branches{/branch}","tags_url":"https://api.github.com/repos/tweag/sparkle/tags","blobs_url":"https://api.github.com/repos/tweag/sparkle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tweag/sparkle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tweag/sparkle/git/refs{/sha}","trees_url":"https://api.github.com/repos/tweag/sparkle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tweag/sparkle/statuses/{sha}","languages_url":"https://api.github.com/repos/tweag/sparkle/languages","stargazers_url":"https://api.github.com/repos/tweag/sparkle/stargazers","contributors_url":"https://api.github.com/repos/tweag/sparkle/contributors","subscribers_url":"https://api.github.com/repos/tweag/sparkle/subscribers","subscription_url":"https://api.github.com/repos/tweag/sparkle/subscription","commits_url":"https://api.github.com/repos/tweag/sparkle/commits{/sha}","git_commits_url":"https://api.github.com/repos/tweag/sparkle/git/commits{/sha}","comments_url":"https://api.github.com/repos/tweag/sparkle/comments{/number}","issue_comment_url":"https://api.github.com/repos/tweag/sparkle/issues/comments{/number}","contents_url":"https://api.github.com/repos/tweag/sparkle/contents/{+path}","compare_url":"https://api.github.com/repos/tweag/sparkle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tweag/sparkle/merges","archive_url":"https://api.github.com/repos/tweag/sparkle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tweag/sparkle/downloads","issues_url":"https://api.github.com/repos/tweag/sparkle/issues{/number}","pulls_url":"https://api.github.com/repos/tweag/sparkle/pulls{/number}","milestones_url":"https://api.github.com/repos/tweag/sparkle/milestones{/number}","notifications_url":"https://api.github.com/repos/tweag/sparkle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tweag/sparkle/labels{/name}","releases_url":"https://api.github.com/repos/tweag/sparkle/releases{/id}","deployments_url":"https://api.github.com/repos/tweag/sparkle/deployments","created_at":"2015-11-09T15:49:47Z","updated_at":"2016-04-12T03:46:41Z","pushed_at":"2016-04-11T22:08:54Z","git_url":"git://github.com/tweag/sparkle.git","ssh_url":"git@github.com:tweag/sparkle.git","clone_url":"https://github.com/tweag/sparkle.git","svn_url":"https://github.com/tweag/sparkle","homepage":"","size":372,"stargazers_count":105,"watchers_count":105,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":7,"forks":7,"open_issues":7,"watchers":105,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tweag/sparkle/pulls/31"},"html":{"href":"https://github.com/tweag/sparkle/pull/31"},"issue":{"href":"https://api.github.com/repos/tweag/sparkle/issues/31"},"comments":{"href":"https://api.github.com/repos/tweag/sparkle/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/tweag/sparkle/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/tweag/sparkle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tweag/sparkle/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/tweag/sparkle/statuses/5deea46ac4e2f3cf88c2c32851998c6ea067146f"}}}}