hslua-module-doclayout 1.2.0.1 → 1.2.1
raw patch · 3 files changed
+33/−44 lines, 3 filesdep ~hsluaPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hslua
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- hslua-module-doclayout.cabal +3/−9
- src/HsLua/Module/DocLayout.hs +24/−35
CHANGELOG.md view
@@ -3,6 +3,12 @@ `hslua-module-doclayout` uses [PVP Versioning][1]. The changelog is available [on GitHub][2]. +## 1.2.1++Released 2026-01-08.++- Require hslua-2.5.+ ## 1.2.0.1 Released 2025-06-23.
hslua-module-doclayout.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: hslua-module-doclayout-version: 1.2.0.1+version: 1.2.1 synopsis: Lua module wrapping Text.DocLayout. description: Lua module wrapping @Text.DocLayout@. homepage: https://github.com/hslua/hslua-module-doclayout@@ -15,13 +15,7 @@ extra-doc-files: README.md CHANGELOG.md extra-source-files: test/test-doclayout.lua-tested-with: GHC == 8.6.5- , GHC == 8.8.4- , GHC == 8.10.7- , GHC == 9.0.2- , GHC == 9.2.6- , GHC == 9.4.8- , GHC == 9.6+tested-with: GHC == 9.6 , GHC == 9.8 source-repository head@@ -31,7 +25,7 @@ common common-options build-depends: base >= 4.11 && < 5 , doclayout >= 0.5 && < 0.6- , hslua >= 2.3 && < 2.5+ , hslua >= 2.5 && < 2.6 , text >= 1.2 && < 2.2 default-language: Haskell2010
src/HsLua/Module/DocLayout.hs view
@@ -6,7 +6,7 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Module : HsLua.Module.DocLayout-Copyright : © 2020-2024 Albert Krewinkel+Copyright : © 2020-2026 Albert Krewinkel License : MIT Maintainer : Albert Krewinkel <albert+hslua@zeitkraut.de> @@ -97,14 +97,11 @@ -- | Self-documenting module. documentedModule :: LuaError e => Module e-documentedModule = Module- { moduleName = "doclayout"- , moduleFields = fields- , moduleDescription = description- , moduleFunctions = functions- , moduleOperations = []- , moduleTypeInitializers = [initType typeDoc]- }+documentedModule = defmodule "doclayout"+ `withFields` fields+ `withDescription` description+ `withFunctions` functions+ `associateType` typeDoc -- -- Fields@@ -121,41 +118,33 @@ -- | Wrapped and documented 'Doc.blankline' value. blankline :: forall e. LuaError e => Field e-blankline = Field- { fieldName = "blankline"- , fieldDescription = "Inserts a blank line unless one exists already."- , fieldType = udTypeSpec @e typeDoc- , fieldPushValue = pushDoc Doc.blankline- }+blankline = deffield "blankline"+ `withDescription` "Inserts a blank line unless one exists already."+ `withType` udTypeSpec @e typeDoc+ `withValue` pushDoc Doc.blankline -- | Wrapped and documented 'Doc.cr' value. cr :: forall e. LuaError e => Field e-cr = Field- { fieldName = "cr"- , fieldDescription = "A carriage return. Does nothing if we're at " <>- "the beginning of a line; " <>- "otherwise inserts a newline."- , fieldType = udTypeSpec @e typeDoc- , fieldPushValue = pushDoc Doc.cr- }+cr = deffield "cr"+ `withDescription`+ "A carriage return. Does nothing if we're at " <>+ "the beginning of a line; otherwise inserts a newline."+ `withType` udTypeSpec @e typeDoc+ `withValue` pushDoc Doc.cr -- | Wrapped and documented 'Doc.empty' value. empty :: forall e. LuaError e => Field e-empty = Field- { fieldName = "empty"- , fieldDescription = "The empty document."- , fieldType = udTypeSpec @e typeDoc- , fieldPushValue = pushDoc Doc.empty- }+empty = deffield "empty"+ `withDescription` "The empty document."+ `withType` udTypeSpec @e typeDoc+ `withValue` pushDoc Doc.empty -- | Wrapped and documented 'Doc.space' value. space :: forall e. LuaError e => Field e-space = Field- { fieldName = "space"- , fieldDescription = "A breaking (reflowable) space."- , fieldType = udTypeSpec @e typeDoc- , fieldPushValue = pushDoc Doc.space- }+space = deffield "space"+ `withDescription` "A breaking (reflowable) space."+ `withType` udTypeSpec @e typeDoc+ `withValue` pushDoc Doc.space -- -- Functions