Skip to content

ParseError "Error in $[25].event: Could not build an EventType" #301

Closed
@nomeata

Description

@nomeata

Hi,

I’d like to scrape the history of GHC proposals, but I am stumbling on this:

{-# LANGUAGE LambdaCase, OverloadedStrings #-}

import GitHub.Endpoints.Issues
import GitHub.Endpoints.Issues.Events
import System.Directory
import System.IO
import Control.Monad
import qualified Data.ByteString.Lazy as BS
import qualified Data.Text as T
import Control.Monad.IO.Class
import Data.Binary
import Control.Monad.Trans.Except

r :: (Maybe Auth -> Name Owner -> Name Repo -> x) -> x
r f = f (Just (OAuth "TOKEN"))  "ghc-proposals" "ghc-proposals"

main = do
    x <- either (error . show) id <$> r eventsForIssue' (mkId undefined 43)
    print x

yields

$ ghc -O --make proposal-stats.hs  && ./proposal-stats 
[1 of 1] Compiling Main             ( proposal-stats.hs, proposal-stats.o )
Linking proposal-stats ...
proposal-stats: ParseError "Error in $[25].event: Could not build an EventType"
CallStack (from HasCallStack):
  error, called at proposal-stats.hs:34:18 in main:Main

A fix would be appreciated!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions