Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
niki
authored and
niki
committed
Jun 16, 2016
1 parent
e38eca0
commit 2a25776
Showing
3 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- see the Category issue | ||
- set-up atom | ||
- see Jeff's thread on Monoids | ||
- write a prefix checker | ||
- check the parser paper | ||
- check gab's slides |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{-# LANGUAGE GADTs #-} | ||
import Control.Category | ||
import Prelude hiding ((.), id) | ||
|
||
|
||
{- | ||
class Category cat where | ||
id :: cat a a | ||
(.) :: cat b c -> cat a b -> cat a c | ||
-} | ||
|
||
data Accum a b where | ||
Accum :: s -> Accum a b | ||
|
||
-- | We can pass the outputs of one 'Accum' as the inputs of the next. | ||
instance Category Accum where | ||
Accum i1 . Accum i2 = Accum (i1, i2) |