Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Writer w a = Writer {}
- data Symbol :: *
- put :: Var v -> a -> Writer `[v :-> a]` ()
- data k :-> v :: Symbol -> * -> *
- type IsSet s = (~) [k] s (Nub k (Sort k s))
- data Set n :: [*] -> * where
- union :: Unionable s t => Set s -> Set t -> Set (Union * s t)
- data Var k :: Symbol -> * where
- type Union s t = Nub k (Sort k (Append k s t))
- type Unionable s t = (Sortable (Append * s t), Nubable (Sort * (Append * s t)))
Documentation
Provides an effect-parameterised version of the writer monad. Effects are sets of variable-type pairs, providing an effect system for writer effects.
data k :-> v :: Symbol -> * -> *
(Show (Var k), Show v) => Show ((:->) k v) | |
(Monoid u, Nubable ((:) * ((:->) k u) s)) => Nubable ((:) * ((:->) k u) ((:) * ((:->) k u) s)) | Define the operation for removing duplicates using mappend |
Update ((:) * ((:->) u ((:!) b s)) as) as' => Update ((:) * ((:->) v ((:!) a W)) ((:) * ((:->) u ((:!) b s)) as)) as' | |
Update ((:) * ((:->) v ((:!) a R)) as) as' => Update ((:) * ((:->) v ((:!) a W)) ((:) * ((:->) v ((:!) b R)) as)) as' | |
Update ((:) * ((:->) u ((:!) b s)) as) as' => Update ((:) * ((:->) v ((:!) a R)) ((:) * ((:->) u ((:!) b s)) as)) ((:) * ((:->) v ((:!) a R)) as') | |
type Cmp * ((:->) v a) ((:->) u b) = CmpSymbol v u |
data Set n :: [*] -> * where