Integrating Purescript and Halogen into Javascript Apps - Part 5 of 6
summary
PureScript and Halogen get pragmatically applied to an existing JavaScript app: actual steps include exporting a logPrice returns an F you must invoke to run console side effects from JS, wiring PureScript main as a JS-callable entry point, and replacing pieces incrementally (logging, DOM access, HTTP requests). Type techniques shown: newtype removes runtime overhead vs datatypes for compile-time safety, row-typed effects for composability, and a Halogen query/request algebra for component state. Demos compile and logs appear, with occasional setup hiccups.
AI-written summary · about
chapters (18)
- 0:00Intro
- 1:10What affects you
- 4:43LogPrice
- 10:20LogString
- 12:10Log Price
- 14:20Add to Cart
- 17:00Logger
- 19:50Types
- 23:20Row Types
- 25:00Type Alias
- 31:45New types
- 33:30Compile
- 33:55NewType
- 38:00Polymorphic
- 38:57State
- 45:39Query Algebra
- 46:40Request Query
- 48:13Variables
related talks
01h 04mJavaScript to Purescript A Migration Story
47mFunctional Programming on the Web
43mThe Pure Functional Web
49mPurescript (Maybe this time we get Javascript right)
01h 49mPurely Functional Web Apps using React and PureScript
45mPureScript (Maybe This Time We Get JavaScript Right)
50mFrom Javascript to Haskell : Functional Programming made simple
28mPureScript & Pux -- a safer, more expressive way to React
