From 10a80495162cc97f33beea53168da703c627b6f5 Mon Sep 17 00:00:00 2001 From: Brian McKeon Date: Tue, 6 Feb 2024 09:37:15 -0500 Subject: [PATCH] Prepare 0.1.0.1 release. Reformatted. Added workflows. Updated package metadata. --- .github/CODEOWNERS | 1 + .github/workflows/build.yaml | 12 +++++++ .github/workflows/release.yaml | 12 +++++++ .gitignore | 1 + CHANGELOG.md | 9 +++++ Setup.hs | 2 -- fourmolu.yaml | 51 ++++++++++++++++++++++++++ src/Torsor.hs | 11 +++--- stack.yaml | 66 ---------------------------------- torsor.cabal | 46 ++++++++++++++---------- 10 files changed, 117 insertions(+), 94 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/release.yaml create mode 100644 CHANGELOG.md delete mode 100644 Setup.hs create mode 100644 fourmolu.yaml delete mode 100644 stack.yaml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..f6c0b22 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +@byteverse/l3c diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..085bbaf --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,12 @@ +name: build +on: + pull_request: + branches: + - "*" + +jobs: + call-workflow: + uses: byteverse/.github/.github/workflows/build.yaml@main + secrets: inherit + with: + release: false diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..bd0bbd5 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,12 @@ +name: release +on: + push: + tags: + - "*" + +jobs: + call-workflow: + uses: byteverse/.github/.github/workflows/build.yaml@main + secrets: inherit + with: + release: true diff --git a/.gitignore b/.gitignore index 1d5bef5..06906f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.vscode/ *.aux cabal-dev .cabal-sandbox diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e01ded1 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Revision history for torsor + +## 0.1.0.1 -- 2024-02-06 + +* Update package metadata. + +## 0.1 -- 2017-10-23 + +* Initial release. diff --git a/Setup.hs b/Setup.hs deleted file mode 100644 index 9a994af..0000000 --- a/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/fourmolu.yaml b/fourmolu.yaml new file mode 100644 index 0000000..40cd005 --- /dev/null +++ b/fourmolu.yaml @@ -0,0 +1,51 @@ +# Number of spaces per indentation step +indentation: 2 + +# Max line length for automatic line breaking +column-limit: 200 + +# Styling of arrows in type signatures (choices: trailing, leading, or leading-args) +function-arrows: trailing + +# How to place commas in multi-line lists, records, etc. (choices: leading or trailing) +comma-style: leading + +# Styling of import/export lists (choices: leading, trailing, or diff-friendly) +import-export-style: leading + +# Whether to full-indent or half-indent 'where' bindings past the preceding body +indent-wheres: false + +# Whether to leave a space before an opening record brace +record-brace-space: true + +# Number of spaces between top-level declarations +newlines-between-decls: 1 + +# How to print Haddock comments (choices: single-line, multi-line, or multi-line-compact) +haddock-style: multi-line + +# How to print module docstring +haddock-style-module: null + +# Styling of let blocks (choices: auto, inline, newline, or mixed) +let-style: auto + +# How to align the 'in' keyword with respect to the 'let' keyword (choices: left-align, right-align, or no-space) +in-style: right-align + +# Whether to put parentheses around a single constraint (choices: auto, always, or never) +single-constraint-parens: always + +# Output Unicode syntax (choices: detect, always, or never) +unicode: never + +# Give the programmer more choice on where to insert blank lines +respectful: true + +# Fixity information for operators +fixities: [] + +# Module reexports Fourmolu should know about +reexports: [] + diff --git a/src/Torsor.hs b/src/Torsor.hs index 386e318..a51f1f3 100644 --- a/src/Torsor.hs +++ b/src/Torsor.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {- | The typeclasses provides in this module are equivalent @@ -7,11 +6,10 @@ instead of type families in order to improved error messages. -} - module Torsor - ( Additive(..) - , Torsor(..) - , Scaling(..) + ( Additive (..) + , Torsor (..) + , Scaling (..) ) where import Data.Int @@ -23,7 +21,7 @@ class Additive v where plus :: v -> v -> v minus :: v -> v -> v -class Additive v => Torsor p v | p -> v where +class (Additive v) => Torsor p v | p -> v where add :: v -> p -> p difference :: p -> p -> v @@ -172,4 +170,3 @@ instance Torsor Int8 Int8 where instance Scaling Int8 Int8 where scale = (*) - diff --git a/stack.yaml b/stack.yaml deleted file mode 100644 index d23db63..0000000 --- a/stack.yaml +++ /dev/null @@ -1,66 +0,0 @@ -# This file was automatically generated by 'stack init' -# -# Some commonly used options have been documented as comments in this file. -# For advanced use and comprehensive documentation of the format, please see: -# https://docs.haskellstack.org/en/stable/yaml_configuration/ - -# Resolver to choose a 'specific' stackage snapshot or a compiler version. -# A snapshot resolver dictates the compiler version and the set of packages -# to be used for project dependencies. For example: -# -# resolver: lts-3.5 -# resolver: nightly-2015-09-21 -# resolver: ghc-7.10.2 -# resolver: ghcjs-0.1.0_ghc-7.10.2 -# resolver: -# name: custom-snapshot -# location: "./custom-snapshot.yaml" -resolver: lts-9.10 - -# User packages to be built. -# Various formats can be used as shown in the example below. -# -# packages: -# - some-directory -# - https://example.com/foo/bar/baz-0.0.2.tar.gz -# - location: -# git: https://github.com/commercialhaskell/stack.git -# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a -# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a -# extra-dep: true -# subdirs: -# - auto-update -# - wai -# -# A package marked 'extra-dep: true' will only be built if demanded by a -# non-dependency (i.e. a user package), and its test suites and benchmarks -# will not be run. This is useful for tweaking upstream packages. -packages: -- . -# Dependency packages to be pulled from upstream that are not in the resolver -# (e.g., acme-missiles-0.3) -extra-deps: [] - -# Override default flag values for local packages and extra-deps -flags: {} - -# Extra package databases containing global packages -extra-package-dbs: [] - -# Control whether we use the GHC we find on the path -# system-ghc: true -# -# Require a specific version of stack, using version ranges -# require-stack-version: -any # Default -# require-stack-version: ">=1.5" -# -# Override the architecture used by stack, especially useful on Windows -# arch: i386 -# arch: x86_64 -# -# Extra directories used by stack for building -# extra-include-dirs: [/path/to/dir] -# extra-lib-dirs: [/path/to/dir] -# -# Allow a newer minor version of GHC than the snapshot specifies -# compiler-check: newer-minor \ No newline at end of file diff --git a/torsor.cabal b/torsor.cabal index 999c312..f94baf4 100644 --- a/torsor.cabal +++ b/torsor.cabal @@ -1,24 +1,32 @@ -name: torsor -version: 0.1 -synopsis: Torsor Typeclass -description: Torsor Typeclass -homepage: https://github.com/andrewthad/torsor#readme -license: BSD3 -license-file: LICENSE -author: Andrew Martin -maintainer: andrew.thaddeus@gmail.com -copyright: 2017 Andrew Martin -category: Web -build-type: Simple -extra-source-files: README.md -cabal-version: >=1.10 +cabal-version: 2.4 +name: torsor +version: 0.1.0.1 +synopsis: Torsor Typeclass +description: Torsor Typeclass. +homepage: https://github.com/byteverse/torsor +bug-reports: https://github.com/byteverse/torsor/issues +license: BSD-3-Clause +license-file: LICENSE +author: Andrew Martin +maintainer: amartin@layer3com.com +copyright: 2017 Andrew Martin +category: Web +build-type: Simple +extra-doc-files: + CHANGELOG.md + README.md + +common build-settings + default-language: Haskell2010 + ghc-options: -Wall -Wunused-packages library - hs-source-dirs: src + import: build-settings + hs-source-dirs: src exposed-modules: Torsor - build-depends: base >= 4.7 && < 5 - default-language: Haskell2010 + build-depends: base >=4.7 && <5 + ghc-options: -O2 source-repository head - type: git - location: https://github.com/andrewthad/torsor + type: git + location: git://github.com/byteverse/torsor.git