This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +turion is my Bitcoin username. You can send me #bitcoin here: https://onename.io/turion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Package: sci-mathematics/agda-2.4.2.5 | |
* Repository: haskell | |
* Maintainer: [email protected] [email protected] | |
* USE: abi_x86_64 amd64 cpphs doc elibc_glibc hoogle kernel_linux stdlib userland_GNU | |
* FEATURES: preserve-libs sandbox userpriv usersandbox | |
>>> Unpacking source... | |
>>> Unpacking Agda-2.4.2.5.tar.gz to /var/tmp/portage/sci-mathematics/agda-2.4.2.5/work | |
>>> Source unpacked in /var/tmp/portage/sci-mathematics/agda-2.4.2.5/work | |
>>> Preparing source in /var/tmp/portage/sci-mathematics/agda-2.4.2.5/work/Agda-2.4.2.5 ... | |
* CHDEP: 'zlib >= 0.4.0.1 && < 0.6.1' -> 'zlib >= 0.4.0.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
record Live a where | |
constructor LiveC | |
state : Type | |
step : state -> (a, state) | |
bind : Live (Live a) -> Live a | |
bind {a} (LiveC state1 step1) = LiveC newstate f where | |
f (sta1 ** st2) = (?aVal, (?st1' ** ?st2')) | |
newstate : Type | |
newstate = (st1 : state1 ** state (fst (step1 st1))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Prelude hiding ((.), id) | |
import Control.Category | |
import Control.Arrow | |
data Stream a = Stream | |
{ headS :: a | |
, tailS :: Stream a | |
} | |
deriving Show |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DataKinds #-} | |
data Cell m a b = ... | |
instance Monad m => Arrow (Cell m) where | |
arr :: (a -> b) -> Cell m a b | |
(***) :: Cell m a1 b1 | |
-> Cell m a2 b2 | |
-> Cell m (a1, a2) (b1, b2) | |
instance Monad m => Functor (Cell m a) where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE ApplicativeDo #-} | |
module StreamT where | |
-- base | |
import Control.Arrow | |
data StreamT m a = StreamT { unStreamT :: m (a, StreamT m a) } | |
instance Functor m => Functor (StreamT m) where | |
fmap f = StreamT . fmap (f *** fmap f) . unStreamT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data ProbT m a where | |
ProbT :: m [(Double, a)] -> ProbT m a -- sum double = 1 | |
| GaussianDist | |
:: Double -- | Mean | |
-> Double -- | Width | |
-> ProbT m Double | |
| ... | |
return a = [(1, a)] | |
-- Real system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE Arrows #-} | |
{-# LANGUAGE DefaultSignatures #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE TupleSections #-} | |
-- base | |
import Control.Arrow | |
import Control.Category | |
import Control.Concurrent | |
import Control.Monad (guard, (>=>), void) |