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 Prim.RowList (kind RowList, Nil, Cons) | |
import Type.Data.RowList (RLProxy(..)) | |
import Prim.Row (class Cons, class Lacks) as Row | |
import Data.Symbol (SProxy(..), class IsSymbol) | |
import Record as Record |
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 Effect (Effect) | |
import Data.Foldable (fold) | |
import TryPureScript (h1, h2, p, text, list, indent, link, render, code) | |
newtype Reader ctx a = Reader (ctx -> a) |
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 Effect.Console (logShow) | |
import Data.Typelevel.Num (D1, D2, D5, D0, D100) | |
import Data.Typelevel.Num.Reps (NumCons) | |
import Data.Typelevel.Undefined (undefined) | |
import Data.Typelevel.Num (class Nat, d1, d3, d9, toInt, class Gt, class Lt) | |
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.Typelevel.Num (class Gt, class Lt, class Nat, D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, toInt') | |
import Data.Typelevel.Num.Reps (type (:*)) | |
import Effect (Effect) | |
import Effect.Console (logShow) | |
import Prim.Symbol (class Append, class Cons) as Symbol | |
import Type.Prelude (SProxy(..)) |
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 | |
type X = X {} |
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.Either (Either(..)) | |
import Data.Functor.Variant (class VariantFMatchCases) | |
import Prim.Row (class Union) | |
import Prim.RowList (class RowToList, kind RowList) | |
import Prim.RowList (Cons, Nil) as RL | |
import Prim.Row (class Cons, class Lacks) as Row |
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 Effect (Effect) | |
import Effect.Ref (read, new, write) as Ref | |
import Data.Maybe (Maybe(..)) | |
memoizeEffect :: forall a. Effect a -> Effect (Effect a) |
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 Prim.Row (class Nub, class Union) | |
class Nub' (i :: # Type) (o :: # Type) | i -> o | |
instance nub' :: (Nub i o) => Nub' i o |
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 Prim.RowList (Nil, Cons, kind RowList) | |
import Type.Prelude (RLProxy(..)) | |
-- | Remove all occurences of a given label from a RowList | |
class RowListRemove (label :: Symbol) |
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 Control.Apply (lift2) | |
mXY :: forall a b m. Apply m => m a -> m b -> m { x :: a, y :: b } | |
mXY foo bar = {x: _, y: _ } <$> foo <*> bar | |
mXY' :: forall a b m. Apply m => m a -> m b -> m { x :: a, y :: b } |