Real World PureScript

Real World PureScript

This is a workshop I gave at Monadic Party in Poznan. See the source materials here: https://github.com/justinwoo/real-world-purescript-workshop-2019

3b48c91bf6b6f0bfd0fda50625598656?s=128

Justin Woo

June 21, 2019
Tweet

Transcript

  1. 15.

    Records --fromPrim("builtins") dataRecord::#Type->Type typeMyRecordA= {apple::String ,banana::String } typeMyRecordB= Record (apple::String

    ,banana::String ) id=identity::MyRecordA->MyRecordB fn1::MyRecordA->String fn1r=r.apple fn1::MyRecordA->MyRecordA fn1r=r{apple="no"} 15/21
  2. 20.

    Humor "FunTypeLevelliteralnumberarithmeticwithInstanceChains"https://github.com/justinwoo/my- blog-posts/blob/master/posts/2018-05-27-fun-type-level-literal-number-arithmetic-with-instance- chains.md classAdd(l::Symbol)(r::Symbol)(o::Symbol)|l->ro instancezeroAdd::Add"zero"rr elseinstancesuccAdd:: (Succl'l ,Succrr' ,Addl'r'o

    )=>Addlro "Wedon'tneedPeanoNumbersinPureScript"https://github.com/justinwoo/my-blog- posts/blob/master/posts/2018-09-11-we-dont-need-peano-numbers-in-purescript.md resultSub2::SProxy"....................................." resultSub2= T.sub(SProxy::SProxy"...............................................")(SProxy::SProxyT.Ten) 20/21
  3. 22.