diff --git a/cabal.project b/cabal.project index d70d2ba..dc5aeae 100644 --- a/cabal.project +++ b/cabal.project @@ -4,4 +4,5 @@ packages: termbox-bindings-hs, termbox-bindings-c, termbox-tea, - termbox2-bindings-c + termbox2-bindings-c, + termbox2-bindings-hs diff --git a/termbox2-bindings-c/termbox2-bindings-c.cabal b/termbox2-bindings-c/termbox2-bindings-c.cabal index 59d340e..dafcc92 100644 --- a/termbox2-bindings-c/termbox2-bindings-c.cabal +++ b/termbox2-bindings-c/termbox2-bindings-c.cabal @@ -10,6 +10,10 @@ description: . The full source of @termbox2@ is bundled; you do not need to install any system packages to use this library. + . + See also: + . + * @@ for higher-level bindings. homepage: https://github.com/awkward-squad/termbox license-file: LICENSE license: BSD-3-Clause diff --git a/termbox2-bindings-hs/CHANGELOG.md b/termbox2-bindings-hs/CHANGELOG.md new file mode 100644 index 0000000..0f89141 --- /dev/null +++ b/termbox2-bindings-hs/CHANGELOG.md @@ -0,0 +1,3 @@ +## [1.0.0] - Unreleased + +- Initial release diff --git a/termbox2-bindings-hs/LICENSE b/termbox2-bindings-hs/LICENSE new file mode 100644 index 0000000..45a2b2d --- /dev/null +++ b/termbox2-bindings-hs/LICENSE @@ -0,0 +1,11 @@ +Copyright 2023 Mitchell Rosen, Travis Staton + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/termbox2-bindings-hs/src/Termbox2/Bindings/Hs.hs b/termbox2-bindings-hs/src/Termbox2/Bindings/Hs.hs new file mode 100644 index 0000000..0a443d3 --- /dev/null +++ b/termbox2-bindings-hs/src/Termbox2/Bindings/Hs.hs @@ -0,0 +1 @@ +module Termbox2.Bindings.Hs where diff --git a/termbox2-bindings-hs/termbox2-bindings-hs.cabal b/termbox2-bindings-hs/termbox2-bindings-hs.cabal new file mode 100644 index 0000000..5fe9b6c --- /dev/null +++ b/termbox2-bindings-hs/termbox2-bindings-hs.cabal @@ -0,0 +1,72 @@ +cabal-version: 2.4 + +author: Mitchell Rosen +bug-reports: https://github.com/awkward-squad/termbox/issues +build-type: Simple +category: User Interfaces +copyright: (c) 2023 Mitchell Rosen, Travis Staton +description: + This package provides bindings to @termbox2@, a simple C library for writing text-based user interfaces: + + . + The full source of @termbox2@ is bundled; you do not need to install any system packages to use this library. + . + See also: + . + * @@ for lower-level bindings. +homepage: https://github.com/awkward-squad/termbox +license-file: LICENSE +license: BSD-3-Clause +maintainer: Mitchell Rosen , Travis Staton +name: termbox2-bindings-hs +synopsis: termbox2 bindings +tested-with: GHC == 9.6.3, GHC == 9.8.1 +version: 1.0.0 + +extra-doc-files: + CHANGELOG.md + +source-repository head + type: git + location: git://github.com/awkward-squad/termbox.git + subdir: termbox2-bindings-hs + +-- flag build-examples +-- default: False +-- manual: True + +common component + default-language: GHC2021 + ghc-options: + -Weverything + -Wno-all-missed-specialisations + -Wno-implicit-prelude + -Wno-missing-import-lists + -Wno-missing-kind-signatures + -Wno-missing-local-signatures + -Wno-missing-safe-haskell-mode + -Wno-monomorphism-restriction + -Wno-prepositive-qualified-module + -Wno-safe + -Wno-unsafe + if impl(ghc >= 9.8) + ghc-options: + -Wno-missing-role-annotations + +library + import: component + build-depends: + base ^>= 4.18 || ^>= 4.19, + termbox2-bindings-c ^>= 1.0.0, + exposed-modules: Termbox2.Bindings.Hs + hs-source-dirs: src + +-- executable termbox2-bindings-hs-example-demo +-- import: component +-- if !flag(build-examples) +-- buildable: False +-- build-depends: +-- base, +-- termbox2-bindings-hs +-- hs-source-dirs: examples +-- main-is: Demo.hs