Skip to content

Instantly share code, notes, and snippets.

Hardy Jones joneshf

Block or report user

Report or block joneshf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Main.purs
module Main where
import Prelude
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE, logShow)
import Data.Foldable (class Foldable)
import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow)
import Data.List (List(Nil, Cons), range)
View Main.purs
module Main where
import Prelude
import Control.Monad.Eff.Console (logShow)
import Data.Bifunctor (lmap)
import Data.Maybe (Maybe(Just, Nothing))
import Data.Tuple (Tuple(Tuple))
import Data.Unfoldable (class Unfoldable, unfoldr)
import TryPureScript (render, withConsole)
@joneshf
joneshf / Main.purs
Created May 14, 2018
mkFnN optimization
View Main.purs
module Main where
import Prelude
import Data.Function.Uncurried (mkFn1)
foo = mkFn1 \_ -> 4
bar = mkFn1 $ const 4
@joneshf
joneshf / Main.purs
Created May 12, 2018
Won't type check
View Main.purs
module Main where
import Prelude
data NoArguments a =
NoArguments
instance functorNoArguments :: Functor NoArguments where
map _ a = a
View Main.purs
module Main where
import Prelude
import Unsafe.Coerce
data FOO
data BAR
data BAZ
data Run (x :: # Type) a
View Main.purs
module Main where
import Prelude
import Data.Foldable (class Foldable, foldl)
import Data.Maybe (Maybe(Just, Nothing))
data NonEmpty a = NonEmpty a (Array a)
instance foldableNonEmpty :: Foldable NonEmpty where
View Main.purs
module Main where
foo :: forall r. ( | r) -> r
foo x = x
bar :: ( | Int)
bar = 1
View Main.purs
module Main where
foo :: forall r. ( | r) -> r
foo x = x
View Main.purs
module Main where
import Prelude
class Codata --where
data Stream a
= Head a (Codata => Stream a)
from :: Int -> Stream Int
View Main.purs
module Main where
import Prelude
import Control.Monad.Eff
import Control.Monad.Eff.Unsafe
import Data.Function.Uncurried
import Unsafe.Coerce
import Control.Monad.Eff.Console as Console
You can’t perform that action at this time.