summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfredefox <>2017-05-19 20:25:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2017-05-19 20:25:00 (GMT)
commite4f562024aa82ea9edd49b20e092b212b21c12d4 (patch)
tree7756d7f75fb2887e1df54f7ec28011f7ccec6865
parente3baa641bbe698d8bfb0381aa1a7be28170ac05a (diff)
version 0.1.0.10.1.0.1
-rw-r--r--README.lhs (renamed from app/Example.lhs)0
-rw-r--r--shade.cabal42
2 files changed, 4 insertions, 38 deletions
diff --git a/app/Example.lhs b/README.lhs
index e4ed566..e4ed566 100644
--- a/app/Example.lhs
+++ b/README.lhs
diff --git a/shade.cabal b/shade.cabal
index 5240974..fa8f9c5 100644
--- a/shade.cabal
+++ b/shade.cabal
@@ -1,41 +1,7 @@
name: shade
-version: 0.1.0.0
+version: 0.1.0.1
synopsis: A control structure used to combine heterogenous types with delayed effects.
-description:
- > {-# LANGUAGE MultiParamTypeClasses #-}
- > module Main ( main ) where
- >
- > import Data.Functor.Identity
- > import Control.Monad
- >
- > import Control.Monad.Shade
-
- A shade can be used to save heterogeneous types in containers with the same
- type e.g. using a type-class as a common denominator:
-
- > showshade :: Applicative m => Show a => a -> Shade m String
- > showshade a = pure (show a)
- >
- > hetero :: Shade Identity String
- > hetero = mconcat [ showshade () , showshade 2 , showshade "hej" ]
-
- The values inside a shade are stored in a context. We can swap this context
- by defining a transfer function:
-
- > idToIO :: Identity b -> IO b
- > idToIO (Identity v) = putStrLn "Transferring" *> pure v
-
- The context is switched using `transfer` and we can access the value in this
- new context by using `shadow`:
-
- > runInIO :: Shade Identity a -> IO a
- > runInIO = shadow . transfer idToIO
-
- The point to note about this example is that the values are stored in an
- shades with the identity as context. We can manipulate this context
- including the value. We cannot, however inspect the value since it is
- universally quantified.
-
+description: Please see the readme.
homepage: https://github.com/fredefox/shade#readme
license: BSD3
license-file: LICENSE
@@ -54,8 +20,8 @@ library
default-language: Haskell2010
executable shade
- hs-source-dirs: app
- main-is: Example.lhs
+ hs-source-dirs: .
+ main-is: README.lhs
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends: base
, shade