packages feed

adjunction (empty) → 0.0.0.0

raw patch · 8 files changed

+157/−0 lines, 8 filesdep +adjunctiondep +basedep +gauge

Dependencies added: adjunction, base, gauge, hs-functors

Files

+ CHANGELOG.md view
@@ -0,0 +1,11 @@+# Changelog++`adjunction.hs` uses [PVP Versioning][1].+The changelog is available [on GitHub][2].++## 0.0.0.0++* Initially created.++[1]: https://pvp.haskell.org+[2]: https://github.com/strake/adjunction.hs/releases
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright (c) 2020, M Farkas-Dyck++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * 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.++    * Neither the name of M Farkas-Dyck nor the names of other+      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+OWNER 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.
+ README.md view
@@ -0,0 +1,7 @@+# adjunction.hs++[![Build status](https://img.shields.io/travis/strake/adjunction.hs.svg?logo=travis)](https://travis-ci.org/strake/adjunction.hs)+[![Hackage](https://img.shields.io/hackage/v/adjunction.hs.svg?logo=haskell)](https://hackage.haskell.org/package/adjunction.hs)+[![MPL-2.0 license](https://img.shields.io/badge/license-MPL--2.0-blue.svg)](LICENSE)++See README for more info
+ adjunction.cabal view
@@ -0,0 +1,80 @@+cabal-version:       2.4+name:                adjunction+version:             0.0.0.0+synopsis:            See README for more info+description:         See README for more info+homepage:            https://github.com/strake/adjunction.hs+bug-reports:         https://github.com/strake/adjunction.hs/issues+license:             BSD-3-Clause+license-file:        LICENSE+author:              M Farkas-Dyck+maintainer:          strake888@gmail.com+copyright:           2020 M Farkas-Dyck+category:            Adjunctions, Math+build-type:          Simple+extra-doc-files:     README.md+                   , CHANGELOG.md+tested-with:         GHC == 8.6.5++common c+  build-depends:       base ^>= 4.12 || ^>= 4.13+                     , hs-functors ^>= 0.1.6.0+  ghc-options:       -Wall+                     -Wcompat+                     -Wredundant-constraints+                     -Wno-name-shadowing+                     -Wincomplete-uni-patterns+                     -Wincomplete-record-updates+                     -Werror=incomplete-patterns+                     -Werror=incomplete-uni-patterns+                     -Werror=incomplete-record-updates+                     -Werror=missing-fields+                     -Werror=missing-methods+  default-language:    Haskell2010+  default-extensions:  UnicodeSyntax+                       LambdaCase+                       EmptyCase+                       InstanceSigs+                       PartialTypeSignatures+                       PolyKinds+                       ConstraintKinds+                       FlexibleContexts+                       FlexibleInstances+                       MonadComprehensions+                       StandaloneDeriving+                       DeriveFunctor+                       DeriveFoldable+                       DeriveTraversable++library+  import:              c+  hs-source-dirs:      src+  exposed-modules:+    Data.Functor.Adjoint+    Data.Functor.Rep+  build-depends:++test-suite test+  import:              c+  type:                exitcode-stdio-1.0+  hs-source-dirs:      test+  main-is:             Spec.hs+  build-depends:       adjunction+  ghc-options:         -threaded+                       -rtsopts+                       -with-rtsopts=-N++benchmark bench+  import:              c+  type:                exitcode-stdio-1.0+  hs-source-dirs:      bench+  main-is:             Main.hs+  build-depends:       gauge+                     , adjunction+  ghc-options:         -threaded+                       -rtsopts+                       -with-rtsopts=-N++source-repository head+  type:                git+  location:            https://github.com/strake/adjunction.hs.git
+ bench/Main.hs view
@@ -0,0 +1,7 @@+module Main (main) where++import Gauge.Main+++main :: IO ()+main = defaultMain [bench "const" (whnf const ())]
+ src/Data/Functor/Adjoint.hs view
@@ -0,0 +1,9 @@+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE FunctionalDependencies #-}+module Data.Functor.Adjoint where++class (Functor f, Functor g) => Adjoint f g | f -> g, g -> f where+    unit :: a -> g (f a)+    counit :: f (g a) -> a+    leftAdjunct :: (f a -> b) -> a -> g b+    rightAdjunct :: (a -> g b) -> f a -> b
+ src/Data/Functor/Rep.hs view
@@ -0,0 +1,9 @@+{-# LANGUAGE TypeFamilies #-}+module Data.Functor.Rep where++import Data.Cotraversable++class Cotraversable f => Representable f where+    type Rep f+    tabulate :: (Rep f -> a) -> f a+    index :: f a -> Rep f -> a
+ test/Spec.hs view
@@ -0,0 +1,4 @@+module Main (main) where++main :: IO ()+main = putStrLn ("Test suite not yet implemented" :: String)