From 379282f1be9ab788bacedceb2ea60acef055c1f7 Mon Sep 17 00:00:00 2001 From: Richard Marko Date: Tue, 16 Aug 2022 08:12:15 +0200 Subject: [PATCH 1/2] Handle .scad file updates as well --- src/Graphics/Implicit/Viewer/Loaders.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Graphics/Implicit/Viewer/Loaders.hs b/src/Graphics/Implicit/Viewer/Loaders.hs index f935524..7cf5721 100644 --- a/src/Graphics/Implicit/Viewer/Loaders.hs +++ b/src/Graphics/Implicit/Viewer/Loaders.hs @@ -45,6 +45,7 @@ runUpdater modFileRel initialResolution renderChan = void $ do eventFilter :: FSNotify.ActionPredicate eventFilter (FSNotify.Modified fp _ _) | ".hs" `isSuffixOf` fp = True + | ".scad" `isSuffixOf` fp = True | ".escad" `isSuffixOf` fp = True eventFilter _ = False From e43f7cf08a87dd8e8b92dcd668bb619084d54fa3 Mon Sep 17 00:00:00 2001 From: Richard Marko Date: Tue, 16 Aug 2022 08:56:55 +0200 Subject: [PATCH 2/2] use and require released implicit 0.4 --- cabal.project.local.ci | 11 +++++------ default.nix | 2 +- implicitpipe.cabal | 6 +++--- overlay.nix | 14 +++++++------- src/Graphics/Implicit/Viewer/Demos.hs | 3 ++- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cabal.project.local.ci b/cabal.project.local.ci index 7ad7366..45739e5 100644 --- a/cabal.project.local.ci +++ b/cabal.project.local.ci @@ -1,11 +1,10 @@ -- NOTE: having implicit listed here breaks hint -- see https://github.com/Haskell-Things/implicitpipe/issues/2 --- but it is required for CI now --- until 0.4 -source-repository-package - type: git - location: https://github.com/Haskell-Things/ImplicitCAD - tag: ae794b901e9677593815fad741d87ff56846562d +-- +-- source-repository-package +-- type: git +-- location: https://github.com/Haskell-Things/ImplicitCAD +-- tag: ae794b901e9677593815fad741d87ff56846562d -- fork due to resizeBuffer PR https://github.com/tobbebex/GPipe-Core/pull/76 source-repository-package diff --git a/default.nix b/default.nix index d474d65..d796be9 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,4 @@ -{ rev ? "c542baa0c894796c92a8173dead027f3b952c22e" +{ rev ? "7c6985653708c5fade76d2014824ff333b0a07b2" , overlays ? [ (import ./overlay.nix) ] , pkgs ? if ((rev == "") || (rev == "default") || (rev == "local")) diff --git a/implicitpipe.cabal b/implicitpipe.cabal index 74396af..9f78271 100644 --- a/implicitpipe.cabal +++ b/implicitpipe.cabal @@ -20,11 +20,11 @@ library , directory , filepath , fsnotify - , GPipe >=2.2 - , GPipe-GLFW >=1.4 + , GPipe >= 2.2 + , GPipe-GLFW >= 1.4 , GLFW-b , hint - , implicit + , implicit >= 0.4 , linear , optparse-applicative , stm diff --git a/overlay.nix b/overlay.nix index 106cfab..40409c0 100644 --- a/overlay.nix +++ b/overlay.nix @@ -25,13 +25,13 @@ in GPipe = hsuper.callCabal2nix "GPipe" "${gpipeSrc}/GPipe-Core" {}; GPipe-GLFW = hsuper.callCabal2nix "GPipe-GLFW" ("${gpipeGlfwSrc}/GPipe-GLFW") {}; - # until > 4.0.0 is out - implicit = hsuper.callCabal2nix "implicit" (super.fetchFromGitHub { - owner = "Haskell-Things"; - repo = "ImplicitCAD"; - rev = "ae794b901e9677593815fad741d87ff56846562d"; - sha256 = "0q8bj3jysgl7kfivrag8g6yx58n5rxf69qsc3lw43941lamaxpda"; - }) {}; + # for development + # implicit = hsuper.callCabal2nix "implicit" (super.fetchFromGitHub { + # owner = "Haskell-Things"; + # repo = "ImplicitCAD"; + # rev = "ae794b901e9677593815fad741d87ff56846562d"; + # sha256 = "0q8bj3jysgl7kfivrag8g6yx58n5rxf69qsc3lw43941lamaxpda"; + # }) {}; }); }); }) diff --git a/src/Graphics/Implicit/Viewer/Demos.hs b/src/Graphics/Implicit/Viewer/Demos.hs index 12f4304..e1d8515 100644 --- a/src/Graphics/Implicit/Viewer/Demos.hs +++ b/src/Graphics/Implicit/Viewer/Demos.hs @@ -1,4 +1,5 @@ {-# OPTIONS_GHC -fno-warn-type-defaults #-} +{-# LANGUAGE FlexibleContexts #-} module Graphics.Implicit.Viewer.Demos where import Linear @@ -95,7 +96,7 @@ sph = implicit (\(V2 x y) -> 10*x^(2 :: Int) + y^(2 :: Int) - 1) (pure (-10), (p -- (sphere (sqrt (3 * (n/2) ^2) )) -- @ mixed - :: (Object obj vec, Semigroup obj) + :: (Object obj f Double, Semigroup obj) => ℝ -> obj -> obj