SUSE Package Hub 15 one-click install
Install ghc-codo-notation
NOTE: This one-click installation requires that the SUSE Package Hub extension to already be enabled.
See http://packagehub.suse.com/how-to-use/ for information on enabling the Package Hub extension
If the extension is not enabled, this installation will fail while trying to enable an invalid repo.
This package might depend on packages from SUSE Linux Enterprise modules. If those modules are not enabled, a package dependency error will be encountered.
SUSE-PackageHub-15-Standard-Pool
Package Hub 15
Dummy repo - this will fail
-
ghc-codo-notation
A notation for comonads, analogous to the do-notation for monads
A notation for comonads, analogous to the do-notation for monads.
Requires the 'TemplateHaskell' and 'QuasiQuotes' extensions.
Example 1:
' {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes
import Control.Comonad import Language.Haskell.Codo
foo :: (Comonad c, Num a) => c a -> a foo = [codo| x => extract x + 1 |] '
Example 2:
' import Data.Monoid instance Monoid Double where     mempty =
0.0     mappend = (+)
differentiate f = ((f 0.001) - f 0) / 0.001
minima :: (Double -> Double) -> Bool minima = [codo| f => f' <- differentiate f
                    
f'' <- differentiate f'
                    
(extract f' < 0.001) && (extract f'' > 0) |] '
Further explanation of the syntax can be found in the following (short) paper:
<http://www.cl.cam.ac.uk/~dao29/drafts/codo-notation-orchard-ifl12.pdf> with a
numer of examples.
Further examples can be found here:
<https://github.com/dorchard/codo-notation>.
SUSE Package Hub 15 one-click install
Install ghc-codo-notation
NOTE: This one-click installation requires that the SUSE Package Hub extension to already be enabled.
See http://packagehub.suse.com/how-to-use/ for information on enabling the Package Hub extension
If the extension is not enabled, this installation will fail while trying to enable an invalid repo.
This package might depend on packages from SUSE Linux Enterprise modules. If those modules are not enabled, a package dependency error will be encountered.
SUSE-PackageHub-15-Standard-Pool
Package Hub 15
Dummy repo - this will fail
-
ghc-codo-notation
A notation for comonads, analogous to the do-notation for monads
A notation for comonads, analogous to the do-notation for monads.
Requires the 'TemplateHaskell' and 'QuasiQuotes' extensions.
Example 1:
' {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes
import Control.Comonad import Language.Haskell.Codo
foo :: (Comonad c, Num a) => c a -> a foo = [codo| x => extract x + 1 |] '
Example 2:
' import Data.Monoid instance Monoid Double where     mempty =
0.0     mappend = (+)
differentiate f = ((f 0.001) - f 0) / 0.001
minima :: (Double -> Double) -> Bool minima = [codo| f => f' <- differentiate f
                    
f'' <- differentiate f'
                    
(extract f' < 0.001) && (extract f'' > 0) |] '
Further explanation of the syntax can be found in the following (short) paper:
<http://www.cl.cam.ac.uk/~dao29/drafts/codo-notation-orchard-ifl12.pdf> with a
numer of examples.
Further examples can be found here:
<https://github.com/dorchard/codo-notation>.