github icon indicating copy to clipboard operation
github copied to clipboard

Documentation seems outdated

Open joaovaladares opened this issue 1 year ago • 0 comments

The following code snippet is present in the documentation as a form of an example:

import qualified GitHub as GH

main :: IO ()
main = do
    possibleUser <- GH.github' GH.userInfoForR "phadej"
    print possibleUser

However it actually doesn't even compile unless I do something like the following (which works and retrieves the info for that user):

{-# LANGUAGE OverloadedStrings #-}

module Main (main) where

import qualified GitHub as GH
import GitHub.Internal.Prelude (pack)

main :: IO ()
main = do
  possibleUser <- GH.github' GH.userInfoForR $ GH.mkUserName "phadej"
  print possibleUser

Is there wrong on my end or is it actually a known issue? I think other examples are also outdated. I can maybe go through them and try to make them work.

joaovaladares avatar Jan 03 '25 02:01 joaovaladares