learn-physics 0.6.4 → 0.6.5
raw patch · 12 files changed
+41/−37 lines, 12 filesdep ~gnuplotPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: gnuplot
API changes (from Hackage documentation)
+ Physics.Learn.CarrotVec: type R = Double
+ Physics.Learn.CommonVec: type R = Double
- Physics.Learn: vec :: Double -> Double -> Double -> Vec
+ Physics.Learn: vec :: R -> R -> R -> Vec
- Physics.Learn: xComp :: Vec -> Double
+ Physics.Learn: xComp :: Vec -> R
- Physics.Learn: yComp :: Vec -> Double
+ Physics.Learn: yComp :: Vec -> R
- Physics.Learn: zComp :: Vec -> Double
+ Physics.Learn: zComp :: Vec -> R
- Physics.Learn.CarrotVec: vec :: Double -> Double -> Double -> Vec
+ Physics.Learn.CarrotVec: vec :: R -> R -> R -> Vec
- Physics.Learn.CarrotVec: xComp :: Vec -> Double
+ Physics.Learn.CarrotVec: xComp :: Vec -> R
- Physics.Learn.CarrotVec: yComp :: Vec -> Double
+ Physics.Learn.CarrotVec: yComp :: Vec -> R
- Physics.Learn.CarrotVec: zComp :: Vec -> Double
+ Physics.Learn.CarrotVec: zComp :: Vec -> R
- Physics.Learn.CommonVec: Vec :: Double -> Double -> Double -> Vec
+ Physics.Learn.CommonVec: Vec :: R -> R -> R -> Vec
- Physics.Learn.CommonVec: [xComp] :: Vec -> Double
+ Physics.Learn.CommonVec: [xComp] :: Vec -> R
- Physics.Learn.CommonVec: [yComp] :: Vec -> Double
+ Physics.Learn.CommonVec: [yComp] :: Vec -> R
- Physics.Learn.CommonVec: [zComp] :: Vec -> Double
+ Physics.Learn.CommonVec: [zComp] :: Vec -> R
- Physics.Learn.CommonVec: vec :: Double -> Double -> Double -> Vec
+ Physics.Learn.CommonVec: vec :: R -> R -> R -> Vec
- Physics.Learn.SimpleVec: vec :: Double -> Double -> Double -> Vec
+ Physics.Learn.SimpleVec: vec :: R -> R -> R -> Vec
- Physics.Learn.SimpleVec: xComp :: Vec -> Double
+ Physics.Learn.SimpleVec: xComp :: Vec -> R
- Physics.Learn.SimpleVec: yComp :: Vec -> Double
+ Physics.Learn.SimpleVec: yComp :: Vec -> R
- Physics.Learn.SimpleVec: zComp :: Vec -> Double
+ Physics.Learn.SimpleVec: zComp :: Vec -> R
Files
- LICENSE +1/−1
- learn-physics.cabal +10/−10
- src/Physics/Learn/CarrotVec.hs +4/−2
- src/Physics/Learn/Charge.hs +2/−2
- src/Physics/Learn/CommonVec.hs +10/−7
- src/Physics/Learn/Current.hs +2/−2
- src/Physics/Learn/Mechanics.hs +2/−2
- src/Physics/Learn/RungeKutta.hs +2/−2
- src/Physics/Learn/SimpleVec.hs +2/−3
- src/Physics/Learn/StateSpace.hs +2/−2
- src/Physics/Learn/Surface.hs +2/−2
- src/Physics/Learn/Volume.hs +2/−2
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2011-2016 Scott N. Walck <walck@lvc.edu>.+Copyright (c) 2011-2020 Scott N. Walck <walck@lvc.edu>. All rights reserved. Redistribution and use in source and binary forms, with or without
learn-physics.cabal view
@@ -1,5 +1,5 @@ Name: learn-physics-Version: 0.6.4+Version: 0.6.5 Synopsis: Haskell code for learning physics Description: A library of functions for vector calculus, calculation of electric field, electric flux,@@ -38,11 +38,11 @@ Physics.Learn.Visual.PlotTools Physics.Learn.Visual.VisTools Physics.Learn.Volume- Build-depends: base >= 4.7 && < 4.13,+ Build-depends: base >= 4.7 && < 5, vector-space >= 0.8.4, hmatrix >= 0.17, gloss >= 1.8,- gnuplot >= 0.5 && < 0.6,+ gnuplot >= 0.5, not-gloss >= 0.5.0.4, spatial-math >= 0.2 Hs-source-dirs: src@@ -54,44 +54,44 @@ Executable learn-physics-PlaneWave Main-is: examples/src/PlaneWave.hs Build-depends: not-gloss >= 0.7.4,- base >= 4.5 && < 4.13,+ base >= 4.5 && < 5, learn-physics Executable learn-physics-eFieldLine3D Main-is: examples/src/eFieldLine3D.hs Build-depends: not-gloss >= 0.7.4,- base >= 4.5 && < 4.13,+ base >= 4.5 && < 5, learn-physics Executable learn-physics-LorentzForceSimulation Main-is: examples/src/LorentzForceSimulation.hs Build-depends: not-gloss >= 0.7.4, spatial-math >= 0.2,- base >= 4.5 && < 4.13,+ base >= 4.5 && < 5, learn-physics Executable learn-physics-BCircularLoop Main-is: examples/src/BCircularLoop.hs Build-depends: not-gloss >= 0.7.4,- base >= 4.5 && < 4.13,+ base >= 4.5 && < 5, learn-physics Executable learn-physics-sunEarth Main-is: examples/src/sunEarthRK4.hs Build-depends: gloss >= 1.8,- base >= 4.5 && < 4.13,+ base >= 4.5 && < 5, learn-physics Executable learn-physics-eFieldLine2D Main-is: examples/src/eFieldLine2D.hs Build-depends: gloss >= 1.8,- base >= 4.5 && < 4.13,+ base >= 4.5 && < 5, learn-physics Executable learn-physics-Projectile Main-is: examples/src/Projectile.hs Build-depends: gnuplot >= 0.5,- base >= 4.5 && < 4.13,+ base >= 4.5 && < 5, learn-physics Executable learn-physics-NMR
src/Physics/Learn/CarrotVec.hs view
@@ -4,7 +4,7 @@ {- | Module : Physics.Learn.CarrotVec-Copyright : (c) Scott N. Walck 2011-2018+Copyright : (c) Scott N. Walck 2011-2019 License : BSD3 (see LICENSE) Maintainer : Scott N. Walck <walck@lvc.edu> Stability : experimental@@ -26,6 +26,7 @@ module Physics.Learn.CarrotVec ( Vec+ , R , xComp , yComp , zComp@@ -65,6 +66,7 @@ ) import Physics.Learn.CommonVec ( Vec(..)+ , R , xComp , yComp , zComp@@ -81,7 +83,7 @@ Vec ax ay az ^+^ Vec bx by bz = Vec (ax+bx) (ay+by) (az+bz) instance VectorSpace Vec where- type Scalar Vec = Double+ type Scalar Vec = R c *^ Vec ax ay az = Vec (c*ax) (c*ay) (c*az) instance InnerSpace Vec where
src/Physics/Learn/Charge.hs view
@@ -1,9 +1,9 @@ {-# OPTIONS_GHC -Wall #-}-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE Safe #-} {- | Module : Physics.Learn.Charge-Copyright : (c) Scott N. Walck 2011-2014+Copyright : (c) Scott N. Walck 2011-2019 License : BSD3 (see LICENSE) Maintainer : Scott N. Walck <walck@lvc.edu> Stability : experimental
src/Physics/Learn/CommonVec.hs view
@@ -3,7 +3,7 @@ {- | Module : Physics.Learn.CommonVec-Copyright : (c) Scott N. Walck 2012-2014+Copyright : (c) Scott N. Walck 2012-2019 License : BSD3 (see LICENSE) Maintainer : Scott N. Walck <walck@lvc.edu> Stability : experimental@@ -23,6 +23,7 @@ module Physics.Learn.CommonVec ( Vec(..)+ , R , vec , (><) , iHat@@ -33,10 +34,12 @@ infixl 7 >< +type R = Double+ -- | A type for vectors.-data Vec = Vec { xComp :: Double -- ^ x component- , yComp :: Double -- ^ y component- , zComp :: Double -- ^ z component+data Vec = Vec { xComp :: R -- ^ x component+ , yComp :: R -- ^ y component+ , zComp :: R -- ^ z component } deriving (Eq) instance Show Vec where@@ -50,9 +53,9 @@ | otherwise = show x -- | Form a vector by giving its x, y, and z components.-vec :: Double -- ^ x component- -> Double -- ^ y component- -> Double -- ^ z component+vec :: R -- ^ x component+ -> R -- ^ y component+ -> R -- ^ z component -> Vec vec = Vec
src/Physics/Learn/Current.hs view
@@ -1,9 +1,9 @@ {-# OPTIONS_GHC -Wall #-}-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE Safe #-} {- | Module : Physics.Learn.Current-Copyright : (c) Scott N. Walck 2012-2014+Copyright : (c) Scott N. Walck 2012-2019 License : BSD3 (see LICENSE) Maintainer : Scott N. Walck <walck@lvc.edu> Stability : experimental
src/Physics/Learn/Mechanics.hs view
@@ -1,10 +1,10 @@ {-# OPTIONS_GHC -Wall #-} {-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE Safe #-} {- | Module : Physics.Learn.Mechanics-Copyright : (c) Scott N. Walck 2014+Copyright : (c) Scott N. Walck 2014-2019 License : BSD3 (see LICENSE) Maintainer : Scott N. Walck <walck@lvc.edu> Stability : experimental
src/Physics/Learn/RungeKutta.hs view
@@ -1,10 +1,10 @@ {-# OPTIONS_GHC -Wall #-} {-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE Safe #-} {- | Module : Physics.Learn.RungeKutta-Copyright : (c) Scott N. Walck 2012-2014+Copyright : (c) Scott N. Walck 2012-2019 License : BSD3 (see LICENSE) Maintainer : Scott N. Walck <walck@lvc.edu> Stability : experimental
src/Physics/Learn/SimpleVec.hs view
@@ -3,7 +3,7 @@ {- | Module : Physics.Learn.SimpleVec-Copyright : (c) Scott N. Walck 2012-2018+Copyright : (c) Scott N. Walck 2012-2019 License : BSD3 (see LICENSE) Maintainer : Scott N. Walck <walck@lvc.edu> Stability : experimental@@ -43,6 +43,7 @@ import Physics.Learn.CommonVec ( Vec(..)+ , R , vec , iHat , jHat@@ -56,8 +57,6 @@ infixl 7 ^* infixl 7 ^/ infixl 7 <.>--type R = Double -- | The zero vector. zeroV :: Vec
src/Physics/Learn/StateSpace.hs view
@@ -1,10 +1,10 @@ {-# OPTIONS_GHC -Wall -fno-warn-orphans #-} {-# LANGUAGE FlexibleContexts, FlexibleInstances, TypeFamilies #-}-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE Safe #-} {- | Module : Physics.Learn.StateSpace-Copyright : (c) Scott N. Walck 2014+Copyright : (c) Scott N. Walck 2014-2019 License : BSD3 (see LICENSE) Maintainer : Scott N. Walck <walck@lvc.edu> Stability : experimental
src/Physics/Learn/Surface.hs view
@@ -1,10 +1,10 @@ {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wall #-}-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE Safe #-} {- | Module : Physics.Learn.Surface-Copyright : (c) Scott N. Walck 2012-2014+Copyright : (c) Scott N. Walck 2012-2019 License : BSD3 (see LICENSE) Maintainer : Scott N. Walck <walck@lvc.edu> Stability : experimental
src/Physics/Learn/Volume.hs view
@@ -1,10 +1,10 @@ {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wall #-}-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE Safe #-} {- | Module : Physics.Learn.Volume-Copyright : (c) Scott N. Walck 2012-2014+Copyright : (c) Scott N. Walck 2012-2019 License : BSD3 (see LICENSE) Maintainer : Scott N. Walck <walck@lvc.edu> Stability : experimental