I hereby claim:
- I am txsmith on github.
- I am tnsmith (https://keybase.io/tnsmith) on keybase.
- I have a public key ASDjfSE-btAFor86svX0rYm1CMrmD2IT62qbIHjqRYPqkAo
To claim this, I am signing this object:
module ZipAndSplit where | |
import Prelude hiding (map, filter) | |
import Data.Either | |
-- Demonstrate the duality between zip and split | |
-- Typedefinition of streams and the fundamental operations on them | |
data Stream a | |
map :: Stream a -> (a -> b) -> Stream b |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE GADTs #-} | |
module Generators where | |
import Test.QuickCheck | |
import Data.Proxy | |
import Data.Coerce |
{-# Language MultiParamTypeClasses #-} | |
module MutualApplicative where | |
import Control.Applicative | |
data Either2 f g a = | |
Left2 (f a) | |
| Right2 (g a) | |
deriving (Functor) |
object SExprParser { | |
import scala.util.parsing.combinator._ | |
sealed abstract class SExpr | |
case class SList(list: List[SExpr]) extends SExpr | |
case class SSym(symbol: String) extends SExpr | |
case class SNum(num: Int) extends SExpr | |
case class SString(string : String) extends SExpr | |
case class ReaderException(msg:String) extends RuntimeException(msg) |
import scala.language.higherKinds | |
object Fixing { | |
// String representation of a rule expression | |
type UnknownRule = String | |
type LocationID = String |
import scala.annotation.{implicitAmbiguous, implicitNotFound, showAsInfix} | |
import scala.language.higherKinds | |
/** | |
* This is an attempt to replicate Trees that Grow by Shayan Najd and Simon Peyton Jones in Scala. | |
* Paper at: https://www.microsoft.com/en-us/research/uploads/prod/2016/11/trees-that-grow.pdf | |
* The main mechanisms demonstrated in the paper can be recreated in Scala but at a significant boilerplate cost. | |
* The best approach to improve this would be to automatically generate the appy and unapply methods for each AST term | |
* (e.g. with a macro or code generation) | |
*/ |
I hereby claim:
To claim this, I am signing this object: