Skip to content

Instantly share code, notes, and snippets.

@BartAdv
BartAdv / Login.purs
Created January 6, 2017 21:16
Purescript React Redux presentation/container component
module Components.Login where
import Prelude
import React as React
import React.DOM as H
import React.DOM.Props as P
import React (ReactClass, ReactElement, EventHandlerContext, getProps, readState, transformState)
import Unsafe.Coerce (unsafeCoerce)
type FormData = { mail :: String, password :: String }
@BartAdv
BartAdv / test.hs
Created August 6, 2014 13:50
mflow-loop
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-}
module Main where
import Data.String
import MFlow.Wai.Blaze.Html.All hiding (head)
import Text.Blaze.Html5.Attributes as At hiding (step)
import Control.Monad
import Debug.Trace
@BartAdv
BartAdv / Main.idr
Created July 17, 2014 07:24
Leaking abstract type constructor?
module Main
import Test
main : IO ()
main = do
putStrLn $ show $ test "a" 10
@BartAdv
BartAdv / sample.idr
Last active August 29, 2015 14:03
idonteven
data EventType : Type where
Click : EventType
DoubleClick : EventType
data ElementType : Type where
Text : ElementType
Date : ElementType
abstract
data Event : EventType -> ElementType -> Type where
@BartAdv
BartAdv / elems.idr
Last active August 29, 2015 14:03
explicit
data ElementType : Type where
Text : ElementType
Date : ElementType
private
InputProperties : List (String, FTy)
InputProperties = [("disabled", FInt)
,("default", FString)
,("autofocus", FInt)]