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
module Main where | |
import Prelude | |
import Data.Exists (Exists, mkExists, runExists) | |
import Unsafe.Coerce (unsafeCoerce) | |
-- Leibniz equality: | |
-- Two things are equal if they are substitutable in all contexts. | |
type Leib a b = forall f. f a -> f b |
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
module Main where | |
import Prelude | |
import Data.Maybe | |
import Data.Either | |
import Data.Tuple | |
import Data.List | |
import Data.Profunctor |
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
module Main where | |
import Prelude | |
import Color (white) | |
import Color.Scheme.MaterialDesign (blueGrey) | |
import Control.Monad.Eff (Eff) | |
import Control.MonadZero (guard) | |
import Data.Array (sortBy, (..)) | |
import Data.Foldable (foldMap) |
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
module Deriv | |
import Control.Isomorphism | |
-- | |
-- A type constructor df is the derivative of the type constructor f if for all x and e there exists d such | |
-- such that | |
-- | |
-- f (x + e) ~ f x + e * (df x) + e^2 * d | |
-- |
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
:f bower_components/purescript-prelude/src/Prelude.js | |
:m bower_components/purescript-prelude/src/Prelude.purs | |
:f bower_components/purescript-eff/src/Control/Monad/Eff.js | |
:m bower_components/purescript-eff/src/Control/Monad/Eff.purs | |
:f bower_components/purescript-console/src/Control/Monad/Eff/Console.js | |
:m bower_components/purescript-console/src/Control/Monad/Eff/Console.purs | |
:f bower_components/purescript-eff/src/Control/Monad/Eff/Unsafe.js | |
:m bower_components/purescript-eff/src/Control/Monad/Eff/Unsafe.purs | |
import Prelude | |
import Control.Monad.Eff.Console |
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
## Current owners | |
- Typechecker (Phil) | |
- Modules (Gary) | |
- Corefn optimization and codegen (Gary) | |
- Core libraries (Gary) | |
- IDE integration (Christoph) | |
- Pursuit (Harry) | |
- PSCi (Phil) | |
- Docs repo (Harry) |
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 Zero = Zero | |
data Succ a = Succ a | |
pred = \s -> case s of Succ a -> a | |
meters = \n -> | |
{ multiply: \v -> v { value = n * v.value, meters = Succ (v.meters) } | |
, divide: \v -> v { value = n / v.value, meters = pred (v.meters) } | |
} |
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 Zero = Zero | |
data Succ a = Succ a | |
pred = \s -> case s of Succ a -> a | |
meters = \n v -> v { value = n * v.value, meters = Succ (v.meters) } | |
seconds = \n v -> v { value = n * v.value, seconds = Succ (v.seconds) } |
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 PolymorphicComponents, GeneralizedNewtypeDeriving, DeriveDataTypeable #-} | |
import Data.Data | |
import Data.Maybe | |
import Data.Generics | |
import Data.Monoid | |
import Control.Applicative | |
import Control.Monad.State | |
import Control.Monad.Logic | |
import Control.Monad.Logic.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
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
import Control.Applicative (Applicative(..), Alternative(..)) | |
import Data.Function (fix) | |
import qualified Control.Category as C | |
import Control.Category ((>>>)) | |
import qualified Control.Arrow as A | |
import Control.Arrow ((***)) | |
newtype Pattern a b = Pattern { runPattern :: A.Kleisli Maybe a b } deriving (C.Category, A.Arrow) |