LPFP 1.1.3 → 1.1.4
raw patch · 8 files changed
+21/−25 lines, 8 filesdep −SpatialMathdep ~Visdep ~containers
Dependencies removed: SpatialMath
Dependency ranges changed: Vis, containers
Files
- LPFP.cabal +13/−15
- app/VisAnimate.hs +0/−1
- app/VisDisplay3.hs +0/−1
- src/LPFP/CoordinateSystems.hs +1/−1
- src/LPFP/ElectricField.hs +1/−1
- src/LPFP/Integrals.hs +1/−1
- src/LPFP/MOExamples.hs +2/−2
- src/LPFP/Mechanics3D.hs +3/−3
LPFP.cabal view
@@ -1,5 +1,5 @@ name: LPFP-version: 1.1.3+version: 1.1.4 synopsis: Code for the book Learn Physics with Functional Programming description: Haskell code to help the user learn mechanics of one particle, mechanics of multiple interacting particles, and electromagnetic theory.@@ -35,13 +35,13 @@ hs-source-dirs: src build-depends: base >= 4.7 && < 5,- SpatialMath >= 0.2.7 && < 0.3, containers >= 0.6.7 && < 0.7,- Vis >= 0.7.7 && < 0.8,+ Vis >= 1.0.0 && < 1.1, diagrams-cairo >= 1.4.2 && < 1.5, diagrams-lib >= 1.4.6 && < 1.5, gloss >= 1.13.2 && < 1.14,- gnuplot >= 0.5.7 && < 0.6+ gnuplot >= 0.5.7 && < 0.6,+ linear >= 1.22 && < 1.24 default-language: Haskell2010 executable LPFP-hello@@ -128,7 +128,7 @@ build-depends: LPFP , base >=4.7 && <5- , Vis >= 0.7.7 && < 0.8+ , Vis >= 1.0.0 && < 1.1 default-language: Haskell2010 executable LPFP-VisDisplay2@@ -139,7 +139,7 @@ build-depends: LPFP , base >=4.7 && <5- , Vis >= 0.7.7 && < 0.8+ , Vis >= 1.0.0 && < 1.1 , linear >= 1.22 && < 1.24 default-language: Haskell2010 @@ -151,8 +151,7 @@ build-depends: LPFP , base >=4.7 && <5- , Vis >= 0.7.7 && < 0.8- , SpatialMath >= 0.2.7 && < 0.3+ , Vis >= 1.0.0 && < 1.1 , linear >= 1.22 && < 1.24 default-language: Haskell2010 @@ -164,8 +163,7 @@ build-depends: LPFP , base >=4.7 && <5- , Vis >= 0.7.7 && < 0.8- , SpatialMath >= 0.2.7 && < 0.3+ , Vis >= 1.0.0 && < 1.1 default-language: Haskell2010 executable LPFP-VisSimulate@@ -176,7 +174,7 @@ build-depends: LPFP , base >=4.7 && <5- , Vis >= 0.7.7 && < 0.8+ , Vis >= 1.0.0 && < 1.1 default-language: Haskell2010 executable LPFP-GlossHalley@@ -209,7 +207,7 @@ build-depends: LPFP , base >=4.7 && <5- , Vis >= 0.7.7 && < 0.8+ , Vis >= 1.0.0 && < 1.1 default-language: Haskell2010 executable LPFP-Mech3Proton@@ -237,7 +235,7 @@ executable LPFP-VisTwoSprings main-is: VisTwoSprings.hs hs-source-dirs: app- build-depends: LPFP, base >=4.7 && <5, Vis >= 0.7.7 && < 0.8+ build-depends: LPFP, base >=4.7 && <5, Vis >= 1.0.0 && < 1.1 default-language: Haskell2010 executable LPFP-GlossBilliard@@ -286,7 +284,7 @@ build-depends: LPFP , base >=4.7 && <5- , Vis >= 0.7.7 && < 0.8+ , Vis >= 1.0.0 && < 1.1 default-language: Haskell2010 executable LPFP-Hydrogen@@ -297,7 +295,7 @@ build-depends: LPFP , base >=4.7 && <5- , Vis >= 0.7.7 && < 0.8+ , Vis >= 1.0.0 && < 1.1 default-language: Haskell2010 executable LPFP-ElectricWave
app/VisAnimate.hs view
@@ -1,7 +1,6 @@ {-# OPTIONS -Wall #-} import Vis-import SpatialMath rotatingCube :: Float -> VisObject Float rotatingCube t = RotEulerRad (Euler 0 0 t) (Cube 1 Solid blue)
app/VisDisplay3.hs view
@@ -2,7 +2,6 @@ import Vis import Linear-import SpatialMath type R = Double
src/LPFP/CoordinateSystems.hs view
@@ -18,7 +18,7 @@ import LPFP.Mechanics3D ( orient, v3FromVec ) import LPFP.MOExamples ( Table(..), Justification(..) ) import qualified Vis as V-import SpatialMath ( V3(..) )+import Linear ( V3(..) ) import Diagrams.Prelude ( Diagram, V2(..), PolyType(..), PolyOrientation(..), PolygonOpts(..) , (#), (@@), dims, p2, r2, arrowAt, position, fc, black, white
src/LPFP/ElectricField.hs view
@@ -192,7 +192,7 @@ segments :: Int -> Curve -> [Segment] segments n (Curve g a b) = let ps = map g $ linSpaced n a b- in zip ps (tail ps)+ in zip ps (drop 1 ps) linSpaced :: Int -> R -> R -> [R] linSpaced n x0 x1 = take (n+1) [x0, x0+dx .. x1]
src/LPFP/Integrals.hs view
@@ -60,7 +60,7 @@ segments :: Int -> Curve -> [Segment] segments n (Curve g a b) = let ps = map g $ linSpaced n a b- in zip ps (tail ps)+ in zip ps (drop 1 ps) linSpaced :: Int -> R -> R -> [R] linSpaced n x0 x1 = take (n+1) [x0, x0+dx .. x1]
src/LPFP/MOExamples.hs view
@@ -149,7 +149,7 @@ percentChangePMag :: [MultiParticleState] -> R percentChangePMag mpsts- = let p0 = systemP (head mpsts)+ = let p0 = systemP (mpsts !! 0) p1 = systemP (last mpsts) in 100 * magnitude (p1 ^-^ p0) / magnitude p0 @@ -212,7 +212,7 @@ percentChangeKE :: [MultiParticleState] -> R percentChangeKE mpsts- = let ke0 = systemKE (head mpsts)+ = let ke0 = systemKE (mpsts !! 0) ke1 = systemKE (last mpsts) in 100 * (ke1 - ke0) / ke0
src/LPFP/Mechanics3D.hs view
@@ -3,7 +3,7 @@ {- | Module : LPFP.Mechanics3D-Copyright : (c) Scott N. Walck 2023+Copyright : (c) Scott N. Walck 2024 License : BSD3 (see LICENSE) Maintainer : Scott N. Walck <walck@lvc.edu> Stability : stable@@ -19,8 +19,8 @@ import LPFP.Mechanics1D ( RealVectorSpace(..), Diff(..), NumericalMethod , Time, TimeStep, rungeKutta4, solver )-import SpatialMath- ( V3(..), Euler(..) )+import Vis ( Euler(..) )+import Linear ( V3(..) ) import Graphics.Gnuplot.Simple ( Attribute(..), Aspect(..), plotFunc, plotPaths ) import qualified Graphics.Gloss as G