matrix-as-xyz 0.1.1.0 → 0.1.1.1
raw patch · 4 files changed
+25/−9 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- matrix-as-xyz.cabal +2/−2
- src/Data/Matrix/AsXYZ/Parse.hs +11/−7
- test/AsXYZSpec.hs +8/−0
ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for matrix-as-xyz +## 0.1.1.1 -- 2018-06-09++* 大文字が使用できなかった不具合の修正+ ## 0.1.1.0 -- 2018-06-05 * CabalからStackに変更
matrix-as-xyz.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 19899810c3d6696ddbcceefa6fcb228661c87238cefcfc1bcdde512fba3dd8ba+-- hash: 6a225e76b978422309693298bada20249ab7d6023ddf7a05d2bdb4df6072a42b name: matrix-as-xyz-version: 0.1.1.0+version: 0.1.1.1 synopsis: Read and Display representation of matrix like "x,y,z" description: Please see the README on GitHub at <https://github.com/narumij/matrix-as-xyz#readme> category: Chemistry
src/Data/Matrix/AsXYZ/Parse.hs view
@@ -17,6 +17,7 @@ ) where import Control.Monad+import Data.Char import Data.Maybe import Data.List import Text.ParserCombinators.Parsec@@ -95,13 +96,16 @@ fmap f (Z a) = Z (f a) fmap f (W a) = W (f a) -v (Just 'x') = X-v (Just 'a') = X-v (Just 'y') = Y-v (Just 'b') = Y-v (Just 'z') = Z-v (Just 'c') = Z-v Nothing = W+v c = f $ toLower <$> c+ where+ f (Just 'x') = X+ f (Just 'a') = X+ f (Just 'y') = Y+ f (Just 'b') = Y+ f (Just 'z') = Z+ f (Just 'c') = Z+ f (Just 'Z') = Z+ f Nothing = W sign :: CharParser () Char sign = oneOf "-+"
test/AsXYZSpec.hs view
@@ -18,6 +18,14 @@ it "read x,y,z" $ do fromXYZ "x,y,z" `shouldBe` (identity 4) + it "read X,Y,Z" $ do+ fromXYZ "X,Y,Z" `shouldBe` (identity 4)++ it "read a,b,c" $ do+ fromABC "a,b,c" `shouldBe` (identity 4)++ it "read A,B,C" $ do+ fromABC "A,B,C" `shouldBe` (identity 4) describe "Data.Matrix.AsXYZ.prettyXYZ" $ do