PureScript Workshop Exercises
This repository has a bootstrap script, which downloads a small pile of things and sets things up for you. To get this going:
- Clone this git repo to somewhere local on your machine (eg. with
git clone https://github.com/damncabbage/purescript-workshop workshop)
- Run the bootstrap setup script (with
./bootstrap.sh, from inside the checked-out workshop directory).
- Put an issue in this repo if you get stuck.
It's helpful to use an editor with some PureScript integration. I recommend Atom set up with the atom-ide-purescript plugin, opening each exercise as a separate project. Alternatively, pscid is an alternative that can be used as a file-watch + fast-rebuild tool with any editor.
The exercises are broken up into sections and sub-sections, with each having its own README, Exercise and Answer folders. Every Exercise and Answer is an independent program that can be interacted with in the following way:
npm run -s buildin an Exercise or Answer directory will rebuild that program and display errors and warnings. If you're using the VM with the Atom editor, this is being run for you on every save.
- Interactive Console Tool (REPL):
npm run -s replwill kick off
pulp psci, an interactive command-line tool (like GHCI,
pythonwithout arguments). Hit Ctrl-C to quit.
- Server: Some later exercises have a web-based component;
npm run -s startwill start the Webpack+Express dev server, which also provides hot-reloading for quick feedback. Hit Ctrl-C to stop it.
Additionally, there are a pile of generated API docs in Markdown format in each exercise's folder,
How Do I Start?
Open up the
01 Basics folder, then the first
01 Building Things, Finding Things... folder, and
then read and follow the instructions from the README.markdown file within.
- 01 Building Things, Finding Things, Trying Things
- 02 Here's One We Messed Up Earlier
- 03 Types and Patterns
- 04 Maybe it's Just Nothing
02 Rows and Effects
- 01 Places to Be
- 02 Things to Do
- 03 Composing Effects
03 Web with Pux
- 01 States and Views
- 02 Actions and Updates
- 03 Effectful Updates
- 04 Skynet
- 99 Playground
Copyright 2016 Rob Howard
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.