{"action":"created","issue":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1209","repository_url":"https://api.github.com/repos/elm-lang/elm-compiler","labels_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1209/labels{/name}","comments_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1209/comments","events_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1209/events","html_url":"https://github.com/elm-lang/elm-compiler/issues/1209","id":119129468,"number":1209,"title":"Literate Elm?","user":{"login":"davidmason","id":482026,"avatar_url":"https://avatars.githubusercontent.com/u/482026?v=3","gravatar_id":"","url":"https://api.github.com/users/davidmason","html_url":"https://github.com/davidmason","followers_url":"https://api.github.com/users/davidmason/followers","following_url":"https://api.github.com/users/davidmason/following{/other_user}","gists_url":"https://api.github.com/users/davidmason/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmason/subscriptions","organizations_url":"https://api.github.com/users/davidmason/orgs","repos_url":"https://api.github.com/users/davidmason/repos","events_url":"https://api.github.com/users/davidmason/events{/privacy}","received_events_url":"https://api.github.com/users/davidmason/received_events","type":"User","site_admin":false},"labels":[{"id":293752033,"url":"https://api.github.com/repos/elm-lang/elm-compiler/labels/request","name":"request","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2015-11-27T04:18:16Z","updated_at":"2016-11-25T07:48:42Z","closed_at":"2015-12-02T01:43:44Z","body":"I couldn't find anything about literate programming in Elm, but I think it would be a good candidate for it. Is anything like this possible or in the works? I am more than happy to have a go at implementing something that would parse literate elm programs if there is call for it and we can agree on some sensible syntax for it.\n\nAs a super-quick intro to those not familiar with the concept, literate programming is essentially flipping the concept of comments vs. code in the source file: text that is not marked up in any way is considered documentation, and code is specifically marked up to indicate it is code. The whole source file can still compile in the same way that a normal code file would.\n\nFor example, what if the compiler could handle markdown-style documents, compiling all the code-annotated parts into the program? This example supposes the compiler would treat anything indented 4 spaces as code, and anything \"fenced\" with triple-backticks (```) as code.\n\n``````\nmathemator.elmd\n# Mathemator\n\nThis program takes mathematics to the next level!!! Why just add\ntwo things when you can add infinity things?!!\n\n## Addition\n\n**additionator** adds as many things as you like together! Wow!\n*Note: numericals sounds fancier, right?*\n\n    additionator : List Float -> Float\n    additionator numericals = effin' (+) 0 numericals\n\n## Subtraction\n\n**subtractionator** is like **additionator**, but a lot more negative.\nIt pretty much just brings everybody down. Probably just don't invite it.\n\n    subtractionator : List Float -> Float\n    subtractionator victims = effin' (-) 0 victims\n\n\n## Multiplication\n\n***Caution: this can make some really big numbers!*** Make sure you\nhave enough room to store all your numbers - maybe a *warehouse* or something.\n\n    multiplicatinator : List Float -> Float\n    multiplicatinator dimensions = effin' (*) 1 dimensions\n\n\n## Utilities\n\nThis takes the core logic of the mathemator funcitions so that it is not repeated.\n\nI could have written it with folds and stuff, but I love typing and I'm not\nsome kind of Einstein math robot, gosh, get off my back man!\nI worked in a bit of a *nautical* theme here to help with understanding, since\nthere's all this *Float*ing going on.\n\n```\neffin' : (Float -> Float -> Float) -> Float -> List Float -> Float\neffin' swab yarrrrr plank =\n  case plank of\n    [] -> yarrrrr\n    ye :: deck -> effin' swab yarrrrr deck |> swab ye\n```\n``````\n"},"comment":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/comments/262898418","html_url":"https://github.com/elm-lang/elm-compiler/issues/1209#issuecomment-262898418","issue_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1209","id":262898418,"user":{"login":"jigargosar","id":20082,"avatar_url":"https://avatars.githubusercontent.com/u/20082?v=3","gravatar_id":"","url":"https://api.github.com/users/jigargosar","html_url":"https://github.com/jigargosar","followers_url":"https://api.github.com/users/jigargosar/followers","following_url":"https://api.github.com/users/jigargosar/following{/other_user}","gists_url":"https://api.github.com/users/jigargosar/gists{/gist_id}","starred_url":"https://api.github.com/users/jigargosar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jigargosar/subscriptions","organizations_url":"https://api.github.com/users/jigargosar/orgs","repos_url":"https://api.github.com/users/jigargosar/repos","events_url":"https://api.github.com/users/jigargosar/events{/privacy}","received_events_url":"https://api.github.com/users/jigargosar/received_events","type":"User","site_admin":false},"created_at":"2016-11-25T07:48:42Z","updated_at":"2016-11-25T07:48:42Z","body":"@davidmason Hey has any work been done around it? I am really impressed by this idea. "}}
{"actor":{"display_login":"jigargosar"}}