Find it here: https://github.com/bitemyapp/learnhaskell
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
alias tags='ctags -f tags -h ".php" -R --exclude=".svn" --exclude="*.yml.php" --totals=yes --tag-relative=yes --PHP-kinds=+cf --fields=+afkst --regex-PHP="/@method[ ][^ ]+[ ]+([^ (]*)/\1/f/"' |
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
Moved to https://github.com/tonymorris/type-class |
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
sealed abstract trait Tree | |
case class Leaf(a: String) extends Tree | |
case class Node(l: Tree, r: Tree) extends Tree | |
implicit val treeR: Reads[Tree] = | |
__.read[Leaf].map(x => x:Tree) orElse | |
( | |
(__ \ "l").lazyRead(treeR) and (__ \ "r").lazyRead(treeR) | |
)(Node.apply _).map(x => x:Tree) |
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 Dependency : String -> Type -> Type | |
where MkDep : (name: String) -> a -> Dependency name a | |
DepWrapper : Type -> Type | |
DepWrapper t = (String ** Dependency _ t) | |
dep1 : Dependency "toto" Int |