lucid2 0.0.20220508 → 0.0.20220509
raw patch · 3 files changed
+16/−6 lines, 3 files
Files
- CHANGELOG.md +11/−3
- lucid2.cabal +1/−1
- src/Lucid/Base.hs +4/−2
CHANGELOG.md view
@@ -1,14 +1,22 @@-## 0.0.x+## 0.0.20220509 -TBA+* Use explicit imports for mtl, avoiding mtl-2.3 incompatibility. ## New in lucid2 +lucid2 is a new package published to Hackage and maintained under `lucid2/` in this repository alongside `lucid1`. Releases are made under the [Immutable Publishing Policy](https://chrisdone.com/posts/ipp/), and users had asked for many breaking changes, therefore we needed a completely new namespace to work under, hence, "lucid2". Many things have also been dropped in the process, to simplify the codebase.++This upgrade is **entirely optional**.++People using `lucid` **will not have to do anything**. They can continue using that package indefinitely, it will be maintained alongside `lucid2`, to keep it building with GHCs and things. You can even use both packages in the same codebase with `-XPackageImports`.+ Changed: -* All on* attributes and style_ do not escape their values anymore. Be+* All `on*` attributes and `style_` do not escape their values anymore. Be careful. Though you were probably being careful with these anyway, as they are inherently dangerous for XXS.+* The `Attribute` type has been replaced by `Attributes`, which is a `Monoid` instance. This makes it really easy to write code like `if X then class_ "foo" else mempty`.+* The `class_` and `style_` attributes combine with a space and `;` between them when there are duplicates, e.g. `[class_ "x",class_ "y"]` produces `class="x y"`. These are special cases, the rest of the attributes do not have special combining behavior and will be simple concatenation. Renamed:
lucid2.cabal view
@@ -1,5 +1,5 @@ name: lucid2-version: 0.0.20220508+version: 0.0.20220509 synopsis: Clear to write, read and edit DSL for HTML description: Clear to write, read and edit DSL for HTML.
src/Lucid/Base.hs view
@@ -45,9 +45,11 @@ import qualified Blaze.ByteString.Builder.Html.Utf8 as Blaze import Control.Applicative import Control.Monad-import Control.Monad.Error.Class (MonadError(..))-import Control.Monad.Reader+import Control.Monad.Fix (MonadFix(..))+import Control.Monad.IO.Class (MonadIO(..))+import Control.Monad.Reader (MonadReader(..)) import Control.Monad.State.Class (MonadState(..))+import Control.Monad.Trans (MonadTrans(..)) import Control.Monad.Trans.State.Strict (StateT(..), modify') import qualified Data.ByteString as S import Data.ByteString.Lazy (ByteString)