
Software is about writing
correct and understandable code,
and keeping it that way.
For simple pages, browsers are great.
For applications, browsers are a clusterfuck.
UHC and GHCjs
Roy LambdaScript jshaskell
Haste
Fay
Elm
Types make sense for the JavaScript runtime and surrounding ecosystem.
Reasonable, minimal and readable code footprint.
Legitimate language in its own right, with benefits beyond Haskell.
Constantly growing tools and resources:
Phil Freeman is extremely responsive.
Standard
Control
Tuples
Monoid
Maybe
Either
Arrays
Foreign
Strings
Foldable Traversable
Validation
QuickCheck
Exceptions
Refs
Random
Math
Enums
Contrib
Linked Lists
Free Monads
Yaml
Transformers
Lens
Maps
Canvas
Node-fs
React
Generics
Mocha
Chai
Timers
Arrows
Yoneda
Unfoldable
yargs
jQuery
Lazy
BiFunctors
Distrubtive
Const
Parsing
History
Events
DateTime
Contravariant
ProFunctor
Streams
...
Referential Transparency
Monadic IO
Curried by default
User-defined infix operators
Do Notation
Pattern Matching
Type Classes
Strict Evaluation
Extensible records
No tuples
(as a language feature)
Simplified syntax
No GADTs, Type Families
getAge :: IO Int
getName :: IO String
showCompare :: Int -> String -> Boolean
showCompare <$> getName <*> getAge :: IO BooleangetAge :: forall e. Eff (network :: Network | e) Number
getName :: forall e. Eff (fileSystem :: FileSystem | e) String
showCompare :: Number -> String -> Boolean
showCompare <$> getName <*> getAge :: forall e. Eff (network :: Network, fileSystem :: FileSystem | e) Booleanclass Monoid a where
mempty :: a
mappend :: a -> a -> a
mconcat :: [a] -> a
mconcat = foldr mappend mempty
(<>) :: Monoid M => m -> m -> m
(<>) = mappend
class SemiGroup a where
(.++.) :: a -> a -> aclass Semigroup a where
(<>) :: a -> a -> a
class (Semigroup m) <= Monoid m where
mempty :: mdata Foo a = Foo a
1 :: *
"hello world" :: *
Foo :: * -> *
IO :: * -> *
data Foo a = Foo a
1 :: *
"hello world" :: *
Foo :: * -> *
Eff :: # ! -> * -> *
! for Effects
# for Rows (extensible records in the type system)
foreign import data Ajax :: !
foreign import getData """
function getData(url){
return function(fn){
return function(){
$.get(url, fn);
};
};
} """ :: forall a b e. String -> (a -> Eff (ajax :: Ajax | e) b) -> Eff (ajax :: Ajax | e) UnitMy preference for PureScript's Neighbor is LiveScript