packages feed

within 0.1.0.0 → 0.1.0.1

raw patch · 4 files changed

+16/−16 lines, 4 filessetup-changed

Files

LICENSE view
@@ -1,4 +1,4 @@-Copyright Author name here (c) 2020+Copyright Daniel Firth (c) 2020  All rights reserved. 
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
src/Within.hs view
@@ -1,11 +1,10 @@-{-# LANGUAGE DeriveFoldable        #-}-{-# LANGUAGE DeriveFunctor         #-}+{-# LANGUAGE DeriveGeneric         #-} {-# LANGUAGE DeriveTraversable     #-} {-# LANGUAGE FlexibleInstances     #-} {-# LANGUAGE MultiParamTypeClasses #-} module Within (   WithinT(..)-, Within(..)+, Within , localDir , localDirM , asWithin@@ -28,14 +27,9 @@ import           GHC.Generics import           Path --- | Transform the environment of an `EnvT` via some monadic operation. This didn't seem to--- exist anywhere but it used for some internal operations.-localM :: Monad m => (e -> m e') -> EnvT e w a -> m (EnvT e' w a)-localM f (EnvT e wa) = f e >>= \e' -> return $ EnvT e' wa- -- | The Within Type, newtype wrapper around `EnvT` specialised to a `Path b Dir` environment. newtype WithinT b w a = WithinT (EnvT (Path b Dir) w a)-  deriving (Functor, Foldable, Traversable)+  deriving (Typeable, Generic, Functor, Foldable, Traversable)  type Within b a = WithinT b Identity a @@ -82,7 +76,10 @@   hashWithSalt n (WithinT (EnvT e (Identity a))) = n `hashWithSalt` e `hashWithSalt` a  instance Show t => Show (Within b t) where-  show (WithinT (EnvT e a)) = show e ++ "/" ++ show a+  show (WithinT (EnvT e (Identity a))) = show e ++ "/" ++ show a++instance Ord t => Ord (Within b t) where+  compare (WithinT (EnvT e (Identity a))) (WithinT (EnvT e' (Identity a'))) = compare e e' <> compare a a'  -- | Switch the outer part of a `Within` value to a new directory, synonym for localDir . const blinkLocalDir :: Path b Dir -> WithinT a w t -> WithinT b w t
within.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.34.2. -- -- see: https://github.com/sol/hpack ----- hash: e6c160a7690f01c363fdf8c27b7042b52b5854b49d157968cc37dcc201eb3885+-- hash: 4fe50e2bb8e837484075a1efe1da6929fa12cd785089aca1eb16501946ee34ed  name:           within-version:        0.1.0.0+version:        0.1.0.1 synopsis:       A value within another path. description:    Simple newtype for representing a value within a well-typed directory. Useful for when you need to jump between directories and change filenames independently. Uses the path library. category:       Filesystem@@ -21,6 +21,10 @@     README.md     ChangeLog.md +source-repository head+  type: git+  location: https://gitlab.com/homotopic-tech/within+ library   exposed-modules:       Within@@ -28,6 +32,7 @@       Paths_within   hs-source-dirs:       src+  ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints   build-depends:       base >=4.7 && <5     , comonad