diff --git a/.gitignore b/.gitignore index ccefee9..8ee1bf9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -*.cabal .stack-work diff --git a/bcp47-orphans/bcp47-orphans.cabal b/bcp47-orphans/bcp47-orphans.cabal new file mode 100644 index 0000000..7bfeec9 --- /dev/null +++ b/bcp47-orphans/bcp47-orphans.cabal @@ -0,0 +1,75 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.33.0. +-- +-- see: https://github.com/sol/hpack +-- +-- hash: 2748e77da174f71232f27cb4e4b57e2883938f8d823bbef034820a95fc7001ce + +name: bcp47-orphans +version: 0.1.0.0 +synopsis: BCP47 orphan instances +description: Orphan instances for the BCP47 type +category: Orphan Instances +homepage: https://github.com/freckle/bcp47#readme +bug-reports: https://github.com/freckle/bcp47/issues +author: Evan Rutledge Borden +maintainer: engineering@freckle.com +copyright: 2019 Freckle Education +license: MIT +license-file: LICENSE +build-type: Simple +extra-source-files: + README.md + ChangeLog.md + +source-repository head + type: git + location: https://github.com/freckle/bcp47 + +library + exposed-modules: + Data.BCP47.Csv + Data.BCP47.Esqueleto + Data.BCP47.Hashable + Data.BCP47.HttpApiData + Data.BCP47.PathPieces + Data.BCP47.Persist + other-modules: + Paths_bcp47_orphans + hs-source-dirs: + library + build-depends: + base >=4.7 && <5 + , bcp47 + , cassava + , errors + , esqueleto + , hashable + , http-api-data + , path-pieces + , persistent + , text + default-language: Haskell2010 + +test-suite spec + type: exitcode-stdio-1.0 + main-is: Main.hs + other-modules: + Data.BCP47.CsvSpec + Data.BCP47.PathPiecesSpec + Data.BCP47.PersistSpec + Data.BCP47.Roundtrip + Paths_bcp47_orphans + hs-source-dirs: + tests + build-depends: + QuickCheck + , base >=4.7 && <5 + , bcp47 + , bcp47-orphans + , cassava + , hspec + , path-pieces + , persistent + default-language: Haskell2010 diff --git a/bcp47/bcp47.cabal b/bcp47/bcp47.cabal new file mode 100644 index 0000000..c82ea43 --- /dev/null +++ b/bcp47/bcp47.cabal @@ -0,0 +1,111 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.33.0. +-- +-- see: https://github.com/sol/hpack +-- +-- hash: 7ce0af13e684c6f99cbf6a190a99eff76e6c20c4b7f777cdeb5ddd50df646ad0 + +name: bcp47 +version: 0.1.0.0 +synopsis: Language tags as specified by BCP 47 +description: /Language tags for use in cases where it is desirable to indicate the/ + /language used in an information object./ + . + / - / + . + This package exposes a language tag data type 'BCP47' and a 'Trie' data + structure for collecting and querying information that varies based on + language tag. + . + > import Data.BCP47 (en, enGB, sw) + > import Data.BCP47.Trie (Trie, fromList, lookup) + > + > color :: Trie Text + > color = fromList [(en, "color"), (sw, "rangi")] + > + > main = do + > print $ match en color -- Just "color" + > print $ match enGB color -- Nothing + > print $ lookup enGB color -- Just "color" +category: Data, Data Structures +homepage: https://github.com/freckle/bcp47#readme +bug-reports: https://github.com/freckle/bcp47/issues +author: Evan Rutledge Borden +maintainer: engineering@freckle.com +copyright: 2019 Freckle Education +license: MIT +license-file: LICENSE +build-type: Simple +extra-source-files: + README.md + ChangeLog.md + +source-repository head + type: git + location: https://github.com/freckle/bcp47 + +library + exposed-modules: + Data.BCP47 + Data.BCP47.Internal.Arbitrary + Data.BCP47.Internal.Extension + Data.BCP47.Internal.Language + Data.BCP47.Internal.LanguageExtension + Data.BCP47.Internal.Parser + Data.BCP47.Internal.PrivateUse + Data.BCP47.Internal.Region + Data.BCP47.Internal.Script + Data.BCP47.Internal.Subtags + Data.BCP47.Internal.Variant + Data.BCP47.Trie + Data.BCP47.Trie.Internal + other-modules: + Paths_bcp47 + hs-source-dirs: + library + build-depends: + QuickCheck + , aeson + , base >=4.7 && <5 + , containers + , country + , generic-arbitrary + , iso639 + , megaparsec + , text + default-language: Haskell2010 + +test-suite doctest + type: exitcode-stdio-1.0 + main-is: Main.hs + other-modules: + Paths_bcp47 + hs-source-dirs: + doctest + build-depends: + base >=4.7 && <5 + , doctest + , megaparsec + default-language: Haskell2010 + +test-suite spec + type: exitcode-stdio-1.0 + main-is: Main.hs + other-modules: + Data.BCP47.TrieSpec + Data.BCP47Spec + Paths_bcp47 + hs-source-dirs: + tests + build-depends: + QuickCheck + , aeson + , base >=4.7 && <5 + , bcp47 + , containers + , country + , hspec + , iso639 + , text + default-language: Haskell2010