flag (empty) → 0.1.0.0
raw patch · 5 files changed
+98/−0 lines, 5 filesdep +base
Dependencies added: base
Files
- ChangeLog.md +5/−0
- LICENSE +30/−0
- README.md +14/−0
- flag.cabal +41/−0
- src/Data/Flag.hs +8/−0
+ ChangeLog.md view
@@ -0,0 +1,5 @@+# Changelog for flag++## v0.1.0.0++* Simple flag type.
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright Author name here (c) 2022++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 Author name here 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,14 @@+# flag++## Building++```+nix build+```++## Development++```+nix develop+cabal test all+```
+ flag.cabal view
@@ -0,0 +1,41 @@+cabal-version: 1.12+name: flag+version: 0.1.0.0+synopsis: A simple flag type.+description:+ A simple flag type, parameterised by another type. It can be enabled or disabled.++category: Data+author: Daniel Firth+maintainer: dan.firth@homotopic.tech+copyright: Homotopic.Tech Ltd+license: MIT+license-file: LICENSE+build-type: Simple+extra-source-files:+ ChangeLog.md+ README.md++source-repository head+ type: git+ location: https://gitlab.homotopic.tech/haskell/flag++library+ exposed-modules: Data.Flag+ hs-source-dirs: src+ default-extensions:+ DataKinds+ DeriveFoldable+ DeriveFunctor+ DeriveGeneric+ DeriveTraversable+ DerivingStrategies+ StandaloneKindSignatures++ ghc-options:+ -Weverything -Wno-all-missed-specialisations -Wno-implicit-prelude+ -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module+ -Wno-safe -Wno-unsafe++ build-depends: base >=4.7 && <5+ default-language: Haskell2010
+ src/Data/Flag.hs view
@@ -0,0 +1,8 @@+module Data.Flag (Flag(Enable, Disable)) where++import Data.Kind (Type)+import GHC.Generics (Generic)++type Flag :: Type -> Type+data Flag a = Disable a | Enable a+ deriving stock (Eq, Foldable, Functor, Generic, Ord, Show, Traversable)