Skip to content

Instantly share code, notes, and snippets.

View rgrempel's full-sized avatar

Ryan Rempel rgrempel

View GitHub Profile
@rgrempel
rgrempel / Main.purs
Created June 30, 2016 22:41
Alternative approach to effect types in Purescript
module Control.Monad.Eff.Alt where
import Control.Bind (bind)
import Control.Monad.Eff.Exception (Error)
import Partial.Unsafe (unsafeCrashWith)
import Prelude (liftA1, class Functor, class Applicative, class Monad, ap, class Apply, class Bind, class Show, Unit)
-- This illustrates an alternative way to use the type system to model
-- effects, where the effects type is a "regular" type, and the effects