From 50fbe028cb2ef5e3646ce5ab59077be68f5a0df1 Mon Sep 17 00:00:00 2001 From: Marc Scholten Date: Mon, 20 May 2024 14:00:23 +0200 Subject: [PATCH] Moved IHP.ServerSideComponent.* to ihp-ssc package --- NixSupport/haskell-packages/ihp-ssc.nix | 9 +++ devenv-module.nix | 1 + .../Controller/ComponentsController.hs | 0 .../ControllerFunctions.hs | 0 .../IHP}/ServerSideComponent/HtmlDiff.hs | 0 .../IHP}/ServerSideComponent/HtmlParser.hs | 0 .../ServerSideComponent/RouterFunctions.hs | 0 .../IHP}/ServerSideComponent/Types.hs | 0 .../IHP}/ServerSideComponent/ViewFunctions.hs | 0 ihp-ssc/ihp-ssc.cabal | 58 +++++++++++++++++++ ihp.cabal | 9 --- 11 files changed, 68 insertions(+), 9 deletions(-) create mode 100644 NixSupport/haskell-packages/ihp-ssc.nix rename {IHP => ihp-ssc/IHP}/ServerSideComponent/Controller/ComponentsController.hs (100%) rename {IHP => ihp-ssc/IHP}/ServerSideComponent/ControllerFunctions.hs (100%) rename {IHP => ihp-ssc/IHP}/ServerSideComponent/HtmlDiff.hs (100%) rename {IHP => ihp-ssc/IHP}/ServerSideComponent/HtmlParser.hs (100%) rename {IHP => ihp-ssc/IHP}/ServerSideComponent/RouterFunctions.hs (100%) rename {IHP => ihp-ssc/IHP}/ServerSideComponent/Types.hs (100%) rename {IHP => ihp-ssc/IHP}/ServerSideComponent/ViewFunctions.hs (100%) create mode 100644 ihp-ssc/ihp-ssc.cabal diff --git a/NixSupport/haskell-packages/ihp-ssc.nix b/NixSupport/haskell-packages/ihp-ssc.nix new file mode 100644 index 000000000..ea641b782 --- /dev/null +++ b/NixSupport/haskell-packages/ihp-ssc.nix @@ -0,0 +1,9 @@ +{ mkDerivation, ihp, lib, aeson, megaparsec, bytestring, wai, websockets, ihp-hsx, base, string-conversions, basic-prelude, text, blaze-html, attoparsec }: +mkDerivation { + pname = "ihp-ssc"; + version = "1.3.0"; + src = ./../../ihp-ssc; + libraryHaskellDepends = [ ihp aeson megaparsec bytestring wai websockets ihp-hsx base string-conversions basic-prelude text blaze-html attoparsec ]; + description = "Server Side Components for IHP"; + license = lib.licenses.mit; +} \ No newline at end of file diff --git a/devenv-module.nix b/devenv-module.nix index 20dae91cc..27f364120 100644 --- a/devenv-module.nix +++ b/devenv-module.nix @@ -117,6 +117,7 @@ that is defined in flake-module.nix packages = { default = ghcCompiler.ihp; ide = ghcCompiler.ihp-ide; + ssc = ghcCompiler.ihp-ssc; }; }; } diff --git a/IHP/ServerSideComponent/Controller/ComponentsController.hs b/ihp-ssc/IHP/ServerSideComponent/Controller/ComponentsController.hs similarity index 100% rename from IHP/ServerSideComponent/Controller/ComponentsController.hs rename to ihp-ssc/IHP/ServerSideComponent/Controller/ComponentsController.hs diff --git a/IHP/ServerSideComponent/ControllerFunctions.hs b/ihp-ssc/IHP/ServerSideComponent/ControllerFunctions.hs similarity index 100% rename from IHP/ServerSideComponent/ControllerFunctions.hs rename to ihp-ssc/IHP/ServerSideComponent/ControllerFunctions.hs diff --git a/IHP/ServerSideComponent/HtmlDiff.hs b/ihp-ssc/IHP/ServerSideComponent/HtmlDiff.hs similarity index 100% rename from IHP/ServerSideComponent/HtmlDiff.hs rename to ihp-ssc/IHP/ServerSideComponent/HtmlDiff.hs diff --git a/IHP/ServerSideComponent/HtmlParser.hs b/ihp-ssc/IHP/ServerSideComponent/HtmlParser.hs similarity index 100% rename from IHP/ServerSideComponent/HtmlParser.hs rename to ihp-ssc/IHP/ServerSideComponent/HtmlParser.hs diff --git a/IHP/ServerSideComponent/RouterFunctions.hs b/ihp-ssc/IHP/ServerSideComponent/RouterFunctions.hs similarity index 100% rename from IHP/ServerSideComponent/RouterFunctions.hs rename to ihp-ssc/IHP/ServerSideComponent/RouterFunctions.hs diff --git a/IHP/ServerSideComponent/Types.hs b/ihp-ssc/IHP/ServerSideComponent/Types.hs similarity index 100% rename from IHP/ServerSideComponent/Types.hs rename to ihp-ssc/IHP/ServerSideComponent/Types.hs diff --git a/IHP/ServerSideComponent/ViewFunctions.hs b/ihp-ssc/IHP/ServerSideComponent/ViewFunctions.hs similarity index 100% rename from IHP/ServerSideComponent/ViewFunctions.hs rename to ihp-ssc/IHP/ServerSideComponent/ViewFunctions.hs diff --git a/ihp-ssc/ihp-ssc.cabal b/ihp-ssc/ihp-ssc.cabal new file mode 100644 index 000000000..1b530ad4d --- /dev/null +++ b/ihp-ssc/ihp-ssc.cabal @@ -0,0 +1,58 @@ +cabal-version: 2.2 +name: ihp-ssc +version: 1.3.0 +synopsis: Server Side Components for IHP +description: IHP Server-Side Components provide a toolkit for building interactive client-side functionality without needing to write too much JavaScript. +license: NONE +author: digitally induced GmbH +maintainer: hello@digitallyinduced.com +-- copyright: +-- category: +build-type: Simple + +library + default-language: Haskell2010 + default-extensions: + OverloadedStrings + , NoImplicitPrelude + , ImplicitParams + , Rank2Types + , NamedFieldPuns + , TypeSynonymInstances + , FlexibleInstances + , DisambiguateRecordFields + , DuplicateRecordFields + , OverloadedLabels + , FlexibleContexts + , DataKinds + , QuasiQuotes + , TypeFamilies + , PackageImports + , ScopedTypeVariables + , RecordWildCards + , TypeApplications + , DataKinds + , InstanceSigs + , DeriveGeneric + , MultiParamTypeClasses + , TypeOperators + , DeriveDataTypeable + , DefaultSignatures + , BangPatterns + , FunctionalDependencies + , PartialTypeSignatures + , BlockArguments + , LambdaCase + , StandaloneDeriving + , TemplateHaskell + , OverloadedRecordDot + hs-source-dirs: . + build-depends: ihp, aeson, megaparsec, bytestring, wai, websockets, ihp-hsx, base, string-conversions, basic-prelude, text, blaze-html, attoparsec + exposed-modules: + IHP.ServerSideComponent.Types + , IHP.ServerSideComponent.ViewFunctions + , IHP.ServerSideComponent.RouterFunctions + , IHP.ServerSideComponent.ControllerFunctions + , IHP.ServerSideComponent.Controller.ComponentsController + , IHP.ServerSideComponent.HtmlDiff + , IHP.ServerSideComponent.HtmlParser \ No newline at end of file diff --git a/ihp.cabal b/ihp.cabal index d7c5c8eaf..1b02adf1a 100644 --- a/ihp.cabal +++ b/ihp.cabal @@ -63,7 +63,6 @@ common shared-properties , process , typerep-map , basic-prelude - , megaparsec , async , network , unliftio @@ -261,14 +260,6 @@ library , IHP.PageHead.ViewFunctions , IHP.Assets.Types , IHP.Assets.ViewFunctions - -- Server Side Component Modules - , IHP.ServerSideComponent.Types - , IHP.ServerSideComponent.ViewFunctions - , IHP.ServerSideComponent.RouterFunctions - , IHP.ServerSideComponent.ControllerFunctions - , IHP.ServerSideComponent.Controller.ComponentsController - , IHP.ServerSideComponent.HtmlDiff - , IHP.ServerSideComponent.HtmlParser , IHP.Breadcrumb.Types , IHP.Breadcrumb.ViewFunctions , IHP.FileStorage.Types