readme-lhs 0.5.0 → 0.6.0
raw patch · 5 files changed
+48/−165 lines, 5 filesdep ~protoludePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: protolude
API changes (from Hackage documentation)
+ Readme.Lhs: inline :: Text -> [Inline]
Files
- other/example.hs +3/−2
- other/readme-lhs.hsfiles +34/−116
- readme-lhs.cabal +4/−4
- readme.md +6/−43
- src/Readme/Lhs.hs +1/−0
other/example.hs view
@@ -12,5 +12,6 @@ main :: IO () main =- void $ runOutput ("other/readme_.md", GitHubMarkdown) ("readme.md", GitHubMarkdown) $ do- output "example" (Fence "Simple example of an output")+ void $+ runOutput ("other/readme_.md", GitHubMarkdown) ("readme.md", GitHubMarkdown) $+ output "example" (Fence "Simple example of an output")
other/readme-lhs.hsfiles view
@@ -4,92 +4,50 @@ [](https://travis-ci.org/{{github-username}}{{^github-username}}githubuser{{/github-username}}/{{name}}) [](https://hackage.haskell.org/package/{{name}}) [](http://stackage.org/lts/package/{{name}}) [](http://stackage.org/nightly/package/{{name}}) +flow+----+ ``` stack build --test --exec "$(stack path --local-install-root)/bin/{{name}}" --file-watch ``` -{-# START_FILE app/example.lhs #-}-----pagetitle: {{name}}------[{{name}}](https://github.com/{{github-username}}{{^github-username}}githubuser{{/github-username}}/{{name}}) example-===--[ghc options](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/flags.html#flag-reference)------> {-# OPTIONS_GHC -Wall #-}--[pragmas](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/lang.html)------> {-# LANGUAGE NoImplicitPrelude #-}-> {-# LANGUAGE OverloadedStrings #-}-> {-# LANGUAGE DataKinds #-}-> {-# LANGUAGE DeriveGeneric #-}-> {-# LANGUAGE ScopedTypeVariables #-}-> {-# LANGUAGE TypeOperators #-}-> {-# LANGUAGE FlexibleInstances #-}--[libraries](https://www.stackage.org/)------- [protolude](https://www.stackage.org/package/protolude)-- [readme-lhs](https://www.hackage.org/package/readme-lhs)--> import Protolude-> import Readme.Lhs--code------- [hoogle](https://www.stackage.org/package/hoogle)--> main :: IO ()-> main = do-> let n = 10-> let answer = product [1..n::Integer]-> void $ runOutput ("app/example.lhs", LHS) ("readme.md", GitHubMarkdown) $ do-> output "example" (Fence $ show answer)--10! is equal to:--```{.output .example}--```+{-# START_FILE app/{{name}}.hs #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeOperators #-}+{-# OPTIONS_GHC -Wall #-} -tests----+import NumHask.Prelude -- [doctest](https://www.stackage.org/package/doctest)+main :: IO ()+main = do+ let n = 10+ let answer = product [1..n::Integer]+ print answer -> -- | doctests-> -- >>> let n = 10-> -- >>> product [1..n]-> -- 3628800 {-# START_FILE {{name}}.cabal #-}+cabal-version: 3.0 name: {{name}}-version: 0.0.0.1+version: 0.0.1 synopsis: See readme.md description: See readme.md for description.-cabal-version: 2.0 category: project author: {{author-name}}{{^author-name}}Author name here{{/author-name}} maintainer: {{author-email}}-copyright: {{copyright}}{{^copyright}}{{year}}{{^year}}2017{{/year}} {{authorName}}{{^authorName}}Author name here{{/authorName}}{{/copyright}}-license: BSD3+copyright: {{copyright}}{{^copyright}}{{year}}{{^year}}2020{{/year}} {{authorName}}{{^authorName}}Author name here{{/authorName}}{{/copyright}}+license: BSD-3-Clause homepage: https://github.com/{{github-username}}{{^github-username}}githubuser{{/github-username}}/{{name}}#readme bug-reports: https://github.com/{{github-username}}{{^github-username}}githubuser{{/github-username}}/{{name}}/issues build-type: Simple-extra-source-files:- readme.md source-repository head type: git location: https://github.com/{{github-username}}{{^github-username}}githubuser{{/github-username}}/{{name}} executable {{name}}- main-is: example.lhs+ main-is: {{name}}.hs hs-source-dirs: app default-extensions: NegativeLiterals@@ -104,31 +62,7 @@ -with-rtsopts=-N build-depends: base >= 4.7 && < 5- , doctest ^>= 0.16.0.1- , protolude ^>= 0.2.3- , readme-lhs ^>= 0.2.0- default-language: Haskell2010--test-suite test- type: exitcode-stdio-1.0- main-is: test.hs- hs-source-dirs: test- default-extensions:- NegativeLiterals- NoImplicitPrelude- OverloadedStrings- UnicodeSyntax- ghc-options:- -funbox-strict-fields- -fforce-recomp- -threaded- -rtsopts- -with-rtsopts=-N- build-depends:- base >= 4.7 && < 5- , doctest ^>= 0.16.0.1- , protolude ^>= 0.2.3- , readme-lhs ^>= 0.2.0+ , protolude >= 0.3.0 && < 0.4 default-language: Haskell2010 {-# START_FILE .gitignore #-}@@ -140,10 +74,6 @@ other/* linguist-documentation index.html linguist-documentation -{-# START_FILE Setup.hs #-}-import Distribution.Simple-main = defaultMain- {-# START_FILE LICENSE #-} Copyright {{author-name}}{{^author-name}}Author name here{{/author-name}} (c) {{year}}{{^year}}2020{{/year}} @@ -186,23 +116,23 @@ - $TRAVIS_BUILD_DIR/.stack-work - $TRAVIS_BUILD_DIR/dist-newstyle -cabal: "2.4"+cabal: "3.0" matrix: include: - env: BUILD=cabal- ghc: "8.6.5"- - env: BUILD=stack ARGS="--resolver lts-13.29 --system-ghc"- ghc: "8.6.5"+ ghc: "8.8.3"+ - env: BUILD=stack ARGS="--system-ghc"+ ghc: "8.8.3" # a -Werror build that is allowed to fail- - env: BUILD=werror ARGS="--resolver lts-13.29 --system-ghc"- ghc: "8.6.5"+ - env: BUILD=werror ARGS="--system-ghc"+ ghc: "8.8.3" - env: BUILD=stack ARGS="--resolver nightly --system-ghc"- ghc: "8.6.5"+ ghc: "8.8.3" allow_failures: - env: BUILD=stack ARGS="--resolver nightly --system-ghc"- - env: BUILD=werror ARGS="--resolver lts-13.29 --system-ghc"+ - env: BUILD=werror ARGS="--system-ghc" install: - |@@ -228,9 +158,7 @@ - | case "$BUILD" in cabal)- cabal v2-update- cabal v2-build all- cabal v2-test all --enable-test+ cabal build all ;; stack) stack --no-terminal $ARGS test --haddock --no-haddock-deps@@ -239,22 +167,12 @@ stack --no-terminal $ARGS test --haddock --no-haddock-deps --ghc-options -Werror --ghc-options -Wcompat --ghc-options -Wincomplete-record-updates --ghc-options -Wincomplete-uni-patterns --ghc-options -Wredundant-constraints ;; esac-{-# START_FILE test/test.hs #-}-{-# OPTIONS_GHC -Wall #-} -module Main where--import Protolude-import Test.DocTest--main :: IO ()-main = do- doctest ["app/example.lhs"] {-# START_FILE stack.yaml #-}-resolver: lts-14.13+resolver: lts-15.13 packages: - . extra-deps:- - readme-lhs-0.4.0+ - protolude-0.3.0
readme-lhs.cabal view
@@ -1,6 +1,6 @@-cabal-version: 2.4+cabal-version: 3.0 name: readme-lhs-version: 0.5.0+version: 0.6.0 synopsis: See readme.md description: See readme.md for description. category: Development@@ -38,7 +38,7 @@ , attoparsec , blaze-html , foldl- , protolude+ , protolude >= 0.3 && < 0.4 , text , pandoc , pandoc-types@@ -58,7 +58,7 @@ ghc-options: -funbox-strict-fields -fforce-recomp -threaded -rtsopts -with-rtsopts=-N build-depends: base >=4.7 && <5- , protolude+ , protolude >= 0.3 && < 0.4 , readme-lhs , text
readme.md view
@@ -1,59 +1,22 @@-[readme-lhs](https://tonyday567.github.io/readme-lhs/index.html) [](https://travis-ci.org/tonyday567/readme-lhs)-================================================================================================================================================================================+[readme-lhs](https://tonyday567.github.io/readme-lhs) [](https://travis-ci.org/tonyday567/readme-lhs)+===================================================================================================================================================================== <blockquote cite> The language in which we express our ideas has a strong influence on our thought processes. Knuth </blockquote> -This is how I start a new haskell library refactor. I pick a new ghc-version, and a new stack lts, and set this project up with no compile-warts. This gives me the full pandoc tree, which is a great base to get-a fast workflow loop going for the repo you've created.--example+example insert ``` {.output .example} Simple example of an output ``` -NumHask.Space--``` {.output .NumHask.Space}-[0.0,4.0,8.0,12.0,16.0,20.0,24.0,28.0,32.0,36.0,40.0,44.0,48.0,52.0,56.0,60.0,64.0]-```--NumHask.Array--``` {.output .NumHask.Array}-[[14, 32],- [32, 77]]-```--Box--echo: hi--echo: bye--web-rep--``` {.output .web-rep}-<!DOCTYPE HTML><html lang="en"><head><meta charset="utf-8"></head><body><script>window.onload=function(){}</script></body></html>-```--chart-svg--- template ======== A bare bones stack template is located in [other/readme-lhs.hsfiles](other/readme-lhs.hsfiles). It contains what-you need to quickly get started with literate programming.--workflow----------- stack build --test --exec "$(stack path --local-install-root)/bin/readme-lhs-example" --file-watch+you need to quickly get started with literate programming alongside the+challenge of using a rapid workflow+`stack build --test --exec "$(stack path --local-install-root)/bin/readme-lhs-example" --file-watch`.
src/Readme/Lhs.hs view
@@ -6,6 +6,7 @@ module Readme.Lhs ( para, plain,+ inline, table, table', code,