{"action":"created","issue":{"url":"https://api.github.com/repos/atnos-org/eff/issues/80","repository_url":"https://api.github.com/repos/atnos-org/eff","labels_url":"https://api.github.com/repos/atnos-org/eff/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/atnos-org/eff/issues/80/comments","events_url":"https://api.github.com/repos/atnos-org/eff/issues/80/events","html_url":"https://github.com/atnos-org/eff/issues/80","id":215241757,"number":80,"title":"Help to convert tutorials to running programs within a project","user":{"login":"russellcameronthomas","id":11158109,"avatar_url":"https://avatars1.githubusercontent.com/u/11158109?v=3","gravatar_id":"","url":"https://api.github.com/users/russellcameronthomas","html_url":"https://github.com/russellcameronthomas","followers_url":"https://api.github.com/users/russellcameronthomas/followers","following_url":"https://api.github.com/users/russellcameronthomas/following{/other_user}","gists_url":"https://api.github.com/users/russellcameronthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/russellcameronthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/russellcameronthomas/subscriptions","organizations_url":"https://api.github.com/users/russellcameronthomas/orgs","repos_url":"https://api.github.com/users/russellcameronthomas/repos","events_url":"https://api.github.com/users/russellcameronthomas/events{/privacy}","received_events_url":"https://api.github.com/users/russellcameronthomas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-19T05:03:08Z","updated_at":"2017-03-19T09:14:25Z","closed_at":null,"body":"I am relatively new to Scala (with Java background) and I am teaching myself Functional Programming.  I am working my way through your tutorials.  \r\n\r\nMy problem is that I am only able to get them running through the command line REPL.  I have been trying to take the (simple) step of inserting each of the tutorials into a file within _IntelliJ IDEA_ so that they print results to the console.  My problem is they won't compile without errors, and I don't know why.\r\n\r\nFor example, taking code from the \"Introduction\" here is the file I have created:\r\n```\r\nimport cats._, data._\r\nimport org.atnos.eff._\r\n\r\ntype ReaderInt[A] = Reader[Int, A]\r\ntype WriterString[A] = Writer[String, A]\r\n\r\ntype Stack = Fx.fx3[WriterString, ReaderInt, Eval]\r\n\r\nimport org.atnos.eff.all._\r\nimport org.atnos.eff.syntax.all._\r\n\r\n// useful type aliases showing that the ReaderInt and the WriterString effects are \"members\" of R\r\n// note that R could have more effects\r\ntype _readerInt[R]    = ReaderInt |= R\r\ntype _writerString[R] = WriterString |= R\r\n\r\n  class KVstore {\r\n    def program[R: _readerInt : _writerString : _eval]: Eff[R, Int] = for {\r\n    // get the configuration\r\n      n <- ask[R, Int]\r\n\r\n      // log the current configuration value\r\n      _ <- tell(\"the required power is \" + n)\r\n\r\n      // compute the nth power of 2\r\n      a <- delay(math.pow(2, n.toDouble).toInt)\r\n\r\n      // log the result\r\n      _ <- tell(\"the result is \" + a)\r\n    } yield a\r\n  }\r\n\r\nobject KVstore extends App {\r\n  val kv : KVstore = new KVstore\r\n\r\n  println(kv.program[Stack].runReader(6).runWriter.runEval.run)\r\n}\r\n```\r\n\r\nThe compiler error is in the last line: \"Cannot resolve symbol 'run'\".   I have tried many other approaches and structures, and they all give this error, or some other \"Cannot resolve...\" error.\r\n\r\nI have already tried the \"clear cache\" fix, with restart of _IntelliJ IDEA_.\r\n\r\nCan anyone help?"},"comment":{"url":"https://api.github.com/repos/atnos-org/eff/issues/comments/287603840","html_url":"https://github.com/atnos-org/eff/issues/80#issuecomment-287603840","issue_url":"https://api.github.com/repos/atnos-org/eff/issues/80","id":287603840,"user":{"login":"reactormonk","id":49185,"avatar_url":"https://avatars3.githubusercontent.com/u/49185?v=3","gravatar_id":"","url":"https://api.github.com/users/reactormonk","html_url":"https://github.com/reactormonk","followers_url":"https://api.github.com/users/reactormonk/followers","following_url":"https://api.github.com/users/reactormonk/following{/other_user}","gists_url":"https://api.github.com/users/reactormonk/gists{/gist_id}","starred_url":"https://api.github.com/users/reactormonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactormonk/subscriptions","organizations_url":"https://api.github.com/users/reactormonk/orgs","repos_url":"https://api.github.com/users/reactormonk/repos","events_url":"https://api.github.com/users/reactormonk/events{/privacy}","received_events_url":"https://api.github.com/users/reactormonk/received_events","type":"User","site_admin":false},"created_at":"2017-03-19T09:14:25Z","updated_at":"2017-03-19T09:14:25Z","body":"This looks more like a stackoverflow question, could you post the link to the question here?"}}
{"actor":{"display_login":"reactormonk"}}