packages feed

ClasshSS (empty) → 0.1.0.0

raw patch · 25 files changed

+3782/−0 lines, 25 filesdep +basedep +data-defaultdep +lensbinary-added

Dependencies added: base, data-default, lens, template-haskell, text

Files

+ CHANGELOG.md view
@@ -0,0 +1,5 @@+# Revision history for ClashSS++## 0.1.0.0 -- YYYY-mm-dd++* First version. Released on an unsuspecting world.
+ ClashSS.cabal~ view
@@ -0,0 +1,31 @@+cabal-version:      3.4+name:               ClashSS+version:            0.1.0.0+-- synopsis:+-- description:+homepage:           https://github.com/augyg/ClashSS+license:            MIT+license-file:       LICENSE+author:             Galen Sprout+maintainer:         galen.sprout@gmail.com+-- copyright:+category:           Web+build-type:         Simple+extra-doc-files:    CHANGELOG.md+-- extra-source-files:++common warnings+    ghc-options: -Wall++library+    import:           warnings+    exposed-modules:  Classh+    -- other-modules:+    -- other-extensions:+    build-depends:    base ^>=4.15.1.0+                    , lens >=5.2.3+                    , template-haskell>=2.17.0.0+                    , text >=1.2.5.0+                    , data-default >= 0.7.1.1+    hs-source-dirs:   src+    default-language: Haskell2010
+ ClasshSS.cabal view
@@ -0,0 +1,32 @@+cabal-version:      3.4+name:               ClasshSS+version:            0.1.0.0+synopsis:+        Typified Tailwind for Rapid Development+-- description:+homepage:           https://github.com/augyg/ClasshSS+license:            MIT+license-file:       LICENSE+author:             Galen Sprout+maintainer:         galen.sprout@gmail.com+-- copyright:+category:           Web+build-type:         Simple+extra-doc-files:    CHANGELOG.md+-- extra-source-files:++common warnings+    ghc-options: -Wall++library+    import:           warnings+    exposed-modules:  Classh+    -- other-modules:+    -- other-extensions:+    build-depends:    base ^>=4.15.1.0+                    , lens >=5.2.3+                    , template-haskell>=2.17.0.0+                    , text >=1.2.5.0+                    , data-default >= 0.7.1.1+    hs-source-dirs:   src+    default-language: Haskell2010
+ ClasshSS.cabal~ view
@@ -0,0 +1,31 @@+cabal-version:      3.4+name:               ClasshSS+version:            0.1.0.0+-- synopsis:+-- description:+homepage:           https://github.com/augyg/ClasshSS+license:            MIT+license-file:       LICENSE+author:             Galen Sprout+maintainer:         galen.sprout@gmail.com+-- copyright:+category:           Web+build-type:         Simple+extra-doc-files:    CHANGELOG.md+-- extra-source-files:++common warnings+    ghc-options: -Wall++library+    import:           warnings+    exposed-modules:  Classh+    -- other-modules:+    -- other-extensions:+    build-depends:    base ^>=4.15.1.0+                    , lens >=5.2.3+                    , template-haskell>=2.17.0.0+                    , text >=1.2.5.0+                    , data-default >= 0.7.1.1+    hs-source-dirs:   src+    default-language: Haskell2010
+ LICENSE view
@@ -0,0 +1,20 @@+Copyright (c) 2024 Galen Sprout++Permission is hereby granted, free of charge, to any person obtaining+a copy of this software and associated documentation files (the+"Software"), to deal in the Software without restriction, including+without limitation the rights to use, copy, modify, merge, publish,+distribute, sublicense, and/or sell copies of the Software, and to+permit persons to whom the Software is furnished to do so, subject to+the following conditions:++The above copyright notice and this permission notice shall be included+in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ README.md view
@@ -0,0 +1,4 @@+# ClashSS+typify CSS so that Style or Class tags do not overlap in obvious but easy to miss ways++Note: use Scrappy for bundled files and fetched files to further detect clashes
+ dist-newstyle/build/x86_64-linux/ghc-9.0.2/ClashSS-0.1.0.0/build/autogen/Paths_ClashSS.hs view
@@ -0,0 +1,74 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE NoRebindableSyntax #-}+{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}+{-# OPTIONS_GHC -w #-}+module Paths_ClashSS (+    version,+    getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,+    getDataFileName, getSysconfDir+  ) where+++import qualified Control.Exception as Exception+import qualified Data.List as List+import Data.Version (Version(..))+import System.Environment (getEnv)+import Prelude+++#if defined(VERSION_base)++#if MIN_VERSION_base(4,0,0)+catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a+#else+catchIO :: IO a -> (Exception.Exception -> IO a) -> IO a+#endif++#else+catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a+#endif+catchIO = Exception.catch++version :: Version+version = Version [0,1,0,0] []++getDataFileName :: FilePath -> IO FilePath+getDataFileName name = do+  dir <- getDataDir+  return (dir `joinFileName` name)++getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath++++bindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath+bindir     = "/home/lazylambda/.cabal/bin"+libdir     = "/home/lazylambda/.cabal/lib/x86_64-linux-ghc-9.0.2/ClashSS-0.1.0.0-inplace"+dynlibdir  = "/home/lazylambda/.cabal/lib/x86_64-linux-ghc-9.0.2"+datadir    = "/home/lazylambda/.cabal/share/x86_64-linux-ghc-9.0.2/ClashSS-0.1.0.0"+libexecdir = "/home/lazylambda/.cabal/libexec/x86_64-linux-ghc-9.0.2/ClashSS-0.1.0.0"+sysconfdir = "/home/lazylambda/.cabal/etc"++getBinDir     = catchIO (getEnv "ClashSS_bindir")     (\_ -> return bindir)+getLibDir     = catchIO (getEnv "ClashSS_libdir")     (\_ -> return libdir)+getDynLibDir  = catchIO (getEnv "ClashSS_dynlibdir")  (\_ -> return dynlibdir)+getDataDir    = catchIO (getEnv "ClashSS_datadir")    (\_ -> return datadir)+getLibexecDir = catchIO (getEnv "ClashSS_libexecdir") (\_ -> return libexecdir)+getSysconfDir = catchIO (getEnv "ClashSS_sysconfdir") (\_ -> return sysconfdir)+++++joinFileName :: String -> String -> FilePath+joinFileName ""  fname = fname+joinFileName "." fname = fname+joinFileName dir ""    = dir+joinFileName dir fname+  | isPathSeparator (List.last dir) = dir ++ fname+  | otherwise                       = dir ++ pathSeparator : fname++pathSeparator :: Char+pathSeparator = '/'++isPathSeparator :: Char -> Bool+isPathSeparator c = c == '/'
+ dist-newstyle/build/x86_64-linux/ghc-9.0.2/ClashSS-0.1.0.0/build/autogen/cabal_macros.h view
@@ -0,0 +1,153 @@+/* DO NOT EDIT: This file is automatically generated by Cabal */++/* package ClashSS-0.1.0.0 */+#ifndef VERSION_ClashSS+#define VERSION_ClashSS "0.1.0.0"+#endif /* VERSION_ClashSS */+#ifndef MIN_VERSION_ClashSS+#define MIN_VERSION_ClashSS(major1,major2,minor) (\+  (major1) <  0 || \+  (major1) == 0 && (major2) <  1 || \+  (major1) == 0 && (major2) == 1 && (minor) <= 0)+#endif /* MIN_VERSION_ClashSS */+/* package base-4.15.1.0 */+#ifndef VERSION_base+#define VERSION_base "4.15.1.0"+#endif /* VERSION_base */+#ifndef MIN_VERSION_base+#define MIN_VERSION_base(major1,major2,minor) (\+  (major1) <  4 || \+  (major1) == 4 && (major2) <  15 || \+  (major1) == 4 && (major2) == 15 && (minor) <= 1)+#endif /* MIN_VERSION_base */+/* package data-default-0.7.1.1 */+#ifndef VERSION_data_default+#define VERSION_data_default "0.7.1.1"+#endif /* VERSION_data_default */+#ifndef MIN_VERSION_data_default+#define MIN_VERSION_data_default(major1,major2,minor) (\+  (major1) <  0 || \+  (major1) == 0 && (major2) <  7 || \+  (major1) == 0 && (major2) == 7 && (minor) <= 1)+#endif /* MIN_VERSION_data_default */+/* package lens-5.2.3 */+#ifndef VERSION_lens+#define VERSION_lens "5.2.3"+#endif /* VERSION_lens */+#ifndef MIN_VERSION_lens+#define MIN_VERSION_lens(major1,major2,minor) (\+  (major1) <  5 || \+  (major1) == 5 && (major2) <  2 || \+  (major1) == 5 && (major2) == 2 && (minor) <= 3)+#endif /* MIN_VERSION_lens */+/* package template-haskell-2.17.0.0 */+#ifndef VERSION_template_haskell+#define VERSION_template_haskell "2.17.0.0"+#endif /* VERSION_template_haskell */+#ifndef MIN_VERSION_template_haskell+#define MIN_VERSION_template_haskell(major1,major2,minor) (\+  (major1) <  2 || \+  (major1) == 2 && (major2) <  17 || \+  (major1) == 2 && (major2) == 17 && (minor) <= 0)+#endif /* MIN_VERSION_template_haskell */+/* package text-1.2.5.0 */+#ifndef VERSION_text+#define VERSION_text "1.2.5.0"+#endif /* VERSION_text */+#ifndef MIN_VERSION_text+#define MIN_VERSION_text(major1,major2,minor) (\+  (major1) <  1 || \+  (major1) == 1 && (major2) <  2 || \+  (major1) == 1 && (major2) == 2 && (minor) <= 5)+#endif /* MIN_VERSION_text */++/* tool gcc-11.3.0 */+#ifndef TOOL_VERSION_gcc+#define TOOL_VERSION_gcc "11.3.0"+#endif /* TOOL_VERSION_gcc */+#ifndef MIN_TOOL_VERSION_gcc+#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\+  (major1) <  11 || \+  (major1) == 11 && (major2) <  3 || \+  (major1) == 11 && (major2) == 3 && (minor) <= 0)+#endif /* MIN_TOOL_VERSION_gcc */+/* tool ghc-9.0.2 */+#ifndef TOOL_VERSION_ghc+#define TOOL_VERSION_ghc "9.0.2"+#endif /* TOOL_VERSION_ghc */+#ifndef MIN_TOOL_VERSION_ghc+#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\+  (major1) <  9 || \+  (major1) == 9 && (major2) <  0 || \+  (major1) == 9 && (major2) == 0 && (minor) <= 2)+#endif /* MIN_TOOL_VERSION_ghc */+/* tool ghc-pkg-9.0.2 */+#ifndef TOOL_VERSION_ghc_pkg+#define TOOL_VERSION_ghc_pkg "9.0.2"+#endif /* TOOL_VERSION_ghc_pkg */+#ifndef MIN_TOOL_VERSION_ghc_pkg+#define MIN_TOOL_VERSION_ghc_pkg(major1,major2,minor) (\+  (major1) <  9 || \+  (major1) == 9 && (major2) <  0 || \+  (major1) == 9 && (major2) == 0 && (minor) <= 2)+#endif /* MIN_TOOL_VERSION_ghc_pkg */+/* tool haddock-2.25.1 */+#ifndef TOOL_VERSION_haddock+#define TOOL_VERSION_haddock "2.25.1"+#endif /* TOOL_VERSION_haddock */+#ifndef MIN_TOOL_VERSION_haddock+#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\+  (major1) <  2 || \+  (major1) == 2 && (major2) <  25 || \+  (major1) == 2 && (major2) == 25 && (minor) <= 1)+#endif /* MIN_TOOL_VERSION_haddock */+/* tool hpc-0.68 */+#ifndef TOOL_VERSION_hpc+#define TOOL_VERSION_hpc "0.68"+#endif /* TOOL_VERSION_hpc */+#ifndef MIN_TOOL_VERSION_hpc+#define MIN_TOOL_VERSION_hpc(major1,major2,minor) (\+  (major1) <  0 || \+  (major1) == 0 && (major2) <  68 || \+  (major1) == 0 && (major2) == 68 && (minor) <= 0)+#endif /* MIN_TOOL_VERSION_hpc */+/* tool hsc2hs-0.68.7 */+#ifndef TOOL_VERSION_hsc2hs+#define TOOL_VERSION_hsc2hs "0.68.7"+#endif /* TOOL_VERSION_hsc2hs */+#ifndef MIN_TOOL_VERSION_hsc2hs+#define MIN_TOOL_VERSION_hsc2hs(major1,major2,minor) (\+  (major1) <  0 || \+  (major1) == 0 && (major2) <  68 || \+  (major1) == 0 && (major2) == 68 && (minor) <= 7)+#endif /* MIN_TOOL_VERSION_hsc2hs */+/* tool runghc-9.0.2 */+#ifndef TOOL_VERSION_runghc+#define TOOL_VERSION_runghc "9.0.2"+#endif /* TOOL_VERSION_runghc */+#ifndef MIN_TOOL_VERSION_runghc+#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\+  (major1) <  9 || \+  (major1) == 9 && (major2) <  0 || \+  (major1) == 9 && (major2) == 0 && (minor) <= 2)+#endif /* MIN_TOOL_VERSION_runghc */+/* tool strip-2.39 */+#ifndef TOOL_VERSION_strip+#define TOOL_VERSION_strip "2.39"+#endif /* TOOL_VERSION_strip */+#ifndef MIN_TOOL_VERSION_strip+#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\+  (major1) <  2 || \+  (major1) == 2 && (major2) <  39 || \+  (major1) == 2 && (major2) == 39 && (minor) <= 0)+#endif /* MIN_TOOL_VERSION_strip */++#ifndef CURRENT_PACKAGE_KEY+#define CURRENT_PACKAGE_KEY "ClashSS-0.1.0.0-inplace"+#endif /* CURRENT_packageKey */+#ifndef CURRENT_COMPONENT_ID+#define CURRENT_COMPONENT_ID "ClashSS-0.1.0.0-inplace"+#endif /* CURRENT_COMPONENT_ID */+#ifndef CURRENT_PACKAGE_VERSION+#define CURRENT_PACKAGE_VERSION "0.1.0.0"+#endif /* CURRENT_PACKAGE_VERSION */
+ dist-newstyle/build/x86_64-linux/ghc-9.0.2/ClashSS-0.1.0.0/cache/config view

binary file changed (absent → 4333 bytes)

+ dist-newstyle/build/x86_64-linux/ghc-9.0.2/ClashSS-0.1.0.0/package.conf.inplace/package.cache view

binary file changed (absent → 40 bytes)

+ dist-newstyle/build/x86_64-linux/ghc-9.0.2/ClashSS-0.1.0.0/package.conf.inplace/package.cache.lock view
+ dist-newstyle/build/x86_64-linux/ghc-9.0.2/ClashSS-0.1.0.0/setup-config view

binary file changed (absent → 378055 bytes)

+ dist-newstyle/cache/compiler view

binary file changed (absent → 19308 bytes)

+ dist-newstyle/cache/config view

binary file changed (absent → 4217 bytes)

+ dist-newstyle/cache/elaborated-plan view

binary file changed (absent → 597555 bytes)

+ dist-newstyle/cache/improved-plan view

binary file changed (absent → 1173047 bytes)

+ dist-newstyle/cache/plan.json view
@@ -0,0 +1,1 @@+{"cabal-version":"3.8.1.0","cabal-lib-version":"3.8.1.0","compiler-id":"ghc-9.0.2","os":"linux","arch":"x86_64","install-plan":[{"type":"configured","id":"ClashSS-0.1.0.0-inplace","pkg-name":"ClashSS","pkg-version":"0.1.0.0","flags":{},"style":"local","pkg-src":{"type":"local","path":"/home/lazylambda/code/Ace/ClashSS/."},"dist-dir":"/home/lazylambda/code/Ace/ClashSS/dist-newstyle/build/x86_64-linux/ghc-9.0.2/ClashSS-0.1.0.0","build-info":"/home/lazylambda/code/Ace/ClashSS/dist-newstyle/build/x86_64-linux/ghc-9.0.2/ClashSS-0.1.0.0/build-info.json","depends":["base-4.15.1.0","data-default-0.7.1.1-edbddbdf428e98abbe91d850ed95c9d4b561b65b91a24856877a3c74ff714baa","lens-5.2.3-8d51f5c58f174e23e5b59a228dbcbc83fd1eec1c995b007f297ce92c03639f8f","template-haskell-2.17.0.0","text-1.2.5.0"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"OneTuple-0.4.1.1-1a5bcd6663091c53aeb6d07933bb7670df016927e58bbfa62b72c8e14bff69f3","pkg-name":"OneTuple","pkg-version":"0.4.1.1","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"632dfded172086fb9f0e26d3578bcfffa3fb6d135ea5a8de17b7a33ff6e6e682","pkg-src-sha256":"c9e764d4ee1e57cad8341bd5d0de33ba3a52b6793fc1309679f2bf60c030bb2b","depends":["base-4.15.1.0","base-orphans-0.9.1-e7c498b91907486062657e2fd48ae43534741b542178f8e5543fa08373246927","ghc-prim-0.7.0","template-haskell-2.17.0.0"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"StateVar-1.2.2-5418cd17e7bc5d255ecbac856de427c7f041d9658febb445a6133a010cd0151c","pkg-name":"StateVar","pkg-version":"1.2.2","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"3c022c00485fe165e3080d5da6b3ca9c9b02f62c5deebc584d1b3d1309ce673e","pkg-src-sha256":"5e4b39da395656a59827b0280508aafdc70335798b50e5d6fd52596026251825","depends":["base-4.15.1.0","stm-2.5.0.0","transformers-0.5.6.2"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"adjunctions-4.4.2-522561d99acb592b1390db5b7bd5802e01bffd3162b0330a7f419f6256d45f68","pkg-name":"adjunctions","pkg-version":"4.4.2","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"30206ae6b78d3d523c2ff73640f84b51fa204ac3f05267a5f0c77c486b96781d","pkg-src-sha256":"147b5f8db810bca0ea8952ef974982ffc447cecd21f01e1ea1121df77e276518","depends":["array-0.5.4.0","base-4.15.1.0","comonad-5.0.8-200c5c2bc6a011a9c408f09a2c9b5e81b45e2df024c22ff863076a739dcc1686","containers-0.6.4.1","contravariant-1.5.5-0e143b53f97486008838c513fae5eda5aee3a8d6a3e22dee220bb157340abad0","distributive-0.6.2.1-a03737c6035cb7b83d155ef368488ac8c7c9b9dccf000ce7f9a83d47ffeb00b1","free-5.2-0609b271197d2051bb60a1af8a10b27576e5b80a5b0ea4589d3b993752f3ad5d","mtl-2.2.2","profunctors-5.6.2-fab8b016d1b2c730841323b8521626464d09633752a3af1e810d33bb5b76b6bb","semigroupoids-6.0.0.1-84a419e01ad02b15c8143ec601285890546ecd53c016fce165813a07e7fdc3a1","semigroups-0.20-62ac53465b171233a70d2fb244ee57f3fd1f17aa87cd229e7147244b331bcb14","tagged-0.8.8-4a02ca372d04987de4fb081f15b9ee2fd47870398bbc65aba31ec59d42a35d39","transformers-0.5.6.2","transformers-compat-0.7.2-8e89728e0d3ab08b3fb2aa30ec65bd77196cc3e58cebad142f7ee92c9049acec","void-0.7.3-c86d27aab6814888e289a33d79f76ea2155e1ca64ada66f5c91f2adbc566e33e"],"exe-depends":[],"component-name":"lib"},{"type":"pre-existing","id":"array-0.5.4.0","pkg-name":"array","pkg-version":"0.5.4.0","depends":["base-4.15.1.0"]},{"type":"configured","id":"assoc-1.1-291e4da8de4fa5233c4ee898f3290d30d2c9086246a2fd717ca2d7777388f8a0","pkg-name":"assoc","pkg-version":"1.1","flags":{"tagged":true},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"56d0fd1c17aaf6268e81bf19ba5afe186128d7f88126bd546d5b3151ab692652","pkg-src-sha256":"7aa2e6548b3d9d49a286ac20639479aaf6c47a1446113ed784d98737c5f60df4","depends":["base-4.15.1.0","tagged-0.8.8-4a02ca372d04987de4fb081f15b9ee2fd47870398bbc65aba31ec59d42a35d39"],"exe-depends":[],"component-name":"lib"},{"type":"pre-existing","id":"base-4.15.1.0","pkg-name":"base","pkg-version":"4.15.1.0","depends":["ghc-bignum-1.1","ghc-prim-0.7.0","rts"]},{"type":"configured","id":"base-orphans-0.9.1-e7c498b91907486062657e2fd48ae43534741b542178f8e5543fa08373246927","pkg-name":"base-orphans","pkg-version":"0.9.1","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"c4733d09f798fc4304e936924a1a7d9fc2425aefad6c46ad4592035254b46051","pkg-src-sha256":"5bbf2da382c5b212d6a8be2f8c49edee0eba30f272a15fd32c13e6e4091ef172","depends":["base-4.15.1.0","ghc-prim-0.7.0"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"bifunctors-5.6.1-1965fb2b7c42fb121f414d32b598cb28ac48fdc45e44c93d6499c228cb0339ab","pkg-name":"bifunctors","pkg-version":"5.6.1","flags":{"tagged":true},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"82fa7ed8f69f0bfa375de117ab36414c0b96a97ee046edc3ac6da7a295a94755","pkg-src-sha256":"06381471b5be16516a1b2c4b21a5101a3d991038bface8e0cad144c0044d57fc","depends":["assoc-1.1-291e4da8de4fa5233c4ee898f3290d30d2c9086246a2fd717ca2d7777388f8a0","base-4.15.1.0","comonad-5.0.8-200c5c2bc6a011a9c408f09a2c9b5e81b45e2df024c22ff863076a739dcc1686","containers-0.6.4.1","foldable1-classes-compat-0.1-9727b720f84b4552fb4b0426ae090b5ba56186eb9372908f54672e4859d04ce8","tagged-0.8.8-4a02ca372d04987de4fb081f15b9ee2fd47870398bbc65aba31ec59d42a35d39","template-haskell-2.17.0.0","th-abstraction-0.6.0.0-3f11c475b20ea0d4c4ad260a087b4a0d8129292bb761daf8aa6088ab6d58edfa","transformers-0.5.6.2"],"exe-depends":[],"component-name":"lib"},{"type":"pre-existing","id":"binary-0.8.8.0","pkg-name":"binary","pkg-version":"0.8.8.0","depends":["array-0.5.4.0","base-4.15.1.0","bytestring-0.10.12.1","containers-0.6.4.1"]},{"type":"pre-existing","id":"bytestring-0.10.12.1","pkg-name":"bytestring","pkg-version":"0.10.12.1","depends":["base-4.15.1.0","deepseq-1.4.5.0","ghc-bignum-1.1","ghc-prim-0.7.0"]},{"type":"configured","id":"call-stack-0.4.0-b481db444ea8eacdb3130fdc7aca3504b848cb40ad6d6b820fd1b80005559002","pkg-name":"call-stack","pkg-version":"0.4.0","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"ac44d2c00931dc20b01750da8c92ec443eb63a7231e8550188cb2ac2385f7feb","pkg-src-sha256":"430bcf8a3404f7e55319573c0b807b1356946f0c8f289bb3d9afb279c636b87b","depends":["base-4.15.1.0"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"comonad-5.0.8-200c5c2bc6a011a9c408f09a2c9b5e81b45e2df024c22ff863076a739dcc1686","pkg-name":"comonad","pkg-version":"5.0.8","flags":{"containers":true,"distributive":true,"indexed-traversable":true},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"4a4dbfbd03fb4963987710fca994e8b5624bd05a33e5f95b7581b26f8229c5e3","pkg-src-sha256":"ef6cdf2cc292cc43ee6aa96c581b235fdea8ab44a0bffb24dc79ae2b2ef33d13","depends":["base-4.15.1.0","containers-0.6.4.1","distributive-0.6.2.1-a03737c6035cb7b83d155ef368488ac8c7c9b9dccf000ce7f9a83d47ffeb00b1","indexed-traversable-0.1.3-d82e33443eba1afaabbe06eef5dbbe595ad09d1bbfeab8a0fa7b278392bb5087","tagged-0.8.8-4a02ca372d04987de4fb081f15b9ee2fd47870398bbc65aba31ec59d42a35d39","transformers-0.5.6.2","transformers-compat-0.7.2-8e89728e0d3ab08b3fb2aa30ec65bd77196cc3e58cebad142f7ee92c9049acec"],"exe-depends":[],"component-name":"lib"},{"type":"pre-existing","id":"containers-0.6.4.1","pkg-name":"containers","pkg-version":"0.6.4.1","depends":["array-0.5.4.0","base-4.15.1.0","deepseq-1.4.5.0"]},{"type":"configured","id":"contravariant-1.5.5-0e143b53f97486008838c513fae5eda5aee3a8d6a3e22dee220bb157340abad0","pkg-name":"contravariant","pkg-version":"1.5.5","flags":{"semigroups":true,"statevar":true,"tagged":true},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"470ed0e040e879e2da4af1b2c8f94e199f6135852a8107858d5ae0a95365835f","pkg-src-sha256":"062fd66580d7aad0b5ba93e644ffa7feee69276ef50f20d4ed9f1deb7642dffa","depends":["StateVar-1.2.2-5418cd17e7bc5d255ecbac856de427c7f041d9658febb445a6133a010cd0151c","base-4.15.1.0","transformers-0.5.6.2"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"data-array-byte-0.1.0.1-b7c4008992216a4404e3a59a5f4d75becff3179747209a6caf866ae30c479f56","pkg-name":"data-array-byte","pkg-version":"0.1.0.1","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"ad89e28b2b046175698fbf542af2ce43e5d2af50aae9f48d12566b1bb3de1d3c","pkg-src-sha256":"1bb6eca0b3e02d057fe7f4e14c81ef395216f421ab30fdaa1b18017c9c025600","depends":["base-4.15.1.0","deepseq-1.4.5.0","template-haskell-2.17.0.0"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"data-default-0.7.1.1-edbddbdf428e98abbe91d850ed95c9d4b561b65b91a24856877a3c74ff714baa","pkg-name":"data-default","pkg-version":"0.7.1.1","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"2804e8d14f521a1edee88b68b66347448e7f3b685868290fdc55930e4471f5a9","pkg-src-sha256":"b0f95d279cd75cacaa8152a01590dc3460f7134f6840b37052abb3ba3cb2a511","components":{"lib":{"depends":["base-4.15.1.0","data-default-class-0.1.2.0-9e2eb1584d665564d36abb6dcf2f09b00aed09635653c2064b56d7634c114edc","data-default-instances-containers-0.0.1-97d0ae45e77faeb1e3bcafdb3ce1874a1ec3d843ae0373d5023b74c817494377","data-default-instances-dlist-0.0.1-594beec10b7a55237f55c07c52f18ee5e37da59c4c283b781717d1601274666f","data-default-instances-old-locale-0.0.1-093df202b5283890a569a485db0ab222881582d3f544008741d53bc5a937040c"],"exe-depends":[]}}},{"type":"configured","id":"data-default-class-0.1.2.0-9e2eb1584d665564d36abb6dcf2f09b00aed09635653c2064b56d7634c114edc","pkg-name":"data-default-class","pkg-version":"0.1.2.0","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"63e62120b7efd733a5a17cf59ceb43268e9a929c748127172d7d42f4a336e327","pkg-src-sha256":"4f01b423f000c3e069aaf52a348564a6536797f31498bb85c3db4bd2d0973e56","components":{"lib":{"depends":["base-4.15.1.0"],"exe-depends":[]}}},{"type":"configured","id":"data-default-instances-containers-0.0.1-97d0ae45e77faeb1e3bcafdb3ce1874a1ec3d843ae0373d5023b74c817494377","pkg-name":"data-default-instances-containers","pkg-version":"0.0.1","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"6e1f4b28028a3bc455aaf4b5a9104b71ea72cff78b1b8041863df7afd1a8deb3","pkg-src-sha256":"a55e07af005c9815d82f3fc95e125db82994377c9f4a769428878701d4ec081a","components":{"lib":{"depends":["base-4.15.1.0","containers-0.6.4.1","data-default-class-0.1.2.0-9e2eb1584d665564d36abb6dcf2f09b00aed09635653c2064b56d7634c114edc"],"exe-depends":[]}}},{"type":"configured","id":"data-default-instances-dlist-0.0.1-594beec10b7a55237f55c07c52f18ee5e37da59c4c283b781717d1601274666f","pkg-name":"data-default-instances-dlist","pkg-version":"0.0.1","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"4286abacbb256c392907701be16986a6e07f2beaf2778e7bd925465655d9e301","pkg-src-sha256":"7d683711cbf08abd7adcd5ac2be825381308d220397315a5570fe61b719b5959","components":{"lib":{"depends":["base-4.15.1.0","data-default-class-0.1.2.0-9e2eb1584d665564d36abb6dcf2f09b00aed09635653c2064b56d7634c114edc","dlist-1.0-a6b06eb06860bcfd368ae60dccd8a740a5f75e2bfc6e421541982ee3ba8284dc"],"exe-depends":[]}}},{"type":"configured","id":"data-default-instances-old-locale-0.0.1-093df202b5283890a569a485db0ab222881582d3f544008741d53bc5a937040c","pkg-name":"data-default-instances-old-locale","pkg-version":"0.0.1","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"d4a757f68f0f83531fcb34a4525fe6769c54a45182e28ffdfff19c2b0ace42fb","pkg-src-sha256":"60d3b02922958c4908d7bf2b24ddf61511665745f784227d206745784b0c0802","components":{"lib":{"depends":["base-4.15.1.0","data-default-class-0.1.2.0-9e2eb1584d665564d36abb6dcf2f09b00aed09635653c2064b56d7634c114edc","old-locale-1.0.0.7-c7240c6ee240c35a32fc541ce6be5f20483700af69ba458b9ef76e34b7763daf"],"exe-depends":[]}}},{"type":"pre-existing","id":"deepseq-1.4.5.0","pkg-name":"deepseq","pkg-version":"1.4.5.0","depends":["array-0.5.4.0","base-4.15.1.0"]},{"type":"configured","id":"distributive-0.6.2.1-a03737c6035cb7b83d155ef368488ac8c7c9b9dccf000ce7f9a83d47ffeb00b1","pkg-name":"distributive","pkg-version":"0.6.2.1","flags":{"semigroups":true,"tagged":true},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"0f99f5541cca04acf89b64432b03422b6408e830a8dff30e6c4334ef1a48680c","pkg-src-sha256":"d7351392e078f58caa46630a4b9c643e1e2e9dddee45848c5c8358e7b1316b91","depends":["base-4.15.1.0","base-orphans-0.9.1-e7c498b91907486062657e2fd48ae43534741b542178f8e5543fa08373246927","tagged-0.8.8-4a02ca372d04987de4fb081f15b9ee2fd47870398bbc65aba31ec59d42a35d39","transformers-0.5.6.2"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"dlist-1.0-a6b06eb06860bcfd368ae60dccd8a740a5f75e2bfc6e421541982ee3ba8284dc","pkg-name":"dlist","pkg-version":"1.0","flags":{"werror":false},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"55ff69d20ce638fc7727342ee67f2f868da61d3dcf3763f790bf9aa0b145e568","pkg-src-sha256":"173d637328bb173fcc365f30d29ff4a94292a1e0e5558aeb3dfc11de81510115","depends":["base-4.15.1.0","deepseq-1.4.5.0"],"exe-depends":[],"component-name":"lib"},{"type":"pre-existing","id":"exceptions-0.10.4","pkg-name":"exceptions","pkg-version":"0.10.4","depends":["base-4.15.1.0","mtl-2.2.2","stm-2.5.0.0","template-haskell-2.17.0.0","transformers-0.5.6.2"]},{"type":"pre-existing","id":"filepath-1.4.2.1","pkg-name":"filepath","pkg-version":"1.4.2.1","depends":["base-4.15.1.0"]},{"type":"configured","id":"foldable1-classes-compat-0.1-9727b720f84b4552fb4b0426ae090b5ba56186eb9372908f54672e4859d04ce8","pkg-name":"foldable1-classes-compat","pkg-version":"0.1","flags":{"tagged":true},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"fb4b3cedd33d5c22c573c39baa930c78eaa4feb22d43abb680c3149f8ab9fa4e","pkg-src-sha256":"d057c3f358e1a6b72c73519bc64ba6aa959f066c08fed69f73258555ef95ff12","depends":["base-4.15.1.0","containers-0.6.4.1","ghc-prim-0.7.0","tagged-0.8.8-4a02ca372d04987de4fb081f15b9ee2fd47870398bbc65aba31ec59d42a35d39","transformers-0.5.6.2"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"free-5.2-0609b271197d2051bb60a1af8a10b27576e5b80a5b0ea4589d3b993752f3ad5d","pkg-name":"free","pkg-version":"5.2","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"4dd76c1a19f81d7866e7b75682350f1ef3e0441b19b4d07eccdd9ef326a0be70","pkg-src-sha256":"72867f7c89173263765736e8d395e94291f1aaea626ecb1d673d72ce90b94f89","depends":["base-4.15.1.0","comonad-5.0.8-200c5c2bc6a011a9c408f09a2c9b5e81b45e2df024c22ff863076a739dcc1686","containers-0.6.4.1","distributive-0.6.2.1-a03737c6035cb7b83d155ef368488ac8c7c9b9dccf000ce7f9a83d47ffeb00b1","exceptions-0.10.4","indexed-traversable-0.1.3-d82e33443eba1afaabbe06eef5dbbe595ad09d1bbfeab8a0fa7b278392bb5087","mtl-2.2.2","profunctors-5.6.2-fab8b016d1b2c730841323b8521626464d09633752a3af1e810d33bb5b76b6bb","semigroupoids-6.0.0.1-84a419e01ad02b15c8143ec601285890546ecd53c016fce165813a07e7fdc3a1","template-haskell-2.17.0.0","th-abstraction-0.6.0.0-3f11c475b20ea0d4c4ad260a087b4a0d8129292bb761daf8aa6088ab6d58edfa","transformers-0.5.6.2","transformers-base-0.4.6-dbfc68cc392d2f23cb47ae5dffab601bc00fe83b3019fb890d4be9cd572ff5c6"],"exe-depends":[],"component-name":"lib"},{"type":"pre-existing","id":"ghc-bignum-1.1","pkg-name":"ghc-bignum","pkg-version":"1.1","depends":["ghc-prim-0.7.0"]},{"type":"pre-existing","id":"ghc-boot-th-9.0.2","pkg-name":"ghc-boot-th","pkg-version":"9.0.2","depends":["base-4.15.1.0"]},{"type":"pre-existing","id":"ghc-prim-0.7.0","pkg-name":"ghc-prim","pkg-version":"0.7.0","depends":["rts"]},{"type":"configured","id":"hashable-1.4.3.0-06c87f08d157cd2e4602331db0bf88a5223fec984aaf36ea457ff5576235591e","pkg-name":"hashable","pkg-version":"1.4.3.0","flags":{"integer-gmp":true,"random-initial-seed":false},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"f3bf68acfa0df7a064a378ef2cdcfeb55e6fb96100675f4c593556dcbf3d7194","pkg-src-sha256":"32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5","depends":["base-4.15.1.0","base-orphans-0.9.1-e7c498b91907486062657e2fd48ae43534741b542178f8e5543fa08373246927","bytestring-0.10.12.1","containers-0.6.4.1","data-array-byte-0.1.0.1-b7c4008992216a4404e3a59a5f4d75becff3179747209a6caf866ae30c479f56","deepseq-1.4.5.0","filepath-1.4.2.1","ghc-bignum-1.1","ghc-prim-0.7.0","text-1.2.5.0"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"indexed-traversable-0.1.3-d82e33443eba1afaabbe06eef5dbbe595ad09d1bbfeab8a0fa7b278392bb5087","pkg-name":"indexed-traversable","pkg-version":"0.1.3","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"911f96592752ce4ffbeda00b1155dbbfac5135c71d6755ae02c00552819a9b17","pkg-src-sha256":"1d32925fb6f78e3a52a849b29fc4360df51c97be95ba8ac642517d3ff01a53d9","depends":["array-0.5.4.0","base-4.15.1.0","containers-0.6.4.1","foldable1-classes-compat-0.1-9727b720f84b4552fb4b0426ae090b5ba56186eb9372908f54672e4859d04ce8","transformers-0.5.6.2"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"indexed-traversable-instances-0.1.1.2-ecc0944758857ce03be3db05b1259392f96eeab5b08dd3ffa72aa9f09299dfc0","pkg-name":"indexed-traversable-instances","pkg-version":"0.1.1.2","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"00d5e3e149e2bee0f7a547e0093294c306d4276e73a619abe7d8e69f7ce03c7b","pkg-src-sha256":"0f9b4e895ccc819f74d15f913c93613cc74cab74dbb05d7e305aa387bdbe374a","depends":["OneTuple-0.4.1.1-1a5bcd6663091c53aeb6d07933bb7670df016927e58bbfa62b72c8e14bff69f3","base-4.15.1.0","indexed-traversable-0.1.3-d82e33443eba1afaabbe06eef5dbbe595ad09d1bbfeab8a0fa7b278392bb5087","tagged-0.8.8-4a02ca372d04987de4fb081f15b9ee2fd47870398bbc65aba31ec59d42a35d39","unordered-containers-0.2.19.1-d071dc068e82d1ae808aabde21111160b51736add520497b5e0e55a71c27f8a1","vector-0.13.1.0-9dc79d52ae3be5ca1d495042fae0f1868a77e812bd5c3e5b0d4167ed21689e2f"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"invariant-0.6.2-127f7482e1fb5ae60f561618c1f81161e0c5e4cba3e5ab85152618f339c14374","pkg-name":"invariant","pkg-version":"0.6.2","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"4338158fe36c3ff9ee741eeff79cb886222cab9da3f476071956cb01b0d9bbff","pkg-src-sha256":"c36485e8088a57e9df1a93881211a1c09e8920ce1b14bfa141cac9f75b7ee108","depends":["StateVar-1.2.2-5418cd17e7bc5d255ecbac856de427c7f041d9658febb445a6133a010cd0151c","array-0.5.4.0","base-4.15.1.0","bifunctors-5.6.1-1965fb2b7c42fb121f414d32b598cb28ac48fdc45e44c93d6499c228cb0339ab","comonad-5.0.8-200c5c2bc6a011a9c408f09a2c9b5e81b45e2df024c22ff863076a739dcc1686","containers-0.6.4.1","contravariant-1.5.5-0e143b53f97486008838c513fae5eda5aee3a8d6a3e22dee220bb157340abad0","ghc-prim-0.7.0","profunctors-5.6.2-fab8b016d1b2c730841323b8521626464d09633752a3af1e810d33bb5b76b6bb","stm-2.5.0.0","tagged-0.8.8-4a02ca372d04987de4fb081f15b9ee2fd47870398bbc65aba31ec59d42a35d39","template-haskell-2.17.0.0","th-abstraction-0.6.0.0-3f11c475b20ea0d4c4ad260a087b4a0d8129292bb761daf8aa6088ab6d58edfa","transformers-0.5.6.2","transformers-compat-0.7.2-8e89728e0d3ab08b3fb2aa30ec65bd77196cc3e58cebad142f7ee92c9049acec","unordered-containers-0.2.19.1-d071dc068e82d1ae808aabde21111160b51736add520497b5e0e55a71c27f8a1"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"kan-extensions-5.2.5-6052ed7924a303f1aaa36452c51d7e291ff2d7eb40fc3c88f05bd76e66a81a0b","pkg-name":"kan-extensions","pkg-version":"5.2.5","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"fbdba767565f40faf515b044a774cc3b371eb6ce8a082d9f659411cea88698cf","pkg-src-sha256":"b914dccc040caf1d8764b99df1028dad3e4fdf46c262192e54b59c9da66ead22","depends":["adjunctions-4.4.2-522561d99acb592b1390db5b7bd5802e01bffd3162b0330a7f419f6256d45f68","array-0.5.4.0","base-4.15.1.0","comonad-5.0.8-200c5c2bc6a011a9c408f09a2c9b5e81b45e2df024c22ff863076a739dcc1686","containers-0.6.4.1","contravariant-1.5.5-0e143b53f97486008838c513fae5eda5aee3a8d6a3e22dee220bb157340abad0","distributive-0.6.2.1-a03737c6035cb7b83d155ef368488ac8c7c9b9dccf000ce7f9a83d47ffeb00b1","free-5.2-0609b271197d2051bb60a1af8a10b27576e5b80a5b0ea4589d3b993752f3ad5d","invariant-0.6.2-127f7482e1fb5ae60f561618c1f81161e0c5e4cba3e5ab85152618f339c14374","mtl-2.2.2","profunctors-5.6.2-fab8b016d1b2c730841323b8521626464d09633752a3af1e810d33bb5b76b6bb","semigroupoids-6.0.0.1-84a419e01ad02b15c8143ec601285890546ecd53c016fce165813a07e7fdc3a1","tagged-0.8.8-4a02ca372d04987de4fb081f15b9ee2fd47870398bbc65aba31ec59d42a35d39","transformers-0.5.6.2","transformers-compat-0.7.2-8e89728e0d3ab08b3fb2aa30ec65bd77196cc3e58cebad142f7ee92c9049acec"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"lens-5.2.3-8d51f5c58f174e23e5b59a228dbcbc83fd1eec1c995b007f297ce92c03639f8f","pkg-name":"lens","pkg-version":"5.2.3","flags":{"benchmark-uniplate":false,"dump-splices":false,"inlining":true,"j":false,"test-hunit":true,"test-properties":true,"test-templates":true,"trustworthy":true},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"637287c76adff383063b3206a4213640de1a74839ec16008cc71b5b407f7d05e","pkg-src-sha256":"df1e8ca8dd89d884994e0c80761a972088326fa43ed5d47c01b14abb710b994d","depends":["array-0.5.4.0","assoc-1.1-291e4da8de4fa5233c4ee898f3290d30d2c9086246a2fd717ca2d7777388f8a0","base-4.15.1.0","base-orphans-0.9.1-e7c498b91907486062657e2fd48ae43534741b542178f8e5543fa08373246927","bifunctors-5.6.1-1965fb2b7c42fb121f414d32b598cb28ac48fdc45e44c93d6499c228cb0339ab","bytestring-0.10.12.1","call-stack-0.4.0-b481db444ea8eacdb3130fdc7aca3504b848cb40ad6d6b820fd1b80005559002","comonad-5.0.8-200c5c2bc6a011a9c408f09a2c9b5e81b45e2df024c22ff863076a739dcc1686","containers-0.6.4.1","contravariant-1.5.5-0e143b53f97486008838c513fae5eda5aee3a8d6a3e22dee220bb157340abad0","distributive-0.6.2.1-a03737c6035cb7b83d155ef368488ac8c7c9b9dccf000ce7f9a83d47ffeb00b1","exceptions-0.10.4","filepath-1.4.2.1","free-5.2-0609b271197d2051bb60a1af8a10b27576e5b80a5b0ea4589d3b993752f3ad5d","ghc-prim-0.7.0","hashable-1.4.3.0-06c87f08d157cd2e4602331db0bf88a5223fec984aaf36ea457ff5576235591e","indexed-traversable-0.1.3-d82e33443eba1afaabbe06eef5dbbe595ad09d1bbfeab8a0fa7b278392bb5087","indexed-traversable-instances-0.1.1.2-ecc0944758857ce03be3db05b1259392f96eeab5b08dd3ffa72aa9f09299dfc0","kan-extensions-5.2.5-6052ed7924a303f1aaa36452c51d7e291ff2d7eb40fc3c88f05bd76e66a81a0b","mtl-2.2.2","parallel-3.2.2.0-44e63dc5ba1c23036038987f4863753d152bbb648e54ce571ab676587af80127","profunctors-5.6.2-fab8b016d1b2c730841323b8521626464d09633752a3af1e810d33bb5b76b6bb","reflection-2.1.7-e143c0fa7a3567edb8850af931e9b64b12a995cc523685fc72c5abe241518dd8","semigroupoids-6.0.0.1-84a419e01ad02b15c8143ec601285890546ecd53c016fce165813a07e7fdc3a1","strict-0.5-b28a747f3ad4385381105b1b7c371ddd4404195794a7f80c923552793ef7a5d9","tagged-0.8.8-4a02ca372d04987de4fb081f15b9ee2fd47870398bbc65aba31ec59d42a35d39","template-haskell-2.17.0.0","text-1.2.5.0","th-abstraction-0.6.0.0-3f11c475b20ea0d4c4ad260a087b4a0d8129292bb761daf8aa6088ab6d58edfa","these-1.2-83aac5b8069a9434a8b0a3f351ec3b59a93ed7f6bd918c4fd8d6397093e1dcbe","transformers-0.5.6.2","transformers-compat-0.7.2-8e89728e0d3ab08b3fb2aa30ec65bd77196cc3e58cebad142f7ee92c9049acec","unordered-containers-0.2.19.1-d071dc068e82d1ae808aabde21111160b51736add520497b5e0e55a71c27f8a1","vector-0.13.1.0-9dc79d52ae3be5ca1d495042fae0f1868a77e812bd5c3e5b0d4167ed21689e2f"],"exe-depends":[],"component-name":"lib"},{"type":"pre-existing","id":"mtl-2.2.2","pkg-name":"mtl","pkg-version":"2.2.2","depends":["base-4.15.1.0","transformers-0.5.6.2"]},{"type":"configured","id":"old-locale-1.0.0.7-c7240c6ee240c35a32fc541ce6be5f20483700af69ba458b9ef76e34b7763daf","pkg-name":"old-locale","pkg-version":"1.0.0.7","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"fa998be2c7e00cd26a6e9075bea790caaf3932caa3e9497ad69bc20380dd6911","pkg-src-sha256":"dbaf8bf6b888fb98845705079296a23c3f40ee2f449df7312f7f7f1de18d7b50","depends":["base-4.15.1.0"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"parallel-3.2.2.0-44e63dc5ba1c23036038987f4863753d152bbb648e54ce571ab676587af80127","pkg-name":"parallel","pkg-version":"3.2.2.0","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"b993406e98fe9126eff4a69d28e7e361037dd1c0892a9fd6c26e1f92eb9c4fa4","pkg-src-sha256":"170453a71a2a8b31cca63125533f7771d7debeb639700bdabdd779c34d8a6ef6","depends":["array-0.5.4.0","base-4.15.1.0","containers-0.6.4.1","deepseq-1.4.5.0","ghc-prim-0.7.0"],"exe-depends":[],"component-name":"lib"},{"type":"pre-existing","id":"pretty-1.1.3.6","pkg-name":"pretty","pkg-version":"1.1.3.6","depends":["base-4.15.1.0","deepseq-1.4.5.0","ghc-prim-0.7.0"]},{"type":"configured","id":"primitive-0.9.0.0-398b66b413c3a0f6e8e0d25eee2ea42b3a72bec7a11eddcc162d11615bc340bd","pkg-name":"primitive","pkg-version":"0.9.0.0","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"1ceb39f67c0e614180f2992a6d30f26603ab2cd23c4f8e25b30213f98807f6f1","pkg-src-sha256":"696d4bd291c94d736142d6182117dca4258d3ef28bfefdb649ac8b5ecd0999c7","depends":["base-4.15.1.0","data-array-byte-0.1.0.1-b7c4008992216a4404e3a59a5f4d75becff3179747209a6caf866ae30c479f56","deepseq-1.4.5.0","template-haskell-2.17.0.0","transformers-0.5.6.2"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"profunctors-5.6.2-fab8b016d1b2c730841323b8521626464d09633752a3af1e810d33bb5b76b6bb","pkg-name":"profunctors","pkg-version":"5.6.2","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"e178ba4468982326656626e2089e296f64485e68fdddc9f4476dcd5d612b4f78","pkg-src-sha256":"65955d7b50525a4a3bccdab1d982d2ae342897fd38140d5a94b5ef3800d8c92a","depends":["base-4.15.1.0","base-orphans-0.9.1-e7c498b91907486062657e2fd48ae43534741b542178f8e5543fa08373246927","bifunctors-5.6.1-1965fb2b7c42fb121f414d32b598cb28ac48fdc45e44c93d6499c228cb0339ab","comonad-5.0.8-200c5c2bc6a011a9c408f09a2c9b5e81b45e2df024c22ff863076a739dcc1686","contravariant-1.5.5-0e143b53f97486008838c513fae5eda5aee3a8d6a3e22dee220bb157340abad0","distributive-0.6.2.1-a03737c6035cb7b83d155ef368488ac8c7c9b9dccf000ce7f9a83d47ffeb00b1","tagged-0.8.8-4a02ca372d04987de4fb081f15b9ee2fd47870398bbc65aba31ec59d42a35d39","transformers-0.5.6.2"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"reflection-2.1.7-e143c0fa7a3567edb8850af931e9b64b12a995cc523685fc72c5abe241518dd8","pkg-name":"reflection","pkg-version":"2.1.7","flags":{"slow":false,"template-haskell":true},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"f2b5b3f0983a605d16e53af489ebba62967d2c80353473ca66cc1734222b3a04","pkg-src-sha256":"6cbb18a8b02871533bb8b641dc6f76813a097d94404e5808bb5d52b0f0e415fd","depends":["base-4.15.1.0","template-haskell-2.17.0.0"],"exe-depends":[],"component-name":"lib"},{"type":"pre-existing","id":"rts","pkg-name":"rts","pkg-version":"1.0.2","depends":[]},{"type":"configured","id":"semigroupoids-6.0.0.1-84a419e01ad02b15c8143ec601285890546ecd53c016fce165813a07e7fdc3a1","pkg-name":"semigroupoids","pkg-version":"6.0.0.1","flags":{"comonad":true,"containers":true,"contravariant":true,"distributive":true,"tagged":true,"unordered-containers":true},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"47a23b451c114e65361e713e8fe36828fca3a84285325e8f444254b2ab0c43c5","pkg-src-sha256":"7da38a9891bdf8205fd6522cdb712956b8c0bf5c52983da60295c8e057d77934","depends":["base-4.15.1.0","base-orphans-0.9.1-e7c498b91907486062657e2fd48ae43534741b542178f8e5543fa08373246927","bifunctors-5.6.1-1965fb2b7c42fb121f414d32b598cb28ac48fdc45e44c93d6499c228cb0339ab","comonad-5.0.8-200c5c2bc6a011a9c408f09a2c9b5e81b45e2df024c22ff863076a739dcc1686","containers-0.6.4.1","contravariant-1.5.5-0e143b53f97486008838c513fae5eda5aee3a8d6a3e22dee220bb157340abad0","distributive-0.6.2.1-a03737c6035cb7b83d155ef368488ac8c7c9b9dccf000ce7f9a83d47ffeb00b1","foldable1-classes-compat-0.1-9727b720f84b4552fb4b0426ae090b5ba56186eb9372908f54672e4859d04ce8","hashable-1.4.3.0-06c87f08d157cd2e4602331db0bf88a5223fec984aaf36ea457ff5576235591e","tagged-0.8.8-4a02ca372d04987de4fb081f15b9ee2fd47870398bbc65aba31ec59d42a35d39","template-haskell-2.17.0.0","transformers-0.5.6.2","transformers-compat-0.7.2-8e89728e0d3ab08b3fb2aa30ec65bd77196cc3e58cebad142f7ee92c9049acec","unordered-containers-0.2.19.1-d071dc068e82d1ae808aabde21111160b51736add520497b5e0e55a71c27f8a1"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"semigroups-0.20-62ac53465b171233a70d2fb244ee57f3fd1f17aa87cd229e7147244b331bcb14","pkg-name":"semigroups","pkg-version":"0.20","flags":{"binary":true,"bytestring":true,"bytestring-builder":false,"containers":true,"deepseq":true,"hashable":true,"tagged":true,"template-haskell":true,"text":true,"transformers":true,"unordered-containers":true},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"925341e6f7eb104cb490bef06eab93bb7995c7c67c51ee938185a2ddefa7aaf2","pkg-src-sha256":"902d2e33c96b40a89de5957f2a9e097197afcc35e257e45b32ebe770993673e1","depends":["base-4.15.1.0"],"exe-depends":[],"component-name":"lib"},{"type":"pre-existing","id":"stm-2.5.0.0","pkg-name":"stm","pkg-version":"2.5.0.0","depends":["array-0.5.4.0","base-4.15.1.0"]},{"type":"configured","id":"strict-0.5-b28a747f3ad4385381105b1b7c371ddd4404195794a7f80c923552793ef7a5d9","pkg-name":"strict","pkg-version":"0.5","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"bd57d7b3655951dfaa7d1e1374d7352dfe83f82a9c98309bf3a6587ef8cbd87d","pkg-src-sha256":"3f4f0995dec2d520d0e321542f71412dac023658fdab603db04364d75269a0fd","depends":["assoc-1.1-291e4da8de4fa5233c4ee898f3290d30d2c9086246a2fd717ca2d7777388f8a0","base-4.15.1.0","binary-0.8.8.0","bytestring-0.10.12.1","deepseq-1.4.5.0","ghc-prim-0.7.0","hashable-1.4.3.0-06c87f08d157cd2e4602331db0bf88a5223fec984aaf36ea457ff5576235591e","text-1.2.5.0","these-1.2-83aac5b8069a9434a8b0a3f351ec3b59a93ed7f6bd918c4fd8d6397093e1dcbe","transformers-0.5.6.2"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"tagged-0.8.8-4a02ca372d04987de4fb081f15b9ee2fd47870398bbc65aba31ec59d42a35d39","pkg-name":"tagged","pkg-version":"0.8.8","flags":{"deepseq":true,"transformers":true},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"c4fdbd3e1c423af0ccf8eb9e9962620106c34e32ed8e0cc647fb06899a703e04","pkg-src-sha256":"a083fa7835516203c168433a1c8dfc0290a94b05fedab566ad0640fc9137a6a7","depends":["base-4.15.1.0","deepseq-1.4.5.0","template-haskell-2.17.0.0","transformers-0.5.6.2"],"exe-depends":[],"component-name":"lib"},{"type":"pre-existing","id":"template-haskell-2.17.0.0","pkg-name":"template-haskell","pkg-version":"2.17.0.0","depends":["base-4.15.1.0","ghc-boot-th-9.0.2","ghc-prim-0.7.0","pretty-1.1.3.6"]},{"type":"pre-existing","id":"text-1.2.5.0","pkg-name":"text","pkg-version":"1.2.5.0","depends":["array-0.5.4.0","base-4.15.1.0","binary-0.8.8.0","bytestring-0.10.12.1","deepseq-1.4.5.0","ghc-prim-0.7.0","template-haskell-2.17.0.0"]},{"type":"configured","id":"th-abstraction-0.6.0.0-3f11c475b20ea0d4c4ad260a087b4a0d8129292bb761daf8aa6088ab6d58edfa","pkg-name":"th-abstraction","pkg-version":"0.6.0.0","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"d8959fa6a2812afcdd5f6f255fd6be8b3e0ca01e425586a554544fcb70b0ec7c","pkg-src-sha256":"69ea6eca1f0c00b6e1e1f8329c908ec76e73855e2ce6e91ace2f8bbf92c51a30","depends":["base-4.15.1.0","containers-0.6.4.1","ghc-prim-0.7.0","template-haskell-2.17.0.0"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"these-1.2-83aac5b8069a9434a8b0a3f351ec3b59a93ed7f6bd918c4fd8d6397093e1dcbe","pkg-name":"these","pkg-version":"1.2","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"011e22f6891ca028f87c04ea48796696c92d593313a9c699f7ff4f9ffd7aec6e","pkg-src-sha256":"a8ed7174b7f790764360f48aab72fea382a6093ed369c7bc6881fae1abacd4b8","depends":["assoc-1.1-291e4da8de4fa5233c4ee898f3290d30d2c9086246a2fd717ca2d7777388f8a0","base-4.15.1.0","binary-0.8.8.0","deepseq-1.4.5.0","foldable1-classes-compat-0.1-9727b720f84b4552fb4b0426ae090b5ba56186eb9372908f54672e4859d04ce8","hashable-1.4.3.0-06c87f08d157cd2e4602331db0bf88a5223fec984aaf36ea457ff5576235591e"],"exe-depends":[],"component-name":"lib"},{"type":"pre-existing","id":"transformers-0.5.6.2","pkg-name":"transformers","pkg-version":"0.5.6.2","depends":["base-4.15.1.0"]},{"type":"configured","id":"transformers-base-0.4.6-dbfc68cc392d2f23cb47ae5dffab601bc00fe83b3019fb890d4be9cd572ff5c6","pkg-name":"transformers-base","pkg-version":"0.4.6","flags":{"orphaninstances":true},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"6f18f320e371c8954c4b6b211e2fdd5d15a6d6310bd605b9d640f47ede408961","pkg-src-sha256":"323bf8689eb691b122661cffa41a25e00fea7a768433fe2dde35d3da7d32cf90","depends":["base-4.15.1.0","base-orphans-0.9.1-e7c498b91907486062657e2fd48ae43534741b542178f8e5543fa08373246927","stm-2.5.0.0","transformers-0.5.6.2","transformers-compat-0.7.2-8e89728e0d3ab08b3fb2aa30ec65bd77196cc3e58cebad142f7ee92c9049acec"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"transformers-compat-0.7.2-8e89728e0d3ab08b3fb2aa30ec65bd77196cc3e58cebad142f7ee92c9049acec","pkg-name":"transformers-compat","pkg-version":"0.7.2","flags":{"five":false,"five-three":true,"four":false,"generic-deriving":true,"mtl":true,"three":false,"two":false},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"044fb9955f63ee138fcebedfdcbe54afe741f2d5892a2d0bdf3a8052bd342643","pkg-src-sha256":"b62c7304c9f3cbc9463d0739aa85cb9489f217ea092b9d625d417514fbcc9d6a","depends":["base-4.15.1.0","ghc-prim-0.7.0","transformers-0.5.6.2"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"unordered-containers-0.2.19.1-d071dc068e82d1ae808aabde21111160b51736add520497b5e0e55a71c27f8a1","pkg-name":"unordered-containers","pkg-version":"0.2.19.1","flags":{"debug":false},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"1c28ca429e3960de0330908579a427ccacddd700cb84ec1969e2bbe576152add","pkg-src-sha256":"1b27bec5e0d522b27a6029ebf4c4a6d40acbc083c787008e32fb55c4b1d128d2","depends":["base-4.15.1.0","deepseq-1.4.5.0","hashable-1.4.3.0-06c87f08d157cd2e4602331db0bf88a5223fec984aaf36ea457ff5576235591e","template-haskell-2.17.0.0"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"vector-0.13.1.0-9dc79d52ae3be5ca1d495042fae0f1868a77e812bd5c3e5b0d4167ed21689e2f","pkg-name":"vector","pkg-version":"0.13.1.0","flags":{"boundschecks":true,"internalchecks":false,"unsafechecks":false,"wall":false},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"4650d28eb918812a3158130f833b5ff5020259b28a8f9ee5d28701ce60cf8a16","pkg-src-sha256":"63f272279eab8ab9411a0fffb1252ac309b297313f8e33be9ebbc2f981edecee","depends":["base-4.15.1.0","deepseq-1.4.5.0","primitive-0.9.0.0-398b66b413c3a0f6e8e0d25eee2ea42b3a72bec7a11eddcc162d11615bc340bd","vector-stream-0.1.0.0-e9255fc495dd08f4c37568cbb86089825e2b55d19c84b761ffb01036490dd871"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"vector-stream-0.1.0.0-e9255fc495dd08f4c37568cbb86089825e2b55d19c84b761ffb01036490dd871","pkg-name":"vector-stream","pkg-version":"0.1.0.0","flags":{},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"8977959d4bec54d9f2c5e9d4baa2cac7ab26e804a72591df8db887e0692ae8ae","pkg-src-sha256":"a888210f6467f155090653734be5cc920406a07227e0d3adb59096716fdb806c","depends":["base-4.15.1.0","ghc-prim-0.7.0"],"exe-depends":[],"component-name":"lib"},{"type":"configured","id":"void-0.7.3-c86d27aab6814888e289a33d79f76ea2155e1ca64ada66f5c91f2adbc566e33e","pkg-name":"void","pkg-version":"0.7.3","flags":{"safe":false},"style":"global","pkg-src":{"type":"repo-tar","repo":{"type":"secure-repo","uri":"http://hackage.haskell.org/"}},"pkg-cabal-sha256":"13d30f62fcdf065e595d679d4ac8b4b0c1bb1a1b73db7b5b5a8f857cb5c8a546","pkg-src-sha256":"53af758ddc37dc63981671e503438d02c6f64a2d8744e9bec557a894431f7317","depends":["base-4.15.1.0"],"exe-depends":[],"component-name":"lib"}]}
+ dist-newstyle/cache/solver-plan view

binary file changed (absent → 511530 bytes)

+ dist-newstyle/cache/source-hashes view

binary file changed (absent → 28676 bytes)

+ dist-newstyle/cache/up-to-date view

binary file changed (absent → 4317 bytes)

+ dist-newstyle/packagedb/ghc-9.0.2/package.cache view

binary file changed (absent → 40 bytes)

+ dist-newstyle/packagedb/ghc-9.0.2/package.cache.lock view
+ src/Classh.hs view
@@ -0,0 +1,1703 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE MultiParamTypeClasses #-}++module Classh where++import Language.Haskell.TH+import Control.Monad (forM_)+import Control.Lens (makeLenses, Lens',lens, ASetter, over)+import Data.Default+import qualified Data.Text as T++{-+GOALS+-> Cut down the surface area of what is needed from CSS+-> Make an easy to integrate system through this limited CSS+-> Eliminate messing with typos and repeats+-> Encourage non-naive responsive code+-> Have more organized code for when an attribute is highly responsive+   Non eg. "py-2 ......... sm:py-4 ............... lg:pt-9"+-> Helper functions with a definite limited scope for the goal of self-documenting / easy to visualize DomBuilders++-}+++-- | A future research item for this library is how to work with accessibility+  -- do we need prerender ?+  -- is this gonna be reading in some config?+  -- is this a native thing?+  -- aria?+  -- will this mean scaling from same base accessibility based value?+  -- what features does this affect directly? indirectly?+++++---- MOVE to reflex-dom-classh  ----------------------------------------------------------------------------------+++++-- intercalate :: DomBuilder t m => WhenTW TextSize -> T.Text -> [m ()] -> m ()+-- intercalate size inter (t:ts) = do+--   t >> prependAll size inter ts+--   where+--     prependAll _ _ [] = pure () +--     prependAll s i (t:ts) = elClass "span" (renderWhenTW s showTW ) (text i) >> t >> prependAll s i ts++-- -- | Works by setting top padding by one consistent value. Does not add padding for first element+-- paragraphs :: DomBuilder t m => WhenTW TWSize -> [m ()] -> m () +-- paragraphs spacing (r:rows) = do+--   row [] $ r+--   withTopPadding spacing rows+--   where+--     withTopPadding _ [] = pure ()+--     withTopPadding p (r:rs) = row [t .~ p] r >> withTopPadding p rs ++-- -- | Works by setting top padding variably+-- paragraphs' :: DomBuilder t m => [(WhenTW TWSize, m ())] -> m () +-- paragraphs' ((s,r):rows) = row [t .~ s] r >> paragraphs' rows++-- rows :: DomBuilder t m => [(WhenTW TWSize, m ())] -> m () +-- rows = paragraphs' ++-- -- | TODO: should we have a variant which controls for padding needs when being a full row? What should that look like? Do we even need that??+-- responsiveRowCol :: DomBuilder t m => [Int] -> m a -> m a+-- responsiveRowCol colSpans m =+--   let spandex = renderWhenTW (zipScreens colSpans) ((<>) "col-span-" . tshow) +--   in elClass "div" spandex m+           +++-- elTW :: DomBuilder t m => T.Text -> BoxConfig -> m a -> m a+-- elTW tag cfg m = elClass tag (defaultClasses <> " " <> showTW cfg) m++-- elTW' :: DomBuilder t m => T.Text -> BoxConfig -> m a -> m (Element EventResult (DomBuilderSpace m) t, a)+-- elTW' tag cfg m = elClass' tag (defaultClasses <> " " <> showTW cfg) m++-- elDynTW :: (PostBuild t m, DomBuilder t m) => T.Text -> Dynamic t BoxConfig -> m a -> m a+-- elDynTW tag cfgDyn m = elDynClass tag ( (\cfg -> defaultClasses <> " " <> showTW cfg) <$> cfgDyn ) m++-- elDynTW' :: (PostBuild t m, DomBuilder t m) => T.Text -> Dynamic t BoxConfig -> m a -> m (Element EventResult (DomBuilderSpace m) t, a)+-- elDynTW' tag cfgDyn m = elDynClass' tag ( (\cfg -> defaultClasses <> " " <> showTW cfg) <$> cfgDyn ) m++++-- -- | TODO: variants which do not get checked/compiled+-- textS :: DomBuilder t m => CompiledS -> T.Text -> m ()+-- textS s txt = elClass "span" s $ text txt++-- textDynS :: (PostBuild t m, DomBuilder t m) => Dynamic t CompiledS -> T.Text -> m ()+-- textDynS s txt = elDynClass "span" s $ text txt++-- dynTextS :: (PostBuild t m, DomBuilder t m) => CompiledS -> Dynamic t T.Text -> m ()+-- dynTextS s txt = elClass "span" s $ dynText txt++-- dynTextDynS :: (PostBuild t m, DomBuilder t m) => Dynamic t CompiledS -> Dynamic t T.Text -> m ()+-- dynTextDynS s txt = elDynClass "span" s $ dynText txt++-- -- | Purposefully designed to take no other data besides ColInt in order to be very self-contained+-- gridCol :: DomBuilder t m => ColInt -> m a -> m a+-- gridCol cInt ma = elClass "div" ("grid grid-cols-" <> showTW cInt) ma++-- data RowDivisor = RD1 | RD2 | RD3 | RD4 | RD6 | RD12  ++-- -- | TODO: this should have the ability to add rows somehow+-- -- | and how we can think of this is that if we start at a large->Col12 and scale down to+-- -- | lets say a 'sm' then Col12 / n where n is from config. So lets say n=2 then sm->Col6 which will show up as+-- -- | 2 rows of 6; similarly n=6 => 6 rows of 2 ; n=12 -> 12 rows of 1; n=3 => 3 rows of 4 ; n=4 => 4 rows of 3  +-- gridColWhen :: DomBuilder t m => WhenTW ColInt -> m a -> m a+-- gridColWhen cInts ma = elClass "div" (showCInts cInts) ma +--   where+--     showCInts [] = ""+--     showCInts (("def",cInt):cInts) = "grid grid-cols-" <> showTW cInt <&> showCInts cInts +--     showCInts ((w,cInt):cInts) = w <> ":" <> "grid" <&> w <> ":" <> "grid-cols-" <> showTW cInt+--                                  <&> showCInts cInts ++-- -- | Denotes a normal row. Does not have inline-block +-- -- row :: DomBuilder t m => BoxPadding -> m a -> m a +-- -- row padding = elClass "div" ( "" <&> showTW padding )++-- gridColW :: DomBuilder t m => ColInt -> TWSizeOrFraction -> m a -> m a+-- gridColW cInt width ma = elClass "div" ("grid grid-cols-" <> showTW cInt <&> ("w-" <> showTW width)) ma++++-- row :: DomBuilder t m => [BoxPadding -> BoxPadding] -> m a -> m a +-- row paddingF = elClass "div" ( "" <&> showTW (applyFs def paddingF) )+++++++++++---- MOVE to reflex-dom-classh  ----------------------------------------------------------------------------------++--instance ShowTW (WhenTW a)++-- | TODO:+  -- use template haskell to autogenerate types from a CSS file eg if classes blah and blah2 exist+  -- data UserCSS = Blah | Blah2 + +++-- | Not real: just ideating+-- | How can we model a discrete set of consistent brand options?+--+-- data Mytextsize = Heading | Subtext | Normal+-- domain = Map.fromList [ (Heading , XL7) , (Normal , XL3) , (Subtext , XS) ]+--+-- brandF :: k -> WhenTW k+-- brandF (domainType :: Ord k => k) =+--   let baseSize = fromJust $ Map.lookup domainType (domain :: Map (k :: Ord k => k) (v :: ShowTW x => x))+--   in+--     autoScale baseSize +--+-- then this above code suggests that we should think of our domain as mobile first +-- it is important to remember this is not meant to represent 100% of CSS but rather ~80%+-- and should be a way to communicate branding concisely such that a stoopid cud impl. it to be+-- consistent +--+-- Now, it wont always be super complex: for example, color+--+-- def = TW.def & text_color .~ only aceBlue+--+-- But then again, a brand may have multiple colors+--+-- brandColors = Map.fromList [ (AceBlue, hex _), (AceNavyBlue, hex _), (AceBabyBlue, hex _) ]+-- and also:+       -- What about dark mode? \+       --+-- and note: lets say 90% of titles should have Bold as their weight, we can set this and +++++-------------------thought bubble ----------------------------------------------------------+++-- module MyTWConfig where++-- def = TW.def & text_color .~ only aceBlue++-- then++-- module MyModule++-- import MyTWConfig+-- f = elTW def blank++-- ---++-- we could also have a defDerivative which functions just like V1 tailwindlib like so:+--   BoxConfig def:[]++--   where def here should be ("def", def)++--   and note we can make TWstring which could have an instance of IsString so that it can be written as a string literal++--   which helps cuz then TWString can have a default of "def"+++-- Also for conceptual understanding:++--   fmap (,X) (enum screenSizes)  == ("def", X)+--   fmap (,X) (enum allConditions) == ("def", X)+--   fmap (,X) (enum allEvents) : ("def",X) : [] == ("def", X)+--   fmap (,def) (enum allEvents) == []+++------------------------------------------------------------------------------------------------------+-- TODO:++-- CSS and Tailwind semigroups for folding into one CSSConfig OR TailwindClassConfig+-- where both render to a string++  -- Each config is only allowed to be set once -> alerting the dev if they asked for something like "red" and "blue"+  -- for the background color or similar illogical configurations++  -- Would be extra ideal to have this made clear at compile time+++-- def+--   & leftPadding .~ 3+--   & styling .~ (def+--                 &  bg_color .~ Color_Custom (Hex "")+--                )+++-- data BoxConfig = BoxConfig+--   { leftPadding :: T.Text+--   , bottomPadding :: T.Text+--   }++++-- | Idea: elDynTW where we can update using the TW lib based on events and prev state++-- | Idea: for align and justify -> we have them as one setting of the datatype Position = TR -- TopRight | BL -- Bottom Left++-- | THIS DOESNT WORK: Grid causes other issues/effects - maybe we can negate this through defaults (eg. two styled texts begin to stack+-- | instead of go beside each other+++++++++++++++++tshow :: Show a => a -> T.Text+tshow = T.pack . show++++++++-- HELPFUL CONSTANTS+centeredOnly = only centered+centered = (J_Center, A_Center)++--------------------++defaultClasses = "" -- "grid"+++++-- buttonC :: Map.Map T.Text T.Text -> m a -> m (Event t a)+-- buttonC attrs inner = do+--   (e,x) <- elAttr' "button" attrs inner+--   pure $ x <$ domEvent Click e+++-- | TODO: styledParagraphs :: [( BottomPadding, [(tw,T.Text)])] -> m ()+-- then apply to bannerFor in Landing.*++++applyFs :: a -> [a -> a] -> a +applyFs b fs = foldl (\acc f -> f acc) b fs++type CompiledS = T.Text+-- newtype CompiledS a = CompiledS T.Text+-- newtype CompiledS = CompiledS T.Text+-- type CompiledS a = T.Text+-- rowC :: DomBuilder t m => CompiledS BoxPadding -> m a -> m a +-- rowC padding = elClass "div" ( "" <&> padding )+++------ Helpers+infixr 0 <&>+(<&>) :: T.Text -> T.Text -> T.Text+a <&> b+  | a == "" = b+  | b == "" = a+  | otherwise = a <> " " <> b++++sizes = ["def", "sm", "md", "lg", "xl", "2xl"]++zipScreens :: [a] -> WhenTW a+zipScreens xs = zip sizes xs ++zipScreensWith :: (a -> b) -> [a] -> WhenTW b+zipScreensWith f xs = zip sizes (f <$> xs)++-- (:.) :: a -> [a]+-- (:.) a = [a]+++-- | it would be awesome to have a map like function that could be used like config for text size+-- | mappy = Map.fromList [(Heading, _), (Maintext, _) ... ]+-- |+-- | and effectively this is a model of the branding which will allow for consistency+  -- | AND!!! because the new model, models responsive design we can make scaling and brand design expressable as a Map ++autoScalePx :: Int -> WhenTW TWSize+autoScalePx pixels =+  [ ("def", scalePx pixels 1.0)+  , ("sm", scalePx pixels smFactor)+  , ("md", scalePx pixels mdFactor)+  , ("lg", scalePx pixels lgFactor)+  , ("xl", scalePx pixels xlFactor)+  , ("2xl", scalePx pixels s_2xlFactor)+  ]+  where+    mobileEstimatedWidth_px = 390+    -- Screen sizes per: https://tailwindcss.com/docs/responsive-design+    smFactor = 640 / mobileEstimatedWidth_px+    mdFactor = 768 / mobileEstimatedWidth_px+    lgFactor = 1024 / mobileEstimatedWidth_px+    xlFactor = 1280 / mobileEstimatedWidth_px+    s_2xlFactor = 1536 / mobileEstimatedWidth_px+    scalePx :: Int -> Float -> TWSize+    scalePx p factor = pix . round $ fromIntegral p * factor+++-- | autoScalePx = autoScalePx' 1.0 +autoScalePx' :: Float -> Int -> WhenTW TWSize+autoScalePx' userOpt pixels =+  [ ("def", scalePx pixels 1.0)+  , ("sm", scalePx pixels smFactor)+  , ("md", scalePx pixels mdFactor)+  , ("lg", scalePx pixels lgFactor)+  , ("xl", scalePx pixels xlFactor)+  , ("2xl", scalePx pixels s_2xlFactor)+  ]+  where+    mobileEstimatedWidth_px = 390+    -- Screen sizes per: https://tailwindcss.com/docs/responsive-design+    smFactor = userOpt * 640 / mobileEstimatedWidth_px+    mdFactor = userOpt * 768 / mobileEstimatedWidth_px+    lgFactor = userOpt * 1024 / mobileEstimatedWidth_px+    xlFactor = userOpt * 1280 / mobileEstimatedWidth_px+    s_2xlFactor = userOpt * 1536 / mobileEstimatedWidth_px+    scalePx :: Int -> Float -> TWSize+    scalePx p factor = pix . round $ fromIntegral p * factor++++--  GOAL:+-- autoScalePx :: Int -> WhenTW TWSize+-- autoScalePx px =+--   [ (S_Mobl, px)+--   , (S_SM, scalePx px smFactor)+--   , (S_MD, scalePx px mdFactor)+--   , (S_LG, scalePx px lgFactor)+--   , (S_XL, scalePx px 1.4)+--   , (S_2XL, scalePx px 1.5)+--   ]+--   where+--     mobileEstimatedWidth_px = 390+--     -- Screen sizes per: https://tailwindcss.com/docs/responsive-design+--     smFactor = 640 / mobileEstimatedWidth_px+--     mdFactor = 768 / mobileEstimatedWidth_px+--     lgFactor = 1024 / mobileEstimatedWidth_px+--     xlFactor = 1280 / mobileEstimatedWidth_px+--     s_2xlFactor = 1536 / mobileEstimatedWidth_px+--+--     scalePx :: Int -> Float -> Int+--     scalePx p factor = round $ fromIntegral p * factor++-- autoScale :: TWSize -> WhenTW TWSize+-- autoScale mobile = [(S_Mobl, x), (S_SM, scaleSize x 1.1), (S_MD, scaleSize x 1.2), (S_LG, scaleSize x 1.3), (S_XL, scaleSize x 1.4), (S_2XL, scaleSize x 1.5)]+--   where+--     scaleSize :: TWSize -> Float -> TWSize+--     scaleSize (TWSize_Custom (Pixel p)) factor = TWSize_Custom (Pixel (round $ fromIntegral p * factor))+--     scaleSize (TWSize n) factor = TWSize (n * factor)+--     -- Add more cases for other CSSSize constructors if needed+--     scaleSize size _ = size  -- Fallback for non-scalable sizes or units+++only :: a -> WhenTW a+only p = ("def", p):[]++onlyDef :: (Default a, ShowTW a) => WhenTW a+onlyDef = ("def", def):[]++infixr 4 .~++(.~+) :: ASetter s t [a] [a] -> [a] -> s -> t+lens .~+ newVals = over lens (++ newVals)+++--infixr 4 .~++(.+) :: ASetter s t [a] [a] -> [a] -> s -> t+(.+) = (.~+)++renderWhenTW :: WhenTW a -> (a -> T.Text) -> T.Text+renderWhenTW tws construct = foldr (<&>) mempty $+  fmap (\(c,p) -> (if c == "def" then "" else (c <> ":")) <> construct p) $ tws++compileWhenTW :: WhenTW a -> (a -> T.Text) -> Either T.Text T.Text+compileWhenTW tws construct = case f $ fmap fst tws of+  Right () -> Right $ renderWhenTW tws construct+  Left e -> Left e+  where+    f [] = Right ()+    f (s:ss) =+      if elem s ss+      then Left $ s <> " exists twice"+      else f ss+++-- | Checkers on the lib user's input to ensure no *unintended repetition+joinUnique :: WhenTW a -> WhenTW a -> WhenTW a+joinUnique = undefined++addUnique :: (TWCondition, a) -> WhenTW a -> WhenTW a+addUnique = undefined++-- checkStyle ::  -> Q Exp+-- checkStyle styleString =+--   let+--     xs = T.split styleString+--     f [] = False+--     f (s:ss) = elem s ss || f ss+--   in+--     if not $ f xs+--     then [| styleString |]+--     else fail+---------------++classh :: CompileStyle s => s -> [(s -> s)] -> Q Exp +classh base muts = case compileS $ foldl (\acc f -> f acc) base muts of+  Left e -> fail $ T.unpack e+  Right styleString -> [| styleString |]++classh' :: (Default s, CompileStyle s) => [(s -> s)] -> Q Exp +classh' muts = case compileS $ foldl (\acc f -> f acc) def muts of+  Left e -> fail $ T.unpack e+  Right styleString -> [| styleString |]++classhUnsafe :: (Default a, ShowTW a) => [a -> a] -> T.Text+classhUnsafe muts = showTW $ def `applyFs` muts+++instance CompileStyle BoxConfig where+  compileS cfg = do+    pure . foldr (<&>) mempty =<< sequenceA+      [ compilePos (_position cfg)+      , compileWhenTW (_colStart cfg) ((<>) "col-start-" . tshow)      +      , compileWhenTW (_colSpan cfg) ((<>) "col-span-" . tshow)    +      , compileBorder (_border cfg)+      , compileSizingBand (_sizingBand cfg)+      , compilePadding (_padding cfg)+      , compileMargin (_margin cfg)+      , compileWhenTW (_bgColor cfg) ((<>) "bg-" . showTW)+      , compileWhenTW (_bgOpacity cfg) ((<>) "bg-opacity-" . tshow)+      , Right $ _box_custom cfg+      ]+      where+        compileBorder cfg = pure . foldr (<&>) mempty =<< sequenceA+          [ compileWhenTW (_bStyle cfg) ((<>) "border-" . showTW)+          , compileBorderRadius (_radius cfg)+          , compileBorderWidth (_bWidth cfg)+          , compileBorderColor (_bColor cfg)+          ]++        compileBorderRadius cfg = pure . foldr (<&>) mempty =<< sequenceA+          [ compileWhenTW (_borderRadius_tr cfg) ((<>) "rounded-tr" . showTW)+          , compileWhenTW (_borderRadius_tl cfg) ((<>) "rounded-tl" . showTW)+          , compileWhenTW (_borderRadius_br cfg) ((<>) "rounded-br" . showTW)+          , compileWhenTW (_borderRadius_bl cfg) ((<>) "rounded-bl" . showTW)+          ]++        compileBorderWidth cfg = pure . foldr (<&>) mempty =<< sequenceA+          [ compileWhenTW (_borderWidth_l cfg) ((<>) "border-l" . showTW)+          , compileWhenTW (_borderWidth_r cfg) ((<>) "border-r" . showTW)+          , compileWhenTW (_borderWidth_t cfg) ((<>) "border-t" . showTW)+          , compileWhenTW (_borderWidth_b cfg) ((<>) "border-b" . showTW)+          ]++        compileBorderColor cfg = pure . foldr (<&>) mempty =<< sequenceA+          [ compileWhenTW (_borderColor_l cfg) ((<>) "border-l-" . showTW)+          , compileWhenTW (_borderColor_r cfg) ((<>) "border-r-" . showTW)+          , compileWhenTW (_borderColor_t cfg) ((<>) "border-t-" . showTW)+          , compileWhenTW (_borderColor_b cfg) ((<>) "border-b-" . showTW)+          ]++        compileSizingBand cfg = pure . foldr (<&>) mempty =<< sequenceA+          [ compileWhenTW (_widthC . _maxSize $ cfg) ((<>) "max-w-" . showTW)+          , compileWhenTW (_heightC . _maxSize $ cfg) ((<>) "max-h-" . showTW)+          , compileWhenTW (_widthC . _minSize $ cfg) ((<>) "min-w-" . showTW)+          , compileWhenTW (_heightC . _minSize $ cfg) ((<>) "min-h-" . showTW)+          , compileWhenTW (_width . _size $ cfg) ((<>) "w-" . showTW)+          , compileWhenTW (_height . _size $ cfg) ((<>) "h-" . showTW)+          ]+++        compileMargin cfg = pure . foldr (<&>) mempty =<< sequenceA+          [ compileWhenTW (_marginL cfg) ((<>) "ml-" . showTW)+          , compileWhenTW (_marginR cfg) ((<>) "mr-" . showTW)+          , compileWhenTW (_marginT cfg) ((<>) "mt-" . showTW)+          , compileWhenTW (_marginB cfg) ((<>) "mb-" . showTW)+          ]++        compilePos posCfg = case f $ fmap fst posCfg of+          Left e -> Left e+          Right () -> Right $ foldr (<&>) mempty $ fmap+            (\(c,(jus,align)) ->+               let pre = if c == "def" then "" else (c <> ":")+               in+                 pre <> "grid" <&> pre <> (showTW jus) <&> pre <> (showTW align)+            ) $ posCfg+          where+            f [] = Right ()+            f (s:ss) =+              if elem s ss+              then Left $ s <> " exists twice"+              else f ss++-- | For row func+instance CompileStyle BoxPadding where+  compileS = compilePadding++compilePadding :: BoxPadding -> Either T.Text T.Text+compilePadding cfg = pure . foldr (<&>) mempty =<< sequenceA+  [ compileWhenTW (_paddingL cfg) ((<>) "pl-" . showTW)+  , compileWhenTW (_paddingR cfg) ((<>) "pr-" . showTW)+  , compileWhenTW (_paddingT cfg) ((<>) "pt-" . showTW)+  , compileWhenTW (_paddingB cfg) ((<>) "pb-" . showTW)+  ]+          +          ++instance CompileStyle TextConfigTW where+  compileS cfg = pure . foldr (<&>) mempty =<< sequenceA+    [ compileWhenTW (_text_size cfg) showTW+    , compileWhenTW (_text_weight cfg) showTW+    , compileWhenTW (_text_font cfg) showTW+    , compileWhenTW (_text_color cfg) ((<>) "text-" . showTW)+    , compileDecoration (_text_decoration cfg)+    , Right $ _text_custom cfg+    ]+    where+      compileDecoration cfg = pure . foldr (<&>) mempty =<< sequenceA+        [ compileWhenTW (_textDec_line cfg) showTW+        , compileWhenTW (_textDec_color cfg) ((<>) "decoration-" . showTW)+        , compileWhenTW (_textDec_style cfg) showTW+        , compileWhenTW (_textDec_thickness cfg) showTW+        , compileWhenTW (_textDec_offset cfg) showTW+        ]+++++++class HasCSSSize tw where+  pix :: Int -> tw --Lens' tw Int +  pct :: Int -> tw +  vh :: Int -> tw+  vw :: Int -> tw+  rem :: Float -> tw++instance HasCSSSize TWSize where+  pix = TWSize_Custom . Pixel+  pct = TWSize_Custom . Percent+  vh = TWSize_Custom . Vh+  vw = TWSize_Custom . Vw+  rem = TWSize_Custom . Rem++instance HasCSSSize TWSizeOrFraction where+  pix = TWSize' . TWSize_Custom . Pixel --px+  pct = TWSize' . TWSize_Custom . Percent --pct+  vh = TWSize' . TWSize_Custom . Vh --vh+  vw = TWSize' . TWSize_Custom . Vw--vw+  rem = TWSize' . TWSize_Custom . Rem -- Classh.rem+  +class HasCustom tw where+  custom :: Lens' tw T.Text ++class CompileStyle tw where+  compileS :: tw -> Either T.Text T.Text+++class IsCSS css where+  renderCSS :: css -> T.Text++class ShowTW tw where+  showTW :: tw -> T.Text++class SetSides tw a where+  x :: Lens' tw (WhenTW a)+  y :: Lens' tw (WhenTW a)+  xy :: Lens' tw (WhenTW a)+  allS :: Lens' tw (WhenTW a)+  allS = xy+  l :: Lens' tw (WhenTW a)+  r :: Lens' tw (WhenTW a)+  b :: Lens' tw (WhenTW a)+  t :: Lens' tw (WhenTW a)++type TWCondition = T.Text+type WhenTW a = [(TWCondition, a)]++data BoxConfig = BoxConfig+  { _colStart :: WhenTW Int+  , _colSpan :: WhenTW Int+  , _bgColor :: WhenTW Color+  , _bgOpacity :: WhenTW Int -- 1 5 10 .. 100 -- def == 519+  , _padding :: BoxPadding+  , _margin :: BoxMargin+  , _sizingBand :: BoxSizingBand+  , _border :: BorderConfig -- { rounded, thickness, etc .. }+  , _position :: WhenTW (Justify, Align)+  --, _text_align :: Align ... or should we set == position.align+  , _box_custom :: T.Text+  }+  deriving Show++data BoxPadding = BoxPadding+  { _paddingL :: WhenTW TWSize+  , _paddingR :: WhenTW TWSize+  , _paddingT :: WhenTW TWSize+  , _paddingB :: WhenTW TWSize+  } deriving Show++-- TODO: lenses for y,x and all+data BoxMargin = BoxMargin+  { _marginL :: WhenTW TWSize+  , _marginR :: WhenTW TWSize+  , _marginT :: WhenTW TWSize+  , _marginB :: WhenTW TWSize+  } deriving Show++data BoxSizingBand = BoxSizingBand+  { _maxSize :: BoxSizingConstraint --(DimensionConstraint, DimensionConstraint)+  , _minSize :: BoxSizingConstraint -- (DimensionConstraint, DimensionConstraint)+  , _size :: BoxSizing+  }+  deriving Show++data BoxSizing = BoxSizing+  { _width :: WhenTW TWSizeOrFraction+  , _height :: WhenTW TWSizeOrFraction+  }+  deriving Show++data BoxSizingConstraint = BoxSizingConstraint+  { _widthC :: WhenTW DimensionConstraint+  , _heightC :: WhenTW DimensionConstraint+  }+  deriving Show++data BorderConfig = BorderConfig+  { _bStyle :: WhenTW BorderStyle+  , _bColor :: BorderColorSides+  , _bWidth :: BorderWidthSides+  , _radius :: BorderRadiusCorners+  } deriving Show++data BorderColorSides = BorderColorSides+  { _borderColor_l :: WhenTW Color+  , _borderColor_r :: WhenTW Color+  , _borderColor_t :: WhenTW Color+  , _borderColor_b :: WhenTW Color+  } deriving Show++data BorderRadiusCorners = BorderRadiusCorners+  { _borderRadius_tr :: WhenTW BorderRadius'+  , _borderRadius_tl :: WhenTW BorderRadius'+  , _borderRadius_br :: WhenTW BorderRadius'+  , _borderRadius_bl :: WhenTW BorderRadius'+  } deriving Show++data BorderWidthSides = BorderWidthSides+  { _borderWidth_l :: WhenTW BorderWidth+  , _borderWidth_r :: WhenTW BorderWidth+  , _borderWidth_t :: WhenTW BorderWidth+  , _borderWidth_b :: WhenTW BorderWidth+  } deriving Show++data TextConfigTW = TextConfigTW+  { _text_size :: WhenTW TextSize+  , _text_weight :: WhenTW TextWeight+  , _text_font :: WhenTW Font -- many options -- EG. Sarabun -> font-[Sarabun]+  , _text_color :: WhenTW Color+  , _text_decoration :: TextDecorationTW+  , _text_custom :: T.Text+  }++data TextDecorationTW = TextDecorationTW+  { _textDec_line :: WhenTW TextDecLineType+  , _textDec_color :: WhenTW Color+  , _textDec_style :: WhenTW TextDecStyle+  , _textDec_thickness :: WhenTW TextDecThickness -- TODO: is this a standard system: Thickness?+  , _textDec_offset :: WhenTW TextDecOffset -- and is this a system? (the numbers chosen 0,1,2,4,8)+  }+++------------  Defaults of Records++instance Default BoxConfig where+  def = BoxConfig def def def def def def def def def ""++instance Default BoxPadding where+  def = BoxPadding def def def def -- (TWSize 0) (TWSize 0) (TWSize 0) (TWSize 0)++instance Default BoxMargin where+  def = BoxMargin def def def def -- (TWSize 0) (TWSize 0) (TWSize 0) (TWSize 0)++instance Default TextConfigTW where+  def = TextConfigTW def def def def def ""++instance Default TextDecorationTW where+  def = TextDecorationTW def def def def def++instance Default BorderConfig where+  def = BorderConfig def def def def++instance Default BorderRadiusCorners where+  def = BorderRadiusCorners def def def def++instance Default BorderWidthSides where+  def = BorderWidthSides def def def def++instance Default BorderColorSides where+  def = BorderColorSides def def def def++instance Default BoxSizing where+  def = BoxSizing def def -- TWSize_Auto TWSize_Auto++instance Default BoxSizingBand where+  def = BoxSizingBand def def def++instance Default BoxSizingConstraint where+  def = BoxSizingConstraint def def -- DC_none DC_none++------------  END: Defaults of Records++------------  ShowTW of Records++--compileS+++instance ShowTW TextConfigTW where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_text_size cfg) showTW+    , renderWhenTW (_text_weight cfg) showTW+    , renderWhenTW (_text_font cfg) showTW+    , renderWhenTW (_text_color cfg) ((<>) "text-" . showTW)+    , showTW (_text_decoration cfg)+--    , "align-left"+    --, "text-" <> showTW align+    , _text_custom cfg+    ]+++++instance ShowTW TextDecorationTW where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_textDec_line cfg) showTW+    , renderWhenTW (_textDec_color cfg) ((<>) "decoration-" . showTW)+    , renderWhenTW (_textDec_style cfg) showTW+    , renderWhenTW (_textDec_thickness cfg) showTW+    , renderWhenTW (_textDec_offset cfg) showTW+    ]++instance ShowTW BoxConfig where+  showTW cfg = foldr (<&>) mempty+   [ renderWhenTW (_colStart cfg) ((<>) "col-start-" . tshow)+   , renderWhenTW (_colSpan cfg) ((<>) "col-span-" . tshow)+   , renderWhenTW (_bgColor cfg) ((<>) "bg-" . showTW)+   , renderWhenTW (_bgOpacity cfg) ((<>) "bg-opacity-" . tshow)                              +   , showTW . _border $ cfg+   , showTW . _sizingBand $ cfg+   , showTW . _padding $ cfg+   , showTW . _margin $ cfg+   , foldr (<&>) mempty $ fmap+     (\(c,(jus,align)) ->+        let pre = if c == "def" then "" else (c <> ":")+        in pre <> "grid" <&> pre <> (showTW jus) <&> pre <> (showTW align)+     ) $ _position cfg +   , renderWhenTW (_position cfg) $ \(j,a) -> "grid " <> showTW j <> " " <> showTW a+   , _box_custom cfg+   ]++instance ShowTW BorderConfig where+  showTW cfg = foldr (<&>) mempty+    [ showTW . _radius $ cfg+    , showTW . _bWidth $ cfg+    , showTW . _bColor $ cfg+    , renderWhenTW (_bStyle cfg) ((<>) "border-" . showTW)+    ]++instance ShowTW BoxSizing where+  showTW cfg = foldr (<&>) mempty+  --showTW (BoxSizing w h) = T.intercalate " " $+    [ renderWhenTW (_width cfg) ((<>) "w-" . showTW)+    , renderWhenTW (_height cfg) ((<>) "h-" . showTW)+    ]++instance ShowTW BoxSizingBand where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_widthC . _maxSize $ cfg) ((<>) "max-w-" . showTW)+    , renderWhenTW (_heightC . _maxSize $ cfg) ((<>) "max-h-" . showTW)+    , renderWhenTW (_widthC . _minSize $ cfg) ((<>) "min-w-" . showTW)+    , renderWhenTW (_heightC . _minSize $ cfg) ((<>) "min-h-" . showTW)+    , showTW $ _size cfg+    ]++instance ShowTW BoxMargin where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_marginL cfg) ((<>) "ml-" . showTW)+    , renderWhenTW (_marginR cfg) ((<>) "mr-" . showTW)+    , renderWhenTW (_marginT cfg) ((<>) "mt-" . showTW)+    , renderWhenTW (_marginB cfg) ((<>) "mb-" . showTW)+    ]+++instance ShowTW BoxPadding where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_paddingL cfg) ((<>) "pl-" . showTW)+    , renderWhenTW (_paddingR cfg) ((<>) "pr-" . showTW)+    , renderWhenTW (_paddingT cfg) ((<>) "pt-" . showTW)+    , renderWhenTW (_paddingB cfg) ((<>) "pb-" . showTW)+    ]++-- TODO: stop overlaps through conditionals+instance ShowTW BorderRadiusCorners where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_borderRadius_tr cfg) ((<>) "rounded-tr" . showTW)+    , renderWhenTW (_borderRadius_tl cfg) ((<>) "rounded-tl" . showTW)+    , renderWhenTW (_borderRadius_br cfg) ((<>) "rounded-br" . showTW)+    , renderWhenTW (_borderRadius_bl cfg) ((<>) "rounded-bl" . showTW)+    ]++instance ShowTW BorderWidthSides where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_borderWidth_l cfg) ((<>) "border-l-" . showTW)+    , renderWhenTW (_borderWidth_r cfg) ((<>) "border-r-" . showTW)+    , renderWhenTW (_borderWidth_t cfg) ((<>) "border-t-" . showTW)+    , renderWhenTW (_borderWidth_b cfg) ((<>) "border-b-" . showTW)+    ]++instance ShowTW BorderColorSides where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_borderColor_l cfg) ((<>) "border-l-" . showTW)+    , renderWhenTW (_borderColor_r cfg) ((<>) "border-r-" . showTW)+    , renderWhenTW (_borderColor_t cfg) ((<>) "border-t-" . showTW)+    , renderWhenTW (_borderColor_b cfg) ((<>) "border-b-" . showTW)+    ]++------------  END: ShowTW of Records+++------------  Lenses+-- | Lenses will need 2 extensions:+  -- `only`+  -- puts (WhenTW t)++borderRadius_l, borderRadius_r, borderRadius_t, borderRadius_b :: Lens' BorderRadiusCorners (WhenTW BorderRadius')+borderRadius_l = lens undefined $ \tw new -> tw { _borderRadius_tl = new, _borderRadius_bl = new }+borderRadius_r = lens undefined $ \tw new -> tw { _borderRadius_tr = new, _borderRadius_br = new }+borderRadius_t = lens undefined $ \tw new -> tw { _borderRadius_tl = new, _borderRadius_tr = new }+borderRadius_b = lens undefined $ \tw new -> tw { _borderRadius_bl = new, _borderRadius_br = new }+++------------  END: Lenses++    -- the corners override the sides+    -- [ "rounded-l" <> showTW l+    -- , "rounded-r" <> showTW r+    -- , "rounded-t" <> showTW t+    -- , "rounded-b" <> showTW b+    -- ]++data BorderRadius'+  = R_None+  | R_SM+  | R_Normal+  | R_Md+  | R_Lg+  | R_Xl+  | R_2Xl+  | R_3Xl+  | R_Full+  | R_Custom CSSSize+  deriving Show++instance Default BorderRadius' where+  def = R_None++instance ShowTW BorderRadius' where+  showTW = \case+    R_Custom cssSize -> "-[" <> renderCSS cssSize <> "]"+    R_Normal -> ""+    other -> "-" <> (T.toLower . T.drop 2 . tshow $ other)+++data BorderWidth+  = B0+  | B1+  | B2+  | B4+  | B8+  | BW_Custom CSSSize+  deriving Show++instance Default BorderWidth where+  def = B0++instance ShowTW BorderWidth where+  showTW = \case+    B1 -> ""+    BW_Custom cssSize -> "-[" <> renderCSS cssSize <> "]"+    other -> "-" <> (T.drop 1 . tshow $ other)+++data BorderStyle+  = BSolid+  | BDashed+  | BDotted+  | BDouble+  | BHidden+  | BNone+  deriving Show++instance Default BorderStyle where+  def = BSolid++instance ShowTW BorderStyle where+  showTW = T.toLower . T.drop 1 . tshow++-- | TODO: Isolate in own module since only used for gridCol+data ColInt+  = Col1+  | Col2+  | Col3+  | Col4+  | Col5+  | Col6+  | Col7+  | Col8+  | Col9+  | Col10+  | Col11+  | Col12+  deriving Show++instance ShowTW ColInt where+  showTW = T.drop 3 . T.pack . show++instance Default ColInt where+  def = Col1++data Dimension+  = DNum Float+  | DFrac Int DivInt+  | Full+  | Screen+  | Min+  | Max+  | Fit+  | Dim_Custom T.Text+--  | None++-- there's TWSize and then TWSizeOrFraction+data TWSize+  = TWSize Float+  | TWSize_Custom CSSSize+  deriving Show++instance ShowTW TWSize where+  showTW = \case+    TWSize float ->+      if fromIntegral (truncate float) == float+      then tshow $ (truncate float :: Int)+      else tshow float+    TWSize_Custom c -> "[" <> renderCSS c <> "]"++data TWSizeOrFraction+  = TWSize' TWSize+  | TWFraction Int DivInt+  | TWSize_Full+  | TWSize_Screen+  | TWSize_Min+  | TWSize_Max+  | TWSize_Fit+  | TWSize_Auto+  deriving Show++instance ShowTW TWSizeOrFraction where+  showTW = \case+    TWSize' s -> showTW s+    TWFraction n d -> tshow n <> "/" <> showTW d+    class' -> T.toLower . T.drop 7 . tshow $ class'++instance Default TWSizeOrFraction where+  def = TWSize_Auto++data DivInt+  = D2+  | D3+  | D4+  | D5+  | D6+  | D12+  deriving Show++instance ShowTW DivInt where+  showTW = T.drop 1 . tshow++instance Default DivInt where+  def = D12 -- baby++-- | NOTE: although I cant do Start for either, I could create a class like HasStart+-- | Also NOTE: there is no plan to make text align, rather you put it in a span and align it via this mechanism+data Justify+  = J_Start+  | J_End+  | J_Center+  | J_Stretch+  deriving Show++data Align+  = A_Start+  | A_End+  | A_Center+  | A_Baseline+  deriving Show++instance Default Justify where+  def = J_Start+instance Default Align where+  def = A_Start+++instance ShowTW Justify where+  showTW = (<>) "justify-items-" . T.toLower . T.drop 2 . T.pack . show+instance ShowTW Align where+  +  showTW = (<>) "content-" . T.toLower . T.drop 2 . T.pack . show++-- | TODO: this is technically wrong: there are different classes for width vs height but oh well for now+data DimensionConstraint+  = DC_0+  | DC_none+  | DC_xs+  | DC_sm+  | DC_md+  | DC_lg+  | DC_xl+  | DC_2xl+  | DC_3xl+  | DC_4xl+  | DC_5xl+  | DC_6xl+  | DC_7xl+  | DC_full+  | DC_min+  | DC_max+  | DC_fit+  | DC_prose+  | DC_screen_sm+  | DC_screen_md+  | DC_screen_lg+  | DC_screen_xl+  | DC_screen_2xl+  | DC_Custom T.Text+  deriving Show++instance Default DimensionConstraint where+  def = DC_none++instance ShowTW DimensionConstraint where+  showTW = \case+    DC_Custom t -> "[" <> t <> "]"+    x -> T.replace "_" "-" . T.drop 3 . tshow $ x+++++-- DEPRECATED: use SetSides model+-- | TODO: move to SetSides lens model (t,b,r,l) all valid+data BorderRadius+  = None+  | RoundedSM Corner+  | Rounded Corner+  | RoundedMd Corner+  | RoundedLg Corner+  | RoundedXl Corner+  | Rounded2Xl Corner+  | Rounded3Xl Corner+  | RoundedFull Corner+  deriving Show++++data Corner+  = All -- -> ""+  | S+  | E+  | T+  | R+  | B+  | L+  | SS+  | SE+  | EE+  | ES+  | TL+  | TR+  | BR+  | BL+  deriving Show++tshowCorner :: Corner -> T.Text+tshowCorner = \case+  All -> ""+  x -> ((<>) "-") . T.toLower . tshow $ x++instance Default BorderRadius where+  def = None++-- DEPRECATED+instance ShowTW BorderRadius where+  showTW = ((<>) "rounded") . \case+    None -> "-none"+    Rounded c -> tshowCorner c --"-" <> (T.toLower . tshow $ c) <> "-" <> "sm"+    RoundedSM c -> tshowCorner c <> "-" <> "sm"+    RoundedMd c -> tshowCorner c <> "-" <> "md"+    RoundedLg c -> tshowCorner c <> "-" <> "lg"+    RoundedXl c -> tshowCorner c <> "-" <> "xl"+    Rounded2Xl c -> tshowCorner c <> "-" <> "2xl"+    Rounded3Xl c -> tshowCorner c <> "-" <> "3xl"+    RoundedFull c -> tshowCorner c <> "-" <> "full"+++-- | todo: can we merge with gridCol Col1-12?+data IntGrid+  = IG1+  | IG2+  | IG3+  | IG4+  | IG5+  | IG6+  | IG7+  | IG8+  | IG9+  | IG10+  | IG11+  | IG12+++-- -- | Could also just do variants where they are evenly spaced and such+-- boxInGrid :: BoxConfig -> (IntGrid, IntGrid) -> m ()+-- boxInGrid = undefined++++-- data BoxConfig = BoxConfig+--   { leftPadding :: T.Text+--   , bottomPadding :: T.Text+--   }++-- type Test = TWConfig BoxConfig+++-- | Right now this is just for custom uses in Tailwind+data CSSSize+  = Pixel Int+  | Percent Int+  | Vh Int+  | Vw Int+  | Rem Float+  deriving Show++instance IsCSS CSSSize where+  renderCSS = \case+    Pixel int -> tshow int <> "px"+    Percent int -> tshow int <> "%"+    Vh int -> tshow int <> "vh"+    Vw int -> tshow int <> "vw"+    Rem float -> tshow float <> "rem"+++-- -- | TODO(galen): remove ShowTW a constraint+-- data TWConfig a = ShowTW a => TWConfig { unTWConfig :: [(Maybe TWCondition, a)] }++-- instance (ShowTW a, Default a) => Default (TWConfig a) where+--   def = TWConfig [(Nothing, def)]++-- instance ShowTW (TWConfig a) where+--   showTW (TWConfig ts) = f ts+--     where+--       f [] = ""+--       f ((c,cfg):cs) = case c of+--         Just c' -> showTWWhen c' cfg <> (f cs)+--         Nothing -> showTW cfg <> (f cs)++--   showTWWhen = \_ -> showTW++-- -- All of these should also take a custom except when it's datatype is T.Text+-- data TextConfigTW = TextConfigTW+--   { _text_size :: WhenTW TextSize+--   , _text_weight :: WhenTW TextWeight+--   , _text_font :: WhenTW Font -- many options -- EG. Sarabun -> font-[Sarabun]+--   , _text_color :: WhenTW Color+--   , _text_decoration :: TextDecorationTW+--   --, _text_align :: Align+--   , _text_custom :: T.Text+--   }++data Font+  = Sans+  | Serif+  | Mono+  | Font_Custom T.Text+  deriving Show++instance Default Font where+  def = Sans++instance ShowTW Font where+  showTW = \case+    Font_Custom t -> "font-[" <> t <> "]"+    x -> ((<>) "font-") . T.toLower . tshow $ x++++--  showTWWhen c (TextConfigTW size weight font color dec custom) = T.intercalate " " $+--    [ showTWWhen c size+--    , showTWWhen c weight+--    , showTWWhen c font+--    , c <> ":text-" <> showTW color+--    , showTWWhen c dec+    --, c <> ":text-" <> showTW align+--    , custom+--    ]++  --showTWWhen c tw++-- | This is used for many things+-- | DEPRECATED+-- data Align+--   = Align_Left+--   | Align_Center+--   | Align_Right+--   | Align_Justify+--   | Align_Start+--   | Align_End+--   deriving Show++-- instance Default Align where+--   def = Align_Left++-- instance ShowTW Align where+--   showTW = T.drop 6 . T.toLower . tshow+--   showTWWhen c tw = c <> ":" <> (showTW tw)++-- data TextDecorationTW = TextDecorationTW+--   { _textDec_line :: WhenTW TextDecLineType+--   , _textDec_color :: WhenTW Color+--   , _textDec_style :: WhenTW TextDecStyle+--   , _textDec_thickness :: WhenTW TextDecThickness -- TODO: is this a standard system: Thickness?+--   , _textDec_offset :: WhenTW TextDecOffset -- and is this a system? (the numbers chosen 0,1,2,4,8)+--   }++--  showTWWhen c (TextDecorationTW line color style thickness offset) = T.intercalate " " $+--    [ showTWWhen c line+--    , c <> ":decoration-" <> showTW color+--    , showTWWhen c style+--    , showTWWhen c thickness+--    , showTWWhen c offset+--    ]++data TextDecLineType+  = Underline+  | Overline+  | LineThrough+  | NoUnderline+  deriving Show++instance Default TextDecLineType where+  def = NoUnderline++instance ShowTW TextDecLineType where+  showTW = \case+    LineThrough -> "line-through"+    NoUnderline -> "no-underline"+    x -> T.toLower . tshow $ x+--  showTWWhen c tw = c <> ":" <> (showTW tw)++data TextDecStyle+  = Solid+  | Double+  | Dotted+  | Dashed+  | Wavy+  deriving Show++-- Note that we may need to make this a Maybe TextDecStyle+instance Default TextDecStyle where+  def = Solid++instance ShowTW TextDecStyle where+  showTW = ((<>) "decoration-") . T.toLower . tshow+  --showTWWhen c tw = c <> ":" <> (showTW tw)++data TextDecThickness+  = FromFont+  | TextDecThickness TWNum+  | TextDecThickness_Custom CSSSize -- TODO: is this just size??+  deriving Show++instance Default TextDecThickness where+  def = TextDecThickness def++instance ShowTW TextDecThickness where+  showTW thk = "decoration-" <> ( case thk of+                                    FromFont -> "from-font"+                                    TextDecThickness twnum -> showTW twnum+                                    TextDecThickness_Custom cssSize -> "[" <> (renderCSS cssSize) <> "]"+                                )+--  showTWWhen c tw = c <> ":" <> (showTW tw)++data TWNum+  = Auto+  | TW0+  | TW1+  | TW2+  | TW4+  | TW8+  deriving Show++instance Default TWNum where+  def = TW1++-- | TODO: see note about color / showColor ; showTWNum+instance ShowTW TWNum where+  showTW Auto = "auto"+  showTW x = T.drop 2 $ tshow x+++data TextDecOffset+  = TextDecOffset TWNum+  | TextDecOffset_Custom CSSSize+  deriving Show++instance Default TextDecOffset where+  def = TextDecOffset def++instance ShowTW TextDecOffset where+  showTW (TextDecOffset tnum) = "underline-offset-" <> (showTW tnum)+  --showTWWhen c tw = c <> ":" <> (showTW tw)++data TextSize+  = XS+  | SM+  | Base+  | LG+  | XL+  | XL2 -- According to testing this is the default size `\_o_/`+  | XL3+  | XL4+  | XL5+  | XL6+  | XL7+  | XL8+  | XL9+  | TextSize_Custom T.Text+  deriving Show++-- | TODO: when this inevitably becomes its own package, make it easy to not import Defaults and make your own+instance Default TextSize where+  def = XL2 -- According to testing this is the default size `\_o_/'++instance ShowTW TextSize where+  showTW (TextSize_Custom t) = "text-[" <> t <> "]"+  showTW XS = "text-xs"+  showTW SM = "text-sm"+  showTW Base = "text-base"+  showTW LG = "text-lg"+  showTW XL = "text-xl"+  showTW XL2 = "text-2xl"+  showTW XL3 = "text-3xl"+  showTW XL4 = "text-4xl"+  showTW XL5 = "text-5xl"+  showTW XL6 = "text-6xl"+  showTW XL7 = "text-7xl"+  showTW XL8 = "text-8xl"+  showTW XL9 = "text-9xl"++--  showTWWhen c tw = c <> ":" <> (showTW tw)++data TextWeight+  = Thin+  | Extralight+  | Light+  | Normal+  | Medium+  | Semibold+  | Bold+  | Extrabold+  | Black_TW+  | TextWeight_Custom T.Text+  deriving Show++instance Default TextWeight where+  def = Normal++instance ShowTW TextWeight where+  showTW (TextWeight_Custom t) = "font-[" <> t <> "]"+  showTW (Black_TW) = "font-black"+  showTW x = "font-" <> (T.toLower . tshow $ x )+  --showTWWhen c tw = c <> ":" <> (showTW tw)++-- | TODO: myColor :: MyColor -> Color where MyColor is a typified Design Choice+-- | Note that this can be used for either background or text+data Color+  = Inherit+  | Current+  | Transparent+  | Black+  | White+  | Slate ColorNum+  | Gray ColorNum+  | Zinc ColorNum+  | Neutral ColorNum+  | Stone ColorNum+  | Red ColorNum+  | Orange ColorNum+  | Amber ColorNum+  | Yellow ColorNum+  | Lime ColorNum+  | Green ColorNum+  | Emerald ColorNum+  | Teal ColorNum+  | Cyan ColorNum+  | Sky ColorNum+  | Blue ColorNum+  | Indigo ColorNum+  | Violet ColorNum+  | Purple ColorNum+  | Fuchsia ColorNum+  | Pink ColorNum+  | Rose ColorNum+  | Color_Custom Hex+  deriving (Show, Eq)++-- Sky (ColorNum_Custom x)++hex :: T.Text -> Color+hex = Color_Custom . Hex+newtype Hex = Hex { unHex :: T.Text } deriving (Eq, Show)++-- TODO: own defaults+instance Default Color where+  def = Black++data ColorNum+ = C50+ | C100+ | C200+ | C300+ | C400+ | C500+ | C600+ | C700+ | C800+ | C900+ | C950+ deriving (Show, Eq)++instance Default ColorNum where+  def = C950+++-- | There is no showTW for ColorNum since this will never be without an encompassing Color+-- | TODO(galen): Should we just make this its own special function? and then its called by showTW; showColor+-- | Because this is never used on its own either+instance ShowTW Color where+  showTW (Color_Custom (Hex h)) = "[#" <> h <> "]"+  showTW Inherit = "inherit"+  showTW Current = "current"+  showTW Transparent = "transparent"+  showTW Black = "black"+  showTW White = "white"+  showTW color =+    let c:(mag):[] = T.words $ tshow color+    in (T.toLower c) <> "-" <> (T.drop 1 mag)++--  showTWWhen c tw = showTW tw+  --++type BottomPadding = TWSize++-- tshow :: Show a => a -> T.Text+-- tshow = T.pack . show++makeLenses ''TextConfigTW+makeLenses ''TextDecorationTW++makeLenses ''BoxConfig+makeLenses ''BoxPadding+makeLenses ''BoxMargin+makeLenses ''BoxSizingBand+makeLenses ''BoxSizing+makeLenses ''BoxSizingConstraint+makeLenses ''BorderConfig+makeLenses ''BorderRadiusCorners+makeLenses ''BorderWidthSides+makeLenses ''BorderColorSides+++-- | This is technically an illegal lens however if you ran 2 setters which overlap so that a /= b+-- | where a and b are the fields associated with respective separate fields, then classh' will+-- | most likely catch the error. Additionally, there is a lens way to access any field anyways+instance SetSides BoxMargin TWSize where+  l = marginL+  r = marginR+  b = marginB+  t = marginT+  x = lens _marginL $ \tw new -> tw { _marginL = new, _marginR = new }+  y =  lens _marginT $ \tw new -> tw { _marginT = new, _marginB = new }+  xy = lens _marginT $ \tw new -> tw { _marginT = new+                                     , _marginB = new+                                     , _marginL = new+                                     , _marginR = new+                                     }+++-- | This is technically an illegal lens however if you ran 2 setters which overlap so that a /= b+-- | where a and b are the fields associated with respective separate fields, then classh' will+-- | most likely catch the error. Additionally, there is a lens way to access any field anyways+instance SetSides BoxPadding TWSize where+  l = paddingL+  r = paddingR+  b = paddingB+  t = paddingT+  x = lens _paddingL $ \tw new -> tw { _paddingL = new, _paddingR = new }+  y = lens _paddingR $ \tw new -> tw { _paddingT = new, _paddingB = new }+  xy = lens _paddingT $ \tw new -> tw { _paddingT = new+                                      , _paddingB = new+                                      , _paddingL = new+                                      , _paddingR = new+                                      }+  +instance SetSides BorderRadiusCorners BorderRadius' where+  l = borderRadius_l+  r = borderRadius_r+  b = borderRadius_b+  t = borderRadius_t+  xy = lens _borderRadius_tl $ \tw new -> tw { _borderRadius_tl = new+                                             , _borderRadius_bl = new+                                             , _borderRadius_tr = new+                                             , _borderRadius_br = new+                                             }+  -- Effectively, due to corners;+  y = xy+  x = xy++instance SetSides BorderWidthSides BorderWidth where+  l = borderWidth_l+  r = borderWidth_r+  t = borderWidth_t+  b = borderWidth_b+  x = lens _borderWidth_l $ \tw new -> tw { _borderWidth_l = new, _borderWidth_r = new }+  y = lens _borderWidth_b $ \tw new -> tw { _borderWidth_b = new, _borderWidth_t = new }+  xy = lens _borderWidth_b $ \tw new -> tw { _borderWidth_b = new+                                           , _borderWidth_t = new+                                           , _borderWidth_l = new+                                           , _borderWidth_r = new+                                           }++instance SetSides BorderColorSides Color where+  l = borderColor_l+  r = borderColor_r+  t = borderColor_t+  b = borderColor_b+  x = lens _borderColor_l $ \tw new -> tw { _borderColor_l = new, _borderColor_r = new }+  y = lens _borderColor_t $ \tw new -> tw { _borderColor_t = new, _borderColor_b = new }+  xy = lens _borderColor_t $ \tw new -> tw { _borderColor_t = new+                                           , _borderColor_b = new+                                           , _borderColor_l = new+                                           , _borderColor_r = new+                                           }+++instance HasCustom BoxConfig where+  custom = box_custom ++instance HasCustom TextConfigTW where+  custom = text_custom +++-- deprecated?+-- | TODO: make a setter that takes both the color and opacity as args+-- | We need this cuz the Opacity defaults to 0+-- bgColor' :: Lens' BoxConfig Color+-- bgColor' = lens undefined $ \tw new -> tw { _bgColor = new , _bgOpacity = 100 }+++pt, pl, pr, pb, px, py, p :: Lens' BoxConfig (WhenTW TWSize)+pt = padding . t +pb = padding . b+pl = padding . l+pr = padding . r+px = padding . x+py = padding . y +p = padding . allS++mt, ml, mr, mb, mx, my, m :: Lens' BoxConfig (WhenTW TWSize)+mt = margin . t +mb = margin . b+ml = margin . l+mr = margin . r+mx = margin . x+my = margin . y+m = margin . allS++++pos :: Lens' BoxConfig (WhenTW (Justify, Align))+pos = lens undefined $ \cfg new -> cfg { _position =  new }+-- pos :: Lens' BoxConfig (Justify, Align)+-- pos = position . _Just+width', height', w, h :: Lens' BoxConfig (WhenTW TWSizeOrFraction) +width' = sizingBand . size . width+height' = sizingBand . size . height+w = width'+h = height'+++-- v1_box :: BoxConfig+-- v1_box = def+--      & colSpan .~ onlyDef+--      & colStart .~ onlyDef+--      & bgColor .~ onlyDef+--      & bgOpacity .~ onlyDef+--      & padding .~ (def+--                    & t .~ onlyDef+--                    & b .~ onlyDef+--                    & r .~ onlyDef+--                    & l .~ onlyDef+--                   )+--      & margin .~ (def+--                   & t .~ onlyDef+--                   & b .~ onlyDef+--                   & r .~ onlyDef+--                   & l .~ onlyDef+--                  )+--      & sizingBand .~ (def+--                       & maxSize .~ (def+--                                     & widthC .~ onlyDef+--                                     & heightC .~ onlyDef+--                                    )+--                        & minSize .~ (def+--                                     & widthC .~ onlyDef+--                                     & heightC .~ onlyDef+--                                    )+--                        & size .~ (def+--                                   & width .~ onlyDef+--                                   & height .~ onlyDef+--                                  )+--                      )+--      & border .~ (def+--                   & bStyle .~ onlyDef+--                   & bColor .~ (def & allS .~ onlyDef)+--                   & bWidth .~ (def & allS .~ onlyDef)+--                   & radius .~ ((def :: BorderRadiusCorners) & allS .~ onlyDef)+--                  )+--      & position .~ [("def", (def,def))]+
+ src/Classh.hs~ view
@@ -0,0 +1,1724 @@+{-# LANGUAGE OverloadedStrings #-}++module Classh where+++import Common.Types (tshow)+import Reflex.Dom.Core++import Language.Haskell.TH+import Control.Monad (forM_)+import Control.Lens (makeLenses, Lens',lens, ASetter, over)+import Data.Default+import qualified Data.Text as T++{-+GOALS+-> Cut down the surface area of what is needed from CSS+-> Make an easy to integrate system through this limited CSS+-> Eliminate messing with typos and repeats+-> Encourage non-naive responsive code+-> Have more organized code for when an attribute is highly responsive+   Non eg. "py-2 ......... sm:py-4 ............... lg:pt-9"+-> Helper functions with a definite limited scope for the goal of self-documenting / easy to visualize DomBuilders++-}+++-- | A future research item for this library is how to work with accessibility+  -- do we need prerender ?+  -- is this gonna be reading in some config?+  -- is this a native thing?+  -- aria?+  -- will this mean scaling from same base accessibility based value?+  -- what features does this affect directly? indirectly?+++--instance ShowTW (WhenTW a)++-- | TODO:+  -- use template haskell to autogenerate types from a CSS file eg if classes blah and blah2 exist+  -- data UserCSS = Blah | Blah2 ++intercalate :: DomBuilder t m => WhenTW TextSize -> T.Text -> [m ()] -> m ()+intercalate size inter (t:ts) = do+  t >> prependAll size inter ts+  where+    prependAll _ _ [] = pure () +    prependAll s i (t:ts) = elClass "span" (renderWhenTW s showTW ) (text i) >> t >> prependAll s i ts++-- | Works by setting top padding by one consistent value. Does not add padding for first element+paragraphs :: DomBuilder t m => WhenTW TWSize -> [m ()] -> m () +paragraphs spacing (r:rows) = do+  row [] $ r+  withTopPadding spacing rows+  where+    withTopPadding _ [] = pure ()+    withTopPadding p (r:rs) = row [t .~ p] r >> withTopPadding p rs ++-- | Works by setting top padding variably+paragraphs' :: DomBuilder t m => [(WhenTW TWSize, m ())] -> m () +paragraphs' ((s,r):rows) = row [t .~ s] r >> paragraphs' rows++rows :: DomBuilder t m => [(WhenTW TWSize, m ())] -> m () +rows = paragraphs' ++-- | TODO: should we have a variant which controls for padding needs when being a full row? What should that look like? Do we even need that??+responsiveRowCol :: DomBuilder t m => [Int] -> m a -> m a+responsiveRowCol colSpans m =+  let spandex = renderWhenTW (zipScreens colSpans) ((<>) "col-span-" . tshow) +  in elClass "div" spandex m+           ++ +++-- | Not real: just ideating+-- | How can we model a discrete set of consistent brand options?+--+-- data Mytextsize = Heading | Subtext | Normal+-- domain = Map.fromList [ (Heading , XL7) , (Normal , XL3) , (Subtext , XS) ]+--+-- brandF :: k -> WhenTW k+-- brandF (domainType :: Ord k => k) =+--   let baseSize = fromJust $ Map.lookup domainType (domain :: Map (k :: Ord k => k) (v :: ShowTW x => x))+--   in+--     autoScale baseSize +--+-- then this above code suggests that we should think of our domain as mobile first +-- it is important to remember this is not meant to represent 100% of CSS but rather ~80%+-- and should be a way to communicate branding concisely such that a stoopid cud impl. it to be+-- consistent +--+-- Now, it wont always be super complex: for example, color+--+-- def = TW.def & text_color .~ only aceBlue+--+-- But then again, a brand may have multiple colors+--+-- brandColors = Map.fromList [ (AceBlue, hex _), (AceNavyBlue, hex _), (AceBabyBlue, hex _) ]+-- and also:+       -- What about dark mode? \+       --+-- and note: lets say 90% of titles should have Bold as their weight, we can set this and +++++-------------------thought bubble ----------------------------------------------------------+++-- module MyTWConfig where++-- def = TW.def & text_color .~ only aceBlue++-- then++-- module MyModule++-- import MyTWConfig+-- f = elTW def blank++-- ---++-- we could also have a defDerivative which functions just like V1 tailwindlib like so:+--   BoxConfig def:[]++--   where def here should be ("def", def)++--   and note we can make TWstring which could have an instance of IsString so that it can be written as a string literal++--   which helps cuz then TWString can have a default of "def"+++-- Also for conceptual understanding:++--   fmap (,X) (enum screenSizes)  == ("def", X)+--   fmap (,X) (enum allConditions) == ("def", X)+--   fmap (,X) (enum allEvents) : ("def",X) : [] == ("def", X)+--   fmap (,def) (enum allEvents) == []+++------------------------------------------------------------------------------------------------------+-- TODO:++-- CSS and Tailwind semigroups for folding into one CSSConfig OR TailwindClassConfig+-- where both render to a string++  -- Each config is only allowed to be set once -> alerting the dev if they asked for something like "red" and "blue"+  -- for the background color or similar illogical configurations++  -- Would be extra ideal to have this made clear at compile time+++-- def+--   & leftPadding .~ 3+--   & styling .~ (def+--                 &  bg_color .~ Color_Custom (Hex "")+--                )+++-- data BoxConfig = BoxConfig+--   { leftPadding :: T.Text+--   , bottomPadding :: T.Text+--   }++++-- | Idea: elDynTW where we can update using the TW lib based on events and prev state++-- | Idea: for align and justify -> we have them as one setting of the datatype Position = TR -- TopRight | BL -- Bottom Left++-- | THIS DOESNT WORK: Grid causes other issues/effects - maybe we can negate this through defaults (eg. two styled texts begin to stack+-- | instead of go beside each other++++++++++++++++++++++++-- HELPFUL CONSTANTS+centeredOnly = only centered+centered = (J_Center, A_Center)++--------------------++defaultClasses = "" -- "grid"++elTW :: DomBuilder t m => T.Text -> BoxConfig -> m a -> m a+elTW tag cfg m = elClass tag (defaultClasses <> " " <> showTW cfg) m++elTW' :: DomBuilder t m => T.Text -> BoxConfig -> m a -> m (Element EventResult (DomBuilderSpace m) t, a)+elTW' tag cfg m = elClass' tag (defaultClasses <> " " <> showTW cfg) m++elDynTW :: (PostBuild t m, DomBuilder t m) => T.Text -> Dynamic t BoxConfig -> m a -> m a+elDynTW tag cfgDyn m = elDynClass tag ( (\cfg -> defaultClasses <> " " <> showTW cfg) <$> cfgDyn ) m++elDynTW' :: (PostBuild t m, DomBuilder t m) => T.Text -> Dynamic t BoxConfig -> m a -> m (Element EventResult (DomBuilderSpace m) t, a)+elDynTW' tag cfgDyn m = elDynClass' tag ( (\cfg -> defaultClasses <> " " <> showTW cfg) <$> cfgDyn ) m++-- textTW' :: (DomBuilder t m, ShowTW tw) => tw -> T.Text -> m ()+-- textTW' = styledText'++-- styledText' :: (DomBuilder t m, ShowTW tw) => tw -> T.Text -> m ()+-- styledText' cfg txt = elClass "span" (showTW cfg) $ text txt++-- dynTextTW' :: (DomBuilder t m, PostBuild t m, ShowTW tw) => tw -> Dynamic t T.Text -> m ()+-- dynTextTW' cfg txt = elClass "span" (showTW cfg) $ dynText txt++-- textDynTW' :: (DomBuilder t m, PostBuild t m, ShowTW tw) => Dynamic t tw -> T.Text -> m ()+-- textDynTW' dynCfg txt = elDynClass "span" ( (\cfg -> defaultClasses <> " " <> showTW cfg) <$> dynCfg ) $ text txt++-- styledTexts' :: (ShowTW tw, DomBuilder t m) => [(tw, T.Text)] -> m ()+-- styledTexts' styTexs = el "div" $ forM_ styTexs $ \(cfg, txt) -> styledText' cfg txt+++-- | TODO: variants which do not get checked/compiled+textS :: DomBuilder t m => CompiledS -> T.Text -> m ()+textS s txt = elClass "span" s $ text txt++textDynS :: (PostBuild t m, DomBuilder t m) => Dynamic t CompiledS -> T.Text -> m ()+textDynS s txt = elDynClass "span" s $ text txt++dynTextS :: (PostBuild t m, DomBuilder t m) => CompiledS -> Dynamic t T.Text -> m ()+dynTextS s txt = elClass "span" s $ dynText txt++dynTextDynS :: (PostBuild t m, DomBuilder t m) => Dynamic t CompiledS -> Dynamic t T.Text -> m ()+dynTextDynS s txt = elDynClass "span" s $ dynText txt++++-- buttonC :: Map.Map T.Text T.Text -> m a -> m (Event t a)+-- buttonC attrs inner = do+--   (e,x) <- elAttr' "button" attrs inner+--   pure $ x <$ domEvent Click e+++-- | TODO: styledParagraphs :: [( BottomPadding, [(tw,T.Text)])] -> m ()+-- then apply to bannerFor in Landing.*++-- | Purposefully designed to take no other data besides ColInt in order to be very self-contained+gridCol :: DomBuilder t m => ColInt -> m a -> m a+gridCol cInt ma = elClass "div" ("grid grid-cols-" <> showTW cInt) ma++data RowDivisor = RD1 | RD2 | RD3 | RD4 | RD6 | RD12  ++-- | TODO: this should have the ability to add rows somehow+-- | and how we can think of this is that if we start at a large->Col12 and scale down to+-- | lets say a 'sm' then Col12 / n where n is from config. So lets say n=2 then sm->Col6 which will show up as+-- | 2 rows of 6; similarly n=6 => 6 rows of 2 ; n=12 -> 12 rows of 1; n=3 => 3 rows of 4 ; n=4 => 4 rows of 3  +gridColWhen :: DomBuilder t m => WhenTW ColInt -> m a -> m a+gridColWhen cInts ma = elClass "div" (showCInts cInts) ma +  where+    showCInts [] = ""+    showCInts (("def",cInt):cInts) = "grid grid-cols-" <> showTW cInt <&> showCInts cInts +    showCInts ((w,cInt):cInts) = w <> ":" <> "grid" <&> w <> ":" <> "grid-cols-" <> showTW cInt+                                 <&> showCInts cInts ++-- | Denotes a normal row. Does not have inline-block +-- row :: DomBuilder t m => BoxPadding -> m a -> m a +-- row padding = elClass "div" ( "" <&> showTW padding )++gridColW :: DomBuilder t m => ColInt -> TWSizeOrFraction -> m a -> m a+gridColW cInt width ma = elClass "div" ("grid grid-cols-" <> showTW cInt <&> ("w-" <> showTW width)) ma++++row :: DomBuilder t m => [BoxPadding -> BoxPadding] -> m a -> m a +row paddingF = elClass "div" ( "" <&> showTW (applyFs def paddingF) )+++applyFs :: a -> [a -> a] -> a +applyFs b fs = foldl (\acc f -> f acc) b fs++type CompiledS = T.Text+-- newtype CompiledS a = CompiledS T.Text+-- newtype CompiledS = CompiledS T.Text+-- type CompiledS a = T.Text+-- rowC :: DomBuilder t m => CompiledS BoxPadding -> m a -> m a +-- rowC padding = elClass "div" ( "" <&> padding )+++------ Helpers+infixr 0 <&>+(<&>) :: T.Text -> T.Text -> T.Text+a <&> b+  | a == "" = b+  | b == "" = a+  | otherwise = a <> " " <> b+++sm = "sm"+md = "md"+lg = "lg"+xl = "xl"+_2xl = "2xl"++-- data TWCondition_V2+--   = S_Mobile+--   | S_SM+--   | S_MD+--   | S_LG+--   | S_XL+--   | S_2XL+--   | On T.Text+--   deriving (Eq, Read, Ord, Show, Enum, Bounded)++-- zipScreens_v2 :: [a] -> WhenTW a+-- zipScreens_v2 xs =+--   let+--     sizes :: TWCondition_V2 +--     sizes = take 6 [minBound .. maxBound] -- ["def", "sm", "md", "lg", "xl", "2xl"]+--   in zip sizes xs ++sizes = ["def", "sm", "md", "lg", "xl", "2xl"]++zipScreens :: [a] -> WhenTW a+zipScreens xs = zip sizes xs ++zipScreensWith :: (a -> b) -> [a] -> WhenTW b+zipScreensWith f xs = zip sizes (f <$> xs)++-- (:.) :: a -> [a]+-- (:.) a = [a]+++++-- | it would be awesome to have a map like function that could be used like config for text size+-- | mappy = Map.fromList [(Heading, _), (Maintext, _) ... ]+-- |+-- | and effectively this is a model of the branding which will allow for consistency+  -- | AND!!! because the new model, models responsive design we can make scaling and brand design expressable as a Map ++autoScalePx :: Int -> WhenTW TWSize+autoScalePx pixels =+  [ ("def", scalePx pixels 1.0)+  , ("sm", scalePx pixels smFactor)+  , ("md", scalePx pixels mdFactor)+  , ("lg", scalePx pixels lgFactor)+  , ("xl", scalePx pixels xlFactor)+  , ("2xl", scalePx pixels s_2xlFactor)+  ]+  where+    mobileEstimatedWidth_px = 390+    -- Screen sizes per: https://tailwindcss.com/docs/responsive-design+    smFactor = 640 / mobileEstimatedWidth_px+    mdFactor = 768 / mobileEstimatedWidth_px+    lgFactor = 1024 / mobileEstimatedWidth_px+    xlFactor = 1280 / mobileEstimatedWidth_px+    s_2xlFactor = 1536 / mobileEstimatedWidth_px+    scalePx :: Int -> Float -> TWSize+    scalePx p factor = pix . round $ fromIntegral p * factor+++-- | autoScalePx = autoScalePx' 1.0 +autoScalePx' :: Float -> Int -> WhenTW TWSize+autoScalePx' userOpt pixels =+  [ ("def", scalePx pixels 1.0)+  , ("sm", scalePx pixels smFactor)+  , ("md", scalePx pixels mdFactor)+  , ("lg", scalePx pixels lgFactor)+  , ("xl", scalePx pixels xlFactor)+  , ("2xl", scalePx pixels s_2xlFactor)+  ]+  where+    mobileEstimatedWidth_px = 390+    -- Screen sizes per: https://tailwindcss.com/docs/responsive-design+    smFactor = userOpt * 640 / mobileEstimatedWidth_px+    mdFactor = userOpt * 768 / mobileEstimatedWidth_px+    lgFactor = userOpt * 1024 / mobileEstimatedWidth_px+    xlFactor = userOpt * 1280 / mobileEstimatedWidth_px+    s_2xlFactor = userOpt * 1536 / mobileEstimatedWidth_px+    scalePx :: Int -> Float -> TWSize+    scalePx p factor = pix . round $ fromIntegral p * factor++++-- | GOAL:+-- autoScalePx :: Int -> WhenTW TWSize+-- autoScalePx px =+--   [ (S_Mobl, px)+--   , (S_SM, scalePx px smFactor)+--   , (S_MD, scalePx px mdFactor)+--   , (S_LG, scalePx px lgFactor)+--   , (S_XL, scalePx px 1.4)+--   , (S_2XL, scalePx px 1.5)+--   ]+--   where+--     mobileEstimatedWidth_px = 390+--     -- Screen sizes per: https://tailwindcss.com/docs/responsive-design+--     smFactor = 640 / mobileEstimatedWidth_px+--     mdFactor = 768 / mobileEstimatedWidth_px+--     lgFactor = 1024 / mobileEstimatedWidth_px+--     xlFactor = 1280 / mobileEstimatedWidth_px+--     s_2xlFactor = 1536 / mobileEstimatedWidth_px+--+--     scalePx :: Int -> Float -> Int+--     scalePx p factor = round $ fromIntegral p * factor++-- autoScale :: TWSize -> WhenTW TWSize+-- autoScale mobile = [(S_Mobl, x), (S_SM, scaleSize x 1.1), (S_MD, scaleSize x 1.2), (S_LG, scaleSize x 1.3), (S_XL, scaleSize x 1.4), (S_2XL, scaleSize x 1.5)]+--   where+--     scaleSize :: TWSize -> Float -> TWSize+--     scaleSize (TWSize_Custom (Pixel p)) factor = TWSize_Custom (Pixel (round $ fromIntegral p * factor))+--     scaleSize (TWSize n) factor = TWSize (n * factor)+--     -- Add more cases for other CSSSize constructors if needed+--     scaleSize size _ = size  -- Fallback for non-scalable sizes or units+++only :: a -> WhenTW a+only p = ("def", p):[]++onlyDef :: (Default a, ShowTW a) => WhenTW a+onlyDef = ("def", def):[]++infixr 4 .~++(.~+) :: ASetter s t [a] [a] -> [a] -> s -> t+lens .~+ newVals = over lens (++ newVals)+++--infixr 4 .~++(.+) :: ASetter s t [a] [a] -> [a] -> s -> t+(.+) = (.~+)++renderWhenTW :: WhenTW a -> (a -> T.Text) -> T.Text+renderWhenTW tws construct = foldr (<&>) mempty $+  fmap (\(c,p) -> (if c == "def" then "" else (c <> ":")) <> construct p) $ tws++compileWhenTW :: WhenTW a -> (a -> T.Text) -> Either T.Text T.Text+compileWhenTW tws construct = case f $ fmap fst tws of+  Right () -> Right $ renderWhenTW tws construct+  Left e -> Left e+  where+    f [] = Right ()+    f (s:ss) =+      if elem s ss+      then Left $ s <> " exists twice"+      else f ss++++--foldr ((<&>) . (\(c,p) -> (if c == "def" then "" else (c <> ":")) <> construct p)) mempty+++-- | Checkers on the lib user's input to ensure no *unintended repetition+joinUnique :: WhenTW a -> WhenTW a -> WhenTW a+joinUnique = undefined++addUnique :: (TWCondition, a) -> WhenTW a -> WhenTW a+addUnique = undefined++-- checkStyle ::  -> Q Exp+-- checkStyle styleString =+--   let+--     xs = T.split styleString+--     f [] = False+--     f (s:ss) = elem s ss || f ss+--   in+--     if not $ f xs+--     then [| styleString |]+--     else fail+---------------++classh :: CompileStyle s => s -> [(s -> s)] -> Q Exp +classh base muts = case compileS $ foldl (\acc f -> f acc) base muts of+  Left e -> fail $ T.unpack e+  Right styleString -> [| styleString |]++classh' :: (Default s, CompileStyle s) => [(s -> s)] -> Q Exp +classh' muts = case compileS $ foldl (\acc f -> f acc) def muts of+  Left e -> fail $ T.unpack e+  Right styleString -> [| styleString |]++classhUnsafe :: (Default a, ShowTW a) => [a -> a] -> T.Text+classhUnsafe muts = showTW $ def `applyFs` muts+++instance CompileStyle BoxConfig where+  compileS cfg = do+    pure . foldr (<&>) mempty =<< sequenceA+      [ compilePos (_position cfg)+      , compileWhenTW (_colStart cfg) ((<>) "col-start-" . tshow)      +      , compileWhenTW (_colSpan cfg) ((<>) "col-span-" . tshow)    +      , compileBorder (_border cfg)+      , compileSizingBand (_sizingBand cfg)+      , compilePadding (_padding cfg)+      , compileMargin (_margin cfg)+      , compileWhenTW (_bgColor cfg) ((<>) "bg-" . showTW)+      , compileWhenTW (_bgOpacity cfg) ((<>) "bg-opacity-" . tshow)+      , Right $ _box_custom cfg+      ]+      where+        compileBorder cfg = pure . foldr (<&>) mempty =<< sequenceA+          [ compileWhenTW (_bStyle cfg) ((<>) "border-" . showTW)+          , compileBorderRadius (_radius cfg)+          , compileBorderWidth (_bWidth cfg)+          , compileBorderColor (_bColor cfg)+          ]++        compileBorderRadius cfg = pure . foldr (<&>) mempty =<< sequenceA+          [ compileWhenTW (_borderRadius_tr cfg) ((<>) "rounded-tr" . showTW)+          , compileWhenTW (_borderRadius_tl cfg) ((<>) "rounded-tl" . showTW)+          , compileWhenTW (_borderRadius_br cfg) ((<>) "rounded-br" . showTW)+          , compileWhenTW (_borderRadius_bl cfg) ((<>) "rounded-bl" . showTW)+          ]++        compileBorderWidth cfg = pure . foldr (<&>) mempty =<< sequenceA+          [ compileWhenTW (_borderWidth_l cfg) ((<>) "border-l" . showTW)+          , compileWhenTW (_borderWidth_r cfg) ((<>) "border-r" . showTW)+          , compileWhenTW (_borderWidth_t cfg) ((<>) "border-t" . showTW)+          , compileWhenTW (_borderWidth_b cfg) ((<>) "border-b" . showTW)+          ]++        compileBorderColor cfg = pure . foldr (<&>) mempty =<< sequenceA+          [ compileWhenTW (_borderColor_l cfg) ((<>) "border-l-" . showTW)+          , compileWhenTW (_borderColor_r cfg) ((<>) "border-r-" . showTW)+          , compileWhenTW (_borderColor_t cfg) ((<>) "border-t-" . showTW)+          , compileWhenTW (_borderColor_b cfg) ((<>) "border-b-" . showTW)+          ]++        compileSizingBand cfg = pure . foldr (<&>) mempty =<< sequenceA+          [ compileWhenTW (_widthC . _maxSize $ cfg) ((<>) "max-w-" . showTW)+          , compileWhenTW (_heightC . _maxSize $ cfg) ((<>) "max-h-" . showTW)+          , compileWhenTW (_widthC . _minSize $ cfg) ((<>) "min-w-" . showTW)+          , compileWhenTW (_heightC . _minSize $ cfg) ((<>) "min-h-" . showTW)+          , compileWhenTW (_width . _size $ cfg) ((<>) "w-" . showTW)+          , compileWhenTW (_height . _size $ cfg) ((<>) "h-" . showTW)+          ]+++        compileMargin cfg = pure . foldr (<&>) mempty =<< sequenceA+          [ compileWhenTW (_marginL cfg) ((<>) "ml-" . showTW)+          , compileWhenTW (_marginR cfg) ((<>) "mr-" . showTW)+          , compileWhenTW (_marginT cfg) ((<>) "mt-" . showTW)+          , compileWhenTW (_marginB cfg) ((<>) "mb-" . showTW)+          ]++        compilePos posCfg = case f $ fmap fst posCfg of+          Left e -> Left e+          Right () -> Right $ foldr (<&>) mempty $ fmap+            (\(c,(jus,align)) ->+               let pre = if c == "def" then "" else (c <> ":")+               in+                 pre <> "grid" <&> pre <> (showTW jus) <&> pre <> (showTW align)+            ) $ posCfg+          where+            f [] = Right ()+            f (s:ss) =+              if elem s ss+              then Left $ s <> " exists twice"+              else f ss++-- | For row func+instance CompileStyle BoxPadding where+  compileS = compilePadding++compilePadding :: BoxPadding -> Either T.Text T.Text+compilePadding cfg = pure . foldr (<&>) mempty =<< sequenceA+  [ compileWhenTW (_paddingL cfg) ((<>) "pl-" . showTW)+  , compileWhenTW (_paddingR cfg) ((<>) "pr-" . showTW)+  , compileWhenTW (_paddingT cfg) ((<>) "pt-" . showTW)+  , compileWhenTW (_paddingB cfg) ((<>) "pb-" . showTW)+  ]+          +          ++instance CompileStyle TextConfigTW where+  compileS cfg = pure . foldr (<&>) mempty =<< sequenceA+    [ compileWhenTW (_text_size cfg) showTW+    , compileWhenTW (_text_weight cfg) showTW+    , compileWhenTW (_text_font cfg) showTW+    , compileWhenTW (_text_color cfg) ((<>) "text-" . showTW)+    , compileDecoration (_text_decoration cfg)+    , Right $ _text_custom cfg+    ]+    where+      compileDecoration cfg = pure . foldr (<&>) mempty =<< sequenceA+        [ compileWhenTW (_textDec_line cfg) showTW+        , compileWhenTW (_textDec_color cfg) ((<>) "decoration-" . showTW)+        , compileWhenTW (_textDec_style cfg) showTW+        , compileWhenTW (_textDec_thickness cfg) showTW+        , compileWhenTW (_textDec_offset cfg) showTW+        ]+++++++class HasCSSSize tw where+  pix :: Int -> tw --Lens' tw Int +  pct :: Int -> tw +  vh :: Int -> tw+  vw :: Int -> tw+  rem :: Float -> tw++instance HasCSSSize TWSize where+  pix = TWSize_Custom . Pixel+  pct = TWSize_Custom . Percent+  vh = TWSize_Custom . Vh+  vw = TWSize_Custom . Vw+  rem = TWSize_Custom . Rem++instance HasCSSSize TWSizeOrFraction where+  pix = TWSize' . TWSize_Custom . Pixel --px+  pct = TWSize' . TWSize_Custom . Percent --pct+  vh = TWSize' . TWSize_Custom . Vh --vh+  vw = TWSize' . TWSize_Custom . Vw--vw+  rem = TWSize' . TWSize_Custom . Rem -- Classh.rem+  +class HasCustom tw where+  custom :: Lens' tw T.Text ++class CompileStyle tw where+  compileS :: tw -> Either T.Text T.Text+++class IsCSS css where+  renderCSS :: css -> T.Text++class ShowTW tw where+  showTW :: tw -> T.Text++class SetSides tw a where+  x :: Lens' tw (WhenTW a)+  y :: Lens' tw (WhenTW a)+  xy :: Lens' tw (WhenTW a)+  allS :: Lens' tw (WhenTW a)+  allS = xy+  l :: Lens' tw (WhenTW a)+  r :: Lens' tw (WhenTW a)+  b :: Lens' tw (WhenTW a)+  t :: Lens' tw (WhenTW a)++type TWCondition = T.Text+type WhenTW a = [(TWCondition, a)]++data BoxConfig = BoxConfig+  { _colStart :: WhenTW Int+  , _colSpan :: WhenTW Int+  , _bgColor :: WhenTW Color+  , _bgOpacity :: WhenTW Int -- 1 5 10 .. 100 -- def == 519+  , _padding :: BoxPadding+  , _margin :: BoxMargin+  , _sizingBand :: BoxSizingBand+  , _border :: BorderConfig -- { rounded, thickness, etc .. }+  , _position :: WhenTW (Justify, Align)+  --, _text_align :: Align ... or should we set == position.align+  , _box_custom :: T.Text+  }+  deriving Show++data BoxPadding = BoxPadding+  { _paddingL :: WhenTW TWSize+  , _paddingR :: WhenTW TWSize+  , _paddingT :: WhenTW TWSize+  , _paddingB :: WhenTW TWSize+  } deriving Show++-- TODO: lenses for y,x and all+data BoxMargin = BoxMargin+  { _marginL :: WhenTW TWSize+  , _marginR :: WhenTW TWSize+  , _marginT :: WhenTW TWSize+  , _marginB :: WhenTW TWSize+  } deriving Show++data BoxSizingBand = BoxSizingBand+  { _maxSize :: BoxSizingConstraint --(DimensionConstraint, DimensionConstraint)+  , _minSize :: BoxSizingConstraint -- (DimensionConstraint, DimensionConstraint)+  , _size :: BoxSizing+  }+  deriving Show++data BoxSizing = BoxSizing+  { _width :: WhenTW TWSizeOrFraction+  , _height :: WhenTW TWSizeOrFraction+  }+  deriving Show++data BoxSizingConstraint = BoxSizingConstraint+  { _widthC :: WhenTW DimensionConstraint+  , _heightC :: WhenTW DimensionConstraint+  }+  deriving Show++data BorderConfig = BorderConfig+  { _bStyle :: WhenTW BorderStyle+  , _bColor :: BorderColorSides+  , _bWidth :: BorderWidthSides+  , _radius :: BorderRadiusCorners+  } deriving Show++data BorderColorSides = BorderColorSides+  { _borderColor_l :: WhenTW Color+  , _borderColor_r :: WhenTW Color+  , _borderColor_t :: WhenTW Color+  , _borderColor_b :: WhenTW Color+  } deriving Show++data BorderRadiusCorners = BorderRadiusCorners+  { _borderRadius_tr :: WhenTW BorderRadius'+  , _borderRadius_tl :: WhenTW BorderRadius'+  , _borderRadius_br :: WhenTW BorderRadius'+  , _borderRadius_bl :: WhenTW BorderRadius'+  } deriving Show++data BorderWidthSides = BorderWidthSides+  { _borderWidth_l :: WhenTW BorderWidth+  , _borderWidth_r :: WhenTW BorderWidth+  , _borderWidth_t :: WhenTW BorderWidth+  , _borderWidth_b :: WhenTW BorderWidth+  } deriving Show++data TextConfigTW = TextConfigTW+  { _text_size :: WhenTW TextSize+  , _text_weight :: WhenTW TextWeight+  , _text_font :: WhenTW Font -- many options -- EG. Sarabun -> font-[Sarabun]+  , _text_color :: WhenTW Color+  , _text_decoration :: TextDecorationTW+  , _text_custom :: T.Text+  }++data TextDecorationTW = TextDecorationTW+  { _textDec_line :: WhenTW TextDecLineType+  , _textDec_color :: WhenTW Color+  , _textDec_style :: WhenTW TextDecStyle+  , _textDec_thickness :: WhenTW TextDecThickness -- TODO: is this a standard system: Thickness?+  , _textDec_offset :: WhenTW TextDecOffset -- and is this a system? (the numbers chosen 0,1,2,4,8)+  }+++------------  Defaults of Records++instance Default BoxConfig where+  def = BoxConfig def def def def def def def def def ""++instance Default BoxPadding where+  def = BoxPadding def def def def -- (TWSize 0) (TWSize 0) (TWSize 0) (TWSize 0)++instance Default BoxMargin where+  def = BoxMargin def def def def -- (TWSize 0) (TWSize 0) (TWSize 0) (TWSize 0)++instance Default TextConfigTW where+  def = TextConfigTW def def def def def ""++instance Default TextDecorationTW where+  def = TextDecorationTW def def def def def++instance Default BorderConfig where+  def = BorderConfig def def def def++instance Default BorderRadiusCorners where+  def = BorderRadiusCorners def def def def++instance Default BorderWidthSides where+  def = BorderWidthSides def def def def++instance Default BorderColorSides where+  def = BorderColorSides def def def def++instance Default BoxSizing where+  def = BoxSizing def def -- TWSize_Auto TWSize_Auto++instance Default BoxSizingBand where+  def = BoxSizingBand def def def++instance Default BoxSizingConstraint where+  def = BoxSizingConstraint def def -- DC_none DC_none++------------  END: Defaults of Records++------------  ShowTW of Records++--compileS+++instance ShowTW TextConfigTW where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_text_size cfg) showTW+    , renderWhenTW (_text_weight cfg) showTW+    , renderWhenTW (_text_font cfg) showTW+    , renderWhenTW (_text_color cfg) ((<>) "text-" . showTW)+    , showTW (_text_decoration cfg)+--    , "align-left"+    --, "text-" <> showTW align+    , _text_custom cfg+    ]+++++instance ShowTW TextDecorationTW where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_textDec_line cfg) showTW+    , renderWhenTW (_textDec_color cfg) ((<>) "decoration-" . showTW)+    , renderWhenTW (_textDec_style cfg) showTW+    , renderWhenTW (_textDec_thickness cfg) showTW+    , renderWhenTW (_textDec_offset cfg) showTW+    ]++instance ShowTW BoxConfig where+  showTW cfg = foldr (<&>) mempty+   [ renderWhenTW (_colStart cfg) ((<>) "col-start-" . tshow)+   , renderWhenTW (_colSpan cfg) ((<>) "col-span-" . tshow)+   , renderWhenTW (_bgColor cfg) ((<>) "bg-" . showTW)+   , renderWhenTW (_bgOpacity cfg) ((<>) "bg-opacity-" . tshow)                              +   , showTW . _border $ cfg+   , showTW . _sizingBand $ cfg+   , showTW . _padding $ cfg+   , showTW . _margin $ cfg+   , foldr (<&>) mempty $ fmap+     (\(c,(jus,align)) ->+        let pre = if c == "def" then "" else (c <> ":")+        in pre <> "grid" <&> pre <> (showTW jus) <&> pre <> (showTW align)+     ) $ _position cfg +   , renderWhenTW (_position cfg) $ \(j,a) -> "grid " <> showTW j <> " " <> showTW a+   , _box_custom cfg+   ]++instance ShowTW BorderConfig where+  showTW cfg = foldr (<&>) mempty+    [ showTW . _radius $ cfg+    , showTW . _bWidth $ cfg+    , showTW . _bColor $ cfg+    , renderWhenTW (_bStyle cfg) ((<>) "border-" . showTW)+    ]++instance ShowTW BoxSizing where+  showTW cfg = foldr (<&>) mempty+  --showTW (BoxSizing w h) = T.intercalate " " $+    [ renderWhenTW (_width cfg) ((<>) "w-" . showTW)+    , renderWhenTW (_height cfg) ((<>) "h-" . showTW)+    ]++instance ShowTW BoxSizingBand where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_widthC . _maxSize $ cfg) ((<>) "max-w-" . showTW)+    , renderWhenTW (_heightC . _maxSize $ cfg) ((<>) "max-h-" . showTW)+    , renderWhenTW (_widthC . _minSize $ cfg) ((<>) "min-w-" . showTW)+    , renderWhenTW (_heightC . _minSize $ cfg) ((<>) "min-h-" . showTW)+    , showTW $ _size cfg+    ]++instance ShowTW BoxMargin where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_marginL cfg) ((<>) "ml-" . showTW)+    , renderWhenTW (_marginR cfg) ((<>) "mr-" . showTW)+    , renderWhenTW (_marginT cfg) ((<>) "mt-" . showTW)+    , renderWhenTW (_marginB cfg) ((<>) "mb-" . showTW)+    ]+++instance ShowTW BoxPadding where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_paddingL cfg) ((<>) "pl-" . showTW)+    , renderWhenTW (_paddingR cfg) ((<>) "pr-" . showTW)+    , renderWhenTW (_paddingT cfg) ((<>) "pt-" . showTW)+    , renderWhenTW (_paddingB cfg) ((<>) "pb-" . showTW)+    ]++-- TODO: stop overlaps through conditionals+instance ShowTW BorderRadiusCorners where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_borderRadius_tr cfg) ((<>) "rounded-tr" . showTW)+    , renderWhenTW (_borderRadius_tl cfg) ((<>) "rounded-tl" . showTW)+    , renderWhenTW (_borderRadius_br cfg) ((<>) "rounded-br" . showTW)+    , renderWhenTW (_borderRadius_bl cfg) ((<>) "rounded-bl" . showTW)+    ]++instance ShowTW BorderWidthSides where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_borderWidth_l cfg) ((<>) "border-l-" . showTW)+    , renderWhenTW (_borderWidth_r cfg) ((<>) "border-r-" . showTW)+    , renderWhenTW (_borderWidth_t cfg) ((<>) "border-t-" . showTW)+    , renderWhenTW (_borderWidth_b cfg) ((<>) "border-b-" . showTW)+    ]++instance ShowTW BorderColorSides where+  showTW cfg = foldr (<&>) mempty+    [ renderWhenTW (_borderColor_l cfg) ((<>) "border-l-" . showTW)+    , renderWhenTW (_borderColor_r cfg) ((<>) "border-r-" . showTW)+    , renderWhenTW (_borderColor_t cfg) ((<>) "border-t-" . showTW)+    , renderWhenTW (_borderColor_b cfg) ((<>) "border-b-" . showTW)+    ]++------------  END: ShowTW of Records+++------------  Lenses+-- | Lenses will need 2 extensions:+  -- `only`+  -- puts (WhenTW t)++borderRadius_l, borderRadius_r, borderRadius_t, borderRadius_b :: Lens' BorderRadiusCorners (WhenTW BorderRadius')+borderRadius_l = lens undefined $ \tw new -> tw { _borderRadius_tl = new, _borderRadius_bl = new }+borderRadius_r = lens undefined $ \tw new -> tw { _borderRadius_tr = new, _borderRadius_br = new }+borderRadius_t = lens undefined $ \tw new -> tw { _borderRadius_tl = new, _borderRadius_tr = new }+borderRadius_b = lens undefined $ \tw new -> tw { _borderRadius_bl = new, _borderRadius_br = new }+++------------  END: Lenses++    -- the corners override the sides+    -- [ "rounded-l" <> showTW l+    -- , "rounded-r" <> showTW r+    -- , "rounded-t" <> showTW t+    -- , "rounded-b" <> showTW b+    -- ]++data BorderRadius'+  = R_None+  | R_SM+  | R_Normal+  | R_Md+  | R_Lg+  | R_Xl+  | R_2Xl+  | R_3Xl+  | R_Full+  | R_Custom CSSSize+  deriving Show++instance Default BorderRadius' where+  def = R_None++instance ShowTW BorderRadius' where+  showTW = \case+    R_Custom cssSize -> "-[" <> renderCSS cssSize <> "]"+    R_Normal -> ""+    other -> "-" <> (T.toLower . T.drop 2 . tshow $ other)+++data BorderWidth+  = B0+  | B1+  | B2+  | B4+  | B8+  | BW_Custom CSSSize+  deriving Show++instance Default BorderWidth where+  def = B0++instance ShowTW BorderWidth where+  showTW = \case+    B1 -> ""+    BW_Custom cssSize -> "-[" <> renderCSS cssSize <> "]"+    other -> "-" <> (T.drop 1 . tshow $ other)+++data BorderStyle+  = BSolid+  | BDashed+  | BDotted+  | BDouble+  | BHidden+  | BNone+  deriving Show++instance Default BorderStyle where+  def = BSolid++instance ShowTW BorderStyle where+  showTW = T.toLower . T.drop 1 . tshow++-- | TODO: Isolate in own module since only used for gridCol+data ColInt+  = Col1+  | Col2+  | Col3+  | Col4+  | Col5+  | Col6+  | Col7+  | Col8+  | Col9+  | Col10+  | Col11+  | Col12+  deriving Show++instance ShowTW ColInt where+  showTW = T.drop 3 . T.pack . show++instance Default ColInt where+  def = Col1++data Dimension+  = DNum Float+  | DFrac Int DivInt+  | Full+  | Screen+  | Min+  | Max+  | Fit+  | Dim_Custom T.Text+--  | None++-- there's TWSize and then TWSizeOrFraction+data TWSize+  = TWSize Float+  | TWSize_Custom CSSSize+  deriving Show++instance ShowTW TWSize where+  showTW = \case+    TWSize float ->+      if fromIntegral (truncate float) == float+      then tshow $ (truncate float :: Int)+      else tshow float+    TWSize_Custom c -> "[" <> renderCSS c <> "]"++data TWSizeOrFraction+  = TWSize' TWSize+  | TWFraction Int DivInt+  | TWSize_Full+  | TWSize_Screen+  | TWSize_Min+  | TWSize_Max+  | TWSize_Fit+  | TWSize_Auto+  deriving Show++instance ShowTW TWSizeOrFraction where+  showTW = \case+    TWSize' s -> showTW s+    TWFraction n d -> tshow n <> "/" <> showTW d+    class' -> T.toLower . T.drop 7 . tshow $ class'++instance Default TWSizeOrFraction where+  def = TWSize_Auto++data DivInt+  = D2+  | D3+  | D4+  | D5+  | D6+  | D12+  deriving Show++instance ShowTW DivInt where+  showTW = T.drop 1 . tshow++instance Default DivInt where+  def = D12 -- baby++-- | NOTE: although I cant do Start for either, I could create a class like HasStart+-- | Also NOTE: there is no plan to make text align, rather you put it in a span and align it via this mechanism+data Justify+  = J_Start+  | J_End+  | J_Center+  | J_Stretch+  deriving Show++data Align+  = A_Start+  | A_End+  | A_Center+  | A_Baseline+  deriving Show++instance Default Justify where+  def = J_Start+instance Default Align where+  def = A_Start+++instance ShowTW Justify where+  showTW = (<>) "justify-items-" . T.toLower . T.drop 2 . T.pack . show+instance ShowTW Align where+  +  showTW = (<>) "content-" . T.toLower . T.drop 2 . T.pack . show++-- | TODO: this is technically wrong: there are different classes for width vs height but oh well for now+data DimensionConstraint+  = DC_0+  | DC_none+  | DC_xs+  | DC_sm+  | DC_md+  | DC_lg+  | DC_xl+  | DC_2xl+  | DC_3xl+  | DC_4xl+  | DC_5xl+  | DC_6xl+  | DC_7xl+  | DC_full+  | DC_min+  | DC_max+  | DC_fit+  | DC_prose+  | DC_screen_sm+  | DC_screen_md+  | DC_screen_lg+  | DC_screen_xl+  | DC_screen_2xl+  | DC_Custom T.Text+  deriving Show++instance Default DimensionConstraint where+  def = DC_none++instance ShowTW DimensionConstraint where+  showTW = \case+    DC_Custom t -> "[" <> t <> "]"+    x -> T.replace "_" "-" . T.drop 3 . tshow $ x+++++-- DEPRECATED: use SetSides model+-- | TODO: move to SetSides lens model (t,b,r,l) all valid+data BorderRadius+  = None+  | RoundedSM Corner+  | Rounded Corner+  | RoundedMd Corner+  | RoundedLg Corner+  | RoundedXl Corner+  | Rounded2Xl Corner+  | Rounded3Xl Corner+  | RoundedFull Corner+  deriving Show++++data Corner+  = All -- -> ""+  | S+  | E+  | T+  | R+  | B+  | L+  | SS+  | SE+  | EE+  | ES+  | TL+  | TR+  | BR+  | BL+  deriving Show++tshowCorner :: Corner -> T.Text+tshowCorner = \case+  All -> ""+  x -> ((<>) "-") . T.toLower . tshow $ x++instance Default BorderRadius where+  def = None++-- DEPRECATED+instance ShowTW BorderRadius where+  showTW = ((<>) "rounded") . \case+    None -> "-none"+    Rounded c -> tshowCorner c --"-" <> (T.toLower . tshow $ c) <> "-" <> "sm"+    RoundedSM c -> tshowCorner c <> "-" <> "sm"+    RoundedMd c -> tshowCorner c <> "-" <> "md"+    RoundedLg c -> tshowCorner c <> "-" <> "lg"+    RoundedXl c -> tshowCorner c <> "-" <> "xl"+    Rounded2Xl c -> tshowCorner c <> "-" <> "2xl"+    Rounded3Xl c -> tshowCorner c <> "-" <> "3xl"+    RoundedFull c -> tshowCorner c <> "-" <> "full"+++-- | todo: can we merge with gridCol Col1-12?+data IntGrid+  = IG1+  | IG2+  | IG3+  | IG4+  | IG5+  | IG6+  | IG7+  | IG8+  | IG9+  | IG10+  | IG11+  | IG12+++-- -- | Could also just do variants where they are evenly spaced and such+-- boxInGrid :: BoxConfig -> (IntGrid, IntGrid) -> m ()+-- boxInGrid = undefined++++-- data BoxConfig = BoxConfig+--   { leftPadding :: T.Text+--   , bottomPadding :: T.Text+--   }++-- type Test = TWConfig BoxConfig+++-- | Right now this is just for custom uses in Tailwind+data CSSSize+  = Pixel Int+  | Percent Int+  | Vh Int+  | Vw Int+  | Rem Float+  deriving Show++instance IsCSS CSSSize where+  renderCSS = \case+    Pixel int -> tshow int <> "px"+    Percent int -> tshow int <> "%"+    Vh int -> tshow int <> "vh"+    Vw int -> tshow int <> "vw"+    Rem float -> tshow float <> "rem"+++-- -- | TODO(galen): remove ShowTW a constraint+-- data TWConfig a = ShowTW a => TWConfig { unTWConfig :: [(Maybe TWCondition, a)] }++-- instance (ShowTW a, Default a) => Default (TWConfig a) where+--   def = TWConfig [(Nothing, def)]++-- instance ShowTW (TWConfig a) where+--   showTW (TWConfig ts) = f ts+--     where+--       f [] = ""+--       f ((c,cfg):cs) = case c of+--         Just c' -> showTWWhen c' cfg <> (f cs)+--         Nothing -> showTW cfg <> (f cs)++--   showTWWhen = \_ -> showTW++-- -- All of these should also take a custom except when it's datatype is T.Text+-- data TextConfigTW = TextConfigTW+--   { _text_size :: WhenTW TextSize+--   , _text_weight :: WhenTW TextWeight+--   , _text_font :: WhenTW Font -- many options -- EG. Sarabun -> font-[Sarabun]+--   , _text_color :: WhenTW Color+--   , _text_decoration :: TextDecorationTW+--   --, _text_align :: Align+--   , _text_custom :: T.Text+--   }++data Font+  = Sans+  | Serif+  | Mono+  | Font_Custom T.Text+  deriving Show++instance Default Font where+  def = Sans++instance ShowTW Font where+  showTW = \case+    Font_Custom t -> "font-[" <> t <> "]"+    x -> ((<>) "font-") . T.toLower . tshow $ x++++--  showTWWhen c (TextConfigTW size weight font color dec custom) = T.intercalate " " $+--    [ showTWWhen c size+--    , showTWWhen c weight+--    , showTWWhen c font+--    , c <> ":text-" <> showTW color+--    , showTWWhen c dec+    --, c <> ":text-" <> showTW align+--    , custom+--    ]++  --showTWWhen c tw++-- | This is used for many things+-- | DEPRECATED+-- data Align+--   = Align_Left+--   | Align_Center+--   | Align_Right+--   | Align_Justify+--   | Align_Start+--   | Align_End+--   deriving Show++-- instance Default Align where+--   def = Align_Left++-- instance ShowTW Align where+--   showTW = T.drop 6 . T.toLower . tshow+--   showTWWhen c tw = c <> ":" <> (showTW tw)++-- data TextDecorationTW = TextDecorationTW+--   { _textDec_line :: WhenTW TextDecLineType+--   , _textDec_color :: WhenTW Color+--   , _textDec_style :: WhenTW TextDecStyle+--   , _textDec_thickness :: WhenTW TextDecThickness -- TODO: is this a standard system: Thickness?+--   , _textDec_offset :: WhenTW TextDecOffset -- and is this a system? (the numbers chosen 0,1,2,4,8)+--   }++--  showTWWhen c (TextDecorationTW line color style thickness offset) = T.intercalate " " $+--    [ showTWWhen c line+--    , c <> ":decoration-" <> showTW color+--    , showTWWhen c style+--    , showTWWhen c thickness+--    , showTWWhen c offset+--    ]++data TextDecLineType+  = Underline+  | Overline+  | LineThrough+  | NoUnderline+  deriving Show++instance Default TextDecLineType where+  def = NoUnderline++instance ShowTW TextDecLineType where+  showTW = \case+    LineThrough -> "line-through"+    NoUnderline -> "no-underline"+    x -> T.toLower . tshow $ x+--  showTWWhen c tw = c <> ":" <> (showTW tw)++data TextDecStyle+  = Solid+  | Double+  | Dotted+  | Dashed+  | Wavy+  deriving Show++-- Note that we may need to make this a Maybe TextDecStyle+instance Default TextDecStyle where+  def = Solid++instance ShowTW TextDecStyle where+  showTW = ((<>) "decoration-") . T.toLower . tshow+  --showTWWhen c tw = c <> ":" <> (showTW tw)++data TextDecThickness+  = FromFont+  | TextDecThickness TWNum+  | TextDecThickness_Custom CSSSize -- TODO: is this just size??+  deriving Show++instance Default TextDecThickness where+  def = TextDecThickness def++instance ShowTW TextDecThickness where+  showTW thk = "decoration-" <> ( case thk of+                                    FromFont -> "from-font"+                                    TextDecThickness twnum -> showTW twnum+                                    TextDecThickness_Custom cssSize -> "[" <> (renderCSS cssSize) <> "]"+                                )+--  showTWWhen c tw = c <> ":" <> (showTW tw)++data TWNum+  = Auto+  | TW0+  | TW1+  | TW2+  | TW4+  | TW8+  deriving Show++instance Default TWNum where+  def = TW1++-- | TODO: see note about color / showColor ; showTWNum+instance ShowTW TWNum where+  showTW Auto = "auto"+  showTW x = T.drop 2 $ tshow x+++data TextDecOffset+  = TextDecOffset TWNum+  | TextDecOffset_Custom CSSSize+  deriving Show++instance Default TextDecOffset where+  def = TextDecOffset def++instance ShowTW TextDecOffset where+  showTW (TextDecOffset tnum) = "underline-offset-" <> (showTW tnum)+  --showTWWhen c tw = c <> ":" <> (showTW tw)++data TextSize+  = XS+  | SM+  | Base+  | LG+  | XL+  | XL2 -- According to testing this is the default size `\_o_/`+  | XL3+  | XL4+  | XL5+  | XL6+  | XL7+  | XL8+  | XL9+  | TextSize_Custom T.Text+  deriving Show++-- | TODO: when this inevitably becomes its own package, make it easy to not import Defaults and make your own+instance Default TextSize where+  def = XL2 -- According to testing this is the default size `\_o_/'++instance ShowTW TextSize where+  showTW (TextSize_Custom t) = "text-[" <> t <> "]"+  showTW XS = "text-xs"+  showTW SM = "text-sm"+  showTW Base = "text-base"+  showTW LG = "text-lg"+  showTW XL = "text-xl"+  showTW XL2 = "text-2xl"+  showTW XL3 = "text-3xl"+  showTW XL4 = "text-4xl"+  showTW XL5 = "text-5xl"+  showTW XL6 = "text-6xl"+  showTW XL7 = "text-7xl"+  showTW XL8 = "text-8xl"+  showTW XL9 = "text-9xl"++--  showTWWhen c tw = c <> ":" <> (showTW tw)++data TextWeight+  = Thin+  | Extralight+  | Light+  | Normal+  | Medium+  | Semibold+  | Bold+  | Extrabold+  | Black_TW+  | TextWeight_Custom T.Text+  deriving Show++instance Default TextWeight where+  def = Normal++instance ShowTW TextWeight where+  showTW (TextWeight_Custom t) = "font-[" <> t <> "]"+  showTW (Black_TW) = "font-black"+  showTW x = "font-" <> (T.toLower . tshow $ x )+  --showTWWhen c tw = c <> ":" <> (showTW tw)++-- | TODO: myColor :: MyColor -> Color where MyColor is a typified Design Choice+-- | Note that this can be used for either background or text+data Color+  = Inherit+  | Current+  | Transparent+  | Black+  | White+  | Slate ColorNum+  | Gray ColorNum+  | Zinc ColorNum+  | Neutral ColorNum+  | Stone ColorNum+  | Red ColorNum+  | Orange ColorNum+  | Amber ColorNum+  | Yellow ColorNum+  | Lime ColorNum+  | Green ColorNum+  | Emerald ColorNum+  | Teal ColorNum+  | Cyan ColorNum+  | Sky ColorNum+  | Blue ColorNum+  | Indigo ColorNum+  | Violet ColorNum+  | Purple ColorNum+  | Fuchsia ColorNum+  | Pink ColorNum+  | Rose ColorNum+  | Color_Custom Hex+  deriving (Show, Eq)++-- Sky (ColorNum_Custom x)++hex :: T.Text -> Color+hex = Color_Custom . Hex+newtype Hex = Hex { unHex :: T.Text } deriving (Eq, Show)++-- TODO: own defaults+instance Default Color where+  def = Black++data ColorNum+ = C50+ | C100+ | C200+ | C300+ | C400+ | C500+ | C600+ | C700+ | C800+ | C900+ | C950+ deriving (Show, Eq)++instance Default ColorNum where+  def = C950+++-- | There is no showTW for ColorNum since this will never be without an encompassing Color+-- | TODO(galen): Should we just make this its own special function? and then its called by showTW; showColor+-- | Because this is never used on its own either+instance ShowTW Color where+  showTW (Color_Custom (Hex h)) = "[#" <> h <> "]"+  showTW Inherit = "inherit"+  showTW Current = "current"+  showTW Transparent = "transparent"+  showTW Black = "black"+  showTW White = "white"+  showTW color =+    let c:(mag):[] = T.words $ tshow color+    in (T.toLower c) <> "-" <> (T.drop 1 mag)++--  showTWWhen c tw = showTW tw+  --++type BottomPadding = TWSize++-- tshow :: Show a => a -> T.Text+-- tshow = T.pack . show++makeLenses ''TextConfigTW+makeLenses ''TextDecorationTW++makeLenses ''BoxConfig+makeLenses ''BoxPadding+makeLenses ''BoxMargin+makeLenses ''BoxSizingBand+makeLenses ''BoxSizing+makeLenses ''BoxSizingConstraint+makeLenses ''BorderConfig+makeLenses ''BorderRadiusCorners+makeLenses ''BorderWidthSides+makeLenses ''BorderColorSides+++-- | This is technically an illegal lens however if you ran 2 setters which overlap so that a /= b+-- | where a and b are the fields associated with respective separate fields, then classh' will+-- | most likely catch the error. Additionally, there is a lens way to access any field anyways+instance SetSides BoxMargin TWSize where+  l = marginL+  r = marginR+  b = marginB+  t = marginT+  x = lens _marginL $ \tw new -> tw { _marginL = new, _marginR = new }+  y =  lens _marginT $ \tw new -> tw { _marginT = new, _marginB = new }+  xy = lens _marginT $ \tw new -> tw { _marginT = new+                                     , _marginB = new+                                     , _marginL = new+                                     , _marginR = new+                                     }+++-- | This is technically an illegal lens however if you ran 2 setters which overlap so that a /= b+-- | where a and b are the fields associated with respective separate fields, then classh' will+-- | most likely catch the error. Additionally, there is a lens way to access any field anyways+instance SetSides BoxPadding TWSize where+  l = paddingL+  r = paddingR+  b = paddingB+  t = paddingT+  x = lens _paddingL $ \tw new -> tw { _paddingL = new, _paddingR = new }+  y = lens _paddingR $ \tw new -> tw { _paddingT = new, _paddingB = new }+  xy = lens _paddingT $ \tw new -> tw { _paddingT = new+                                      , _paddingB = new+                                      , _paddingL = new+                                      , _paddingR = new+                                      }+  +instance SetSides BorderRadiusCorners BorderRadius' where+  l = borderRadius_l+  r = borderRadius_r+  b = borderRadius_b+  t = borderRadius_t+  xy = lens _borderRadius_tl $ \tw new -> tw { _borderRadius_tl = new+                                             , _borderRadius_bl = new+                                             , _borderRadius_tr = new+                                             , _borderRadius_br = new+                                             }+  -- Effectively, due to corners;+  y = xy+  x = xy++instance SetSides BorderWidthSides BorderWidth where+  l = borderWidth_l+  r = borderWidth_r+  t = borderWidth_t+  b = borderWidth_b+  x = lens _borderWidth_l $ \tw new -> tw { _borderWidth_l = new, _borderWidth_r = new }+  y = lens _borderWidth_b $ \tw new -> tw { _borderWidth_b = new, _borderWidth_t = new }+  xy = lens _borderWidth_b $ \tw new -> tw { _borderWidth_b = new+                                           , _borderWidth_t = new+                                           , _borderWidth_l = new+                                           , _borderWidth_r = new+                                           }++instance SetSides BorderColorSides Color where+  l = borderColor_l+  r = borderColor_r+  t = borderColor_t+  b = borderColor_b+  x = lens _borderColor_l $ \tw new -> tw { _borderColor_l = new, _borderColor_r = new }+  y = lens _borderColor_t $ \tw new -> tw { _borderColor_t = new, _borderColor_b = new }+  xy = lens _borderColor_t $ \tw new -> tw { _borderColor_t = new+                                           , _borderColor_b = new+                                           , _borderColor_l = new+                                           , _borderColor_r = new+                                           }+++instance HasCustom BoxConfig where+  custom = box_custom ++instance HasCustom TextConfigTW where+  custom = text_custom +++-- deprecated?+-- | TODO: make a setter that takes both the color and opacity as args+-- | We need this cuz the Opacity defaults to 0+-- bgColor' :: Lens' BoxConfig Color+-- bgColor' = lens undefined $ \tw new -> tw { _bgColor = new , _bgOpacity = 100 }+++pt, pl, pr, pb, px, py, p :: Lens' BoxConfig (WhenTW TWSize)+pt = padding . t +pb = padding . b+pl = padding . l+pr = padding . r+px = padding . x+py = padding . y +p = padding . allS++mt, ml, mr, mb, mx, my, m :: Lens' BoxConfig (WhenTW TWSize)+mt = margin . t +mb = margin . b+ml = margin . l+mr = margin . r+mx = margin . x+my = margin . y+m = margin . allS++++pos :: Lens' BoxConfig (WhenTW (Justify, Align))+pos = lens undefined $ \cfg new -> cfg { _position =  new }+-- pos :: Lens' BoxConfig (Justify, Align)+-- pos = position . _Just+width', height', w, h :: Lens' BoxConfig (WhenTW TWSizeOrFraction) +width' = sizingBand . size . width+height' = sizingBand . size . height+w = width'+h = height'+++-- v1_box :: BoxConfig+-- v1_box = def+--      & colSpan .~ onlyDef+--      & colStart .~ onlyDef+--      & bgColor .~ onlyDef+--      & bgOpacity .~ onlyDef+--      & padding .~ (def+--                    & t .~ onlyDef+--                    & b .~ onlyDef+--                    & r .~ onlyDef+--                    & l .~ onlyDef+--                   )+--      & margin .~ (def+--                   & t .~ onlyDef+--                   & b .~ onlyDef+--                   & r .~ onlyDef+--                   & l .~ onlyDef+--                  )+--      & sizingBand .~ (def+--                       & maxSize .~ (def+--                                     & widthC .~ onlyDef+--                                     & heightC .~ onlyDef+--                                    )+--                        & minSize .~ (def+--                                     & widthC .~ onlyDef+--                                     & heightC .~ onlyDef+--                                    )+--                        & size .~ (def+--                                   & width .~ onlyDef+--                                   & height .~ onlyDef+--                                  )+--                      )+--      & border .~ (def+--                   & bStyle .~ onlyDef+--                   & bColor .~ (def & allS .~ onlyDef)+--                   & bWidth .~ (def & allS .~ onlyDef)+--                   & radius .~ ((def :: BorderRadiusCorners) & allS .~ onlyDef)+--                  )+--      & position .~ [("def", (def,def))]
+ src/MyLib.hs~ view
@@ -0,0 +1,4 @@+module MyLib (someFunc) where++someFunc :: IO ()+someFunc = putStrLn "someFunc"