fix
This commit is contained in:
parent
4fe7ac911a
commit
41830ea2f2
17
flake.lock
17
flake.lock
|
@ -36,19 +36,18 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715856223,
|
"lastModified": 1715918584,
|
||||||
"narHash": "sha256-Q9I6YbvzGuV9yHtxGxxU10LMQf9AdcsecSszPT7PDuc=",
|
"narHash": "sha256-moioa3ixAZb0y/xxyxUVjSvXoSiDGXy/vAx6B70d2yM=",
|
||||||
"ref": "sexp-parser",
|
"ref": "refs/heads/master",
|
||||||
"rev": "b0a7f96d6569d16b0d27c2f9477d94e5ee39df66",
|
"rev": "831879978213a1aed15ac70aa116c33bcbe964b8",
|
||||||
"revCount": 62,
|
"revCount": 63,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "http://git.hbs2/GmcLB9gEPT4tbx9eyQiECwsu8oPyEh6qKEpQDtyBWVPA"
|
"url": "http://git.hbs2/GmcLB9gEPT4tbx9eyQiECwsu8oPyEh6qKEpQDtyBWVPA?tag=0.1.3.1"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"ref": "sexp-parser",
|
"rev": "831879978213a1aed15ac70aa116c33bcbe964b8",
|
||||||
"rev": "b0a7f96d6569d16b0d27c2f9477d94e5ee39df66",
|
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "http://git.hbs2/GmcLB9gEPT4tbx9eyQiECwsu8oPyEh6qKEpQDtyBWVPA"
|
"url": "http://git.hbs2/GmcLB9gEPT4tbx9eyQiECwsu8oPyEh6qKEpQDtyBWVPA?tag=0.1.3.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"haskell-flake-utils": {
|
"haskell-flake-utils": {
|
||||||
|
|
|
@ -7,7 +7,7 @@ inputs = {
|
||||||
|
|
||||||
fuzzy.url =
|
fuzzy.url =
|
||||||
# "git+http://git.hbs2/GmcLB9gEPT4tbx9eyQiECwsu8oPyEh6qKEpQDtyBWVPA?ref=sexp-parser&rev=bd3a38904864d5cc333974e7b029412607b46871";
|
# "git+http://git.hbs2/GmcLB9gEPT4tbx9eyQiECwsu8oPyEh6qKEpQDtyBWVPA?ref=sexp-parser&rev=bd3a38904864d5cc333974e7b029412607b46871";
|
||||||
"git+http://git.hbs2/GmcLB9gEPT4tbx9eyQiECwsu8oPyEh6qKEpQDtyBWVPA?ref=sexp-parser&rev=b0a7f96d6569d16b0d27c2f9477d94e5ee39df66";
|
"git+http://git.hbs2/GmcLB9gEPT4tbx9eyQiECwsu8oPyEh6qKEpQDtyBWVPA?tag=0.1.3.1&rev=831879978213a1aed15ac70aa116c33bcbe964b8";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
cabal-version: 3.0
|
cabal-version: 3.0
|
||||||
name: suckless-conf
|
name: suckless-conf
|
||||||
version: 0.1.2.4
|
version: 0.1.2.6
|
||||||
-- synopsis:
|
-- synopsis:
|
||||||
-- description:
|
-- description:
|
||||||
license: BSD-3-Clause
|
license: BSD-3-Clause
|
||||||
|
@ -82,7 +82,7 @@ library
|
||||||
, text
|
, text
|
||||||
, vector
|
, vector
|
||||||
, unordered-containers
|
, unordered-containers
|
||||||
, fuzzy-parse >= 0.1.3.0
|
, fuzzy-parse >= 0.1.3.1
|
||||||
|
|
||||||
hs-source-dirs: lib
|
hs-source-dirs: lib
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
@ -109,7 +109,7 @@ test-suite spec
|
||||||
, aeson
|
, aeson
|
||||||
, scientific
|
, scientific
|
||||||
, suckless-conf
|
, suckless-conf
|
||||||
, fuzzy-parse >= 0.1.3.0
|
, fuzzy-parse >= 0.1.3.1
|
||||||
, containers
|
, containers
|
||||||
, mtl
|
, mtl
|
||||||
, text
|
, text
|
||||||
|
@ -125,3 +125,4 @@ test-suite spec
|
||||||
, OverloadedStrings
|
, OverloadedStrings
|
||||||
, ScopedTypeVariables
|
, ScopedTypeVariables
|
||||||
, TypeApplications
|
, TypeApplications
|
||||||
|
|
||||||
|
|
|
@ -60,21 +60,21 @@ spec = do
|
||||||
|
|
||||||
it "reads int" $ do
|
it "reads int" $ do
|
||||||
c <- readConfig [qc|1|] <&> toJSON
|
c <- readConfig [qc|1|] <&> toJSON
|
||||||
c `shouldBe` toJSON [1::Int]
|
c `shouldBe` toJSON [[1::Int]]
|
||||||
|
|
||||||
it "reads scientific" $ do
|
it "reads scientific" $ do
|
||||||
c <- readConfig [qc|1.00|] <&> toJSON
|
c <- readConfig [qc|1.00|] <&> toJSON
|
||||||
c `shouldBe` toJSON [1.00 :: Scientific]
|
c `shouldBe` toJSON [[1.00 :: Scientific]]
|
||||||
|
|
||||||
it "reads bool" $ do
|
it "reads bool" $ do
|
||||||
t <- readConfig [qc|#t|] <&> toJSON . head
|
t <- readConfig [qc|#t|] <&> toJSON . head
|
||||||
t `shouldBe` toJSON (Bool True)
|
t `shouldBe` toJSON [Bool True]
|
||||||
f <- readConfig [qc|#f|] <&> toJSON . head
|
f <- readConfig [qc|#f|] <&> toJSON . head
|
||||||
f `shouldBe` toJSON (Bool False)
|
f `shouldBe` toJSON [Bool False]
|
||||||
|
|
||||||
it "reads string" $ do
|
it "reads string" $ do
|
||||||
s <- readConfig [qc|"somestring"|] <&> toJSON
|
s <- readConfig [qc|"somestring"|] <&> toJSON
|
||||||
s `shouldBe` toJSON ["somestring" :: String]
|
s `shouldBe` toJSON [["somestring" :: String]]
|
||||||
|
|
||||||
it "reads array" $ do
|
it "reads array" $ do
|
||||||
s <- readConfig [qc|(1 2 3 4)|] <&> toJSON . head
|
s <- readConfig [qc|(1 2 3 4)|] <&> toJSON . head
|
||||||
|
|
Loading…
Reference in New Issue