Skip to content

Commit

Permalink
Merge pull request #374 from JordanMartinez/development
Browse files Browse the repository at this point in the history
Make next minor release: ps-0.13.x-v0.18.1
  • Loading branch information
JordanMartinez authored Aug 20, 2019
2 parents e46d8d9 + 126c763 commit 9df8f52
Show file tree
Hide file tree
Showing 38 changed files with 1,175 additions and 1,154 deletions.
26 changes: 13 additions & 13 deletions .procedures/upgrade-package-set-in-each-folder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,71 +7,71 @@ echo "... Syntax ...."

cd 11-Syntax/01-Basic-Syntax/
pwd
spago package-set-upgrade
spago upgrade-set
cd ../../

cd 11-Syntax/02-Foreign-Function-Interface/
pwd
spago package-set-upgrade
spago upgrade-set
cd ../../

cd 11-Syntax/03-Type-Level-Programming-Syntax/
pwd
spago package-set-upgrade
spago upgrade-set
cd ../../

cd 11-Syntax/04-Module-Syntax/
pwd
spago package-set-upgrade
spago upgrade-set
cd ../../

cd 11-Syntax/05-Prelude-Syntax/
pwd
spago package-set-upgrade
spago upgrade-set
cd ../../

cd 11-Syntax/06-Modifying-Do-Ado-Syntax-Sugar/
pwd
spago package-set-upgrade
spago upgrade-set
cd ../../

echo "... Hello World ...."

cd 21-Hello-World/03-Effect-and-Aff/
pwd
spago package-set-upgrade
spago upgrade-set
cd ../../

cd 21-Hello-World/04-Debugging/
pwd
spago package-set-upgrade
spago upgrade-set
cd ../../

cd 21-Hello-World/05-Application-Structure/
pwd
spago package-set-upgrade
spago upgrade-set
cd ../../

cd 21-Hello-World/06-Type-Level-Programming/
pwd
spago package-set-upgrade
spago upgrade-set
cd ../../

cd 21-Hello-World/07-Testing/
pwd
spago package-set-upgrade
spago upgrade-set
cd ../../

cd 21-Hello-World/08-Benchmarking/
pwd
spago package-set-upgrade
spago upgrade-set
cd ../../

echo "... Projects ...."

cd 22-Projects/
pwd
spago package-set-upgrade
spago upgrade-set
cd ../

echo "... Finished ...."
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ before_install:
# ^ Update NPM

install:
- npm i -g [email protected].x [email protected]
- npm i -g [email protected].3 [email protected]
# ^ Use NPM to install most packages
- chmod +x .travis/spago--print-versions.sh
- ./.travis/spago--print-versions.sh
Expand Down
6 changes: 3 additions & 3 deletions 00-Getting-Started/02-Install-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ We can install everything using `npm`. However, getting `npm` is it's own proble

##### Manual Install

Justin Woo explains how to set up one's environment for the `0.12.x` release but has not been updated for two things. First, the PureScript release at the time was `0.12.0` but now `0.13.x` is out. Second, the instructions use `pulp` and `psc-package`, a different build tool workflow than the one we'll use here.
Justin Woo explains how to set up one's environment for the `0.12.x` release but has not been updated for two things. First, the PureScript release at the time was `0.12.0` but now `0.13.3` is out. Second, the instructions use `pulp` and `psc-package`, a different build tool workflow than the one we'll use here.

If you just want to get things set up ASAP, follow the below summary of his article's instructions (using `spago` instead of the other tools). If you want to understand why you should do these commands, read [his article here](https://qiita.com/kimagure/items/570e6f2bbce5b4724564):
1. Install Node 10 or greater: https://nodejs.org/en/download/
Expand All @@ -44,14 +44,14 @@ Unlike the manual install, `nvm` properly handles the npm prefix for you. So, yo

Once you have installed `npm`, we can use it to install everything in one command:
```bash
npm i -g [email protected].x [email protected] parcel
npm i -g [email protected].3 [email protected] parcel
```

### Versions Used in this Project

The following commands should now work (the versions beside them are the versions I used when writing this project):
```bash
purs --version # 0.13.x
purs --version # 0.13.3
spago version # 0.9.0.0
parcel --version # 1.12.0
```
Expand Down
8 changes: 6 additions & 2 deletions 00-Getting-Started/04-Other-Important-Info.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@

If you decide to read the book, here are things to be aware of:
- be wary of any references to these [deprecated packages](https://github.com/purescript-deprecated)
- **Refer to [`dwhitney`'s fork of the book's code](https://github.com/dwhitney/purescript-book/tree/0.12)**, which is currently being updating to use `0.13.x`.
- **Refer to [`dwhitney`'s fork of the book's code](https://github.com/dwhitney/purescript-book/tree/0.12)**, which is currently being updating to use `0.13.3`.
- Refer to `Hello-World/Effect-and-Aff/Effect-Eff-and-Aff.md` to understand how to translate the no-longer-used `Eff` type to `Effect` type.

## Functional Programming Jargon

While reading through this repo, the [Functional Programming Jargon](https://github.com/hemanth/functional-programming-jargon) might be a helpful reference whenever you come across a term that isn't covered in this project.

## Differences From Haskell

If you're coming to PureScript with a Haskell background, be sure to consult the following resources:
Expand All @@ -31,7 +35,7 @@ Then, you use a search query like the following:

- Anytime you need to look up the documentation for a package, use [Pursuit](http://pursuit.purescript.org/). Be aware that some of the deprecated packages mentioned above are still posted there.
- Read [Pursuit's Search Help page](https://pursuit.purescript.org/help/users#searching)
- Some libraries have not been updated to `0.13.x` and are still on the `0.11.7` release. Some still work; others won't. In this work, we will insure that you do not use any such libraries, but be aware of that if you browse the docs on your own.
- Some libraries have not been updated to `0.13.3` and are still on the `0.11.7` release. Some still work; others won't. In this work, we will insure that you do not use any such libraries, but be aware of that if you browse the docs on your own.
- Lastly, some libraries have not uploaded their latest versions' documentation. In these cases, we will forewarn you. Fortunately, `spago docs` will produce a local version of the source code's documentation that looks similar to Pursuit. It does not support all the features of Pursuit, but it's better than nothing. To do that, follow these commands:
- `spago docs && <your default web browser> generated-docs/html/index.html` where `<your default web browser` is `firefox` or whatever you use.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A way to use specific versions of libraries that are known to compile together w

## Why Use It?

`spago` only allows you to use dependencies that compile together on a specific PureScript release. You do not have to track down which version of a `DependencyA` to use to ensure it compiles when you also use `DependencyB`. Moreover, you don't have to verify that `DependencyA` at `v1.0.0` works on PureScript release `0.13.x` instead of `0.11.7`.
`spago` only allows you to use dependencies that compile together on a specific PureScript release. You do not have to track down which version of a `DependencyA` to use to ensure it compiles when you also use `DependencyB`. Moreover, you don't have to verify that `DependencyA` at `v1.0.0` works on PureScript release `0.13.3` instead of `0.11.7`.

When a new PureScript release with breaking changes occurs, using `bower` is painful until the ecosystem "catches up." Since a new release draws in a lot of people, their initial exploration of PureScript when using `bower` can be horrible.

Expand Down
2 changes: 1 addition & 1 deletion 11-Syntax/01-Basic-Syntax/packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ let mkPackage =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/mkPackage.dhall sha256:0b197efa1d397ace6eb46b243ff2d73a3da5638d8d0ac8473e8e4a8fc528cf57

let upstream =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/packages.dhall sha256:906af79ba3aec7f429b107fd8d12e8a29426db8229d228c6f992b58151e2308e
https://github.com/purescript/package-sets/releases/download/psc-0.13.3-20190818/packages.dhall sha256:c95c4a8b8033a48a350106b759179f68a695c7ea2208228c522866fd43814dc8

let overrides = {=}

Expand Down
4 changes: 3 additions & 1 deletion 11-Syntax/01-Basic-Syntax/spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Welcome to a Spago project!
You can edit this file as you like.
-}
{ name =
{ sources =
[ "src/**/*.purs" ]
, name =
"untitled"
, dependencies =
[ "console", "effect", "newtype", "partial", "prelude", "psci-support" ]
Expand Down
31 changes: 16 additions & 15 deletions 11-Syntax/01-Basic-Syntax/src/04-Documentation.purs
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,46 @@
-- | 2. Item
-- | 3. Item
-- |
-- | A table:
-- | Unfortunately, markdown tables don't work...:
-- |
-- | | One | Two | Three |
-- | | - | - | - |
-- | | a | b | c
-- | | --- | --- | ----- |
-- | | a | b | c |
-- |
-- | Some code:
-- | ```purescript
-- | f :: Int
-- | f = 4
-- | ```

-- | Module-level documentation
-- | Documentation on a given module
module Syntax.Documentation where

-- | value documentation
-- | Documentation on a value
value :: Int
value = 4

-- | function documentation
-- | Documentation on a function
function :: Int -> String
function _ = "easy"

-- | data documentation
data SomeData = SomeData
-- | Documentation on a given data type
data SomeData
-- | Documentation on a particular data constructor
= SomeData

-- | type documentation
-- | Documentation on a given type alias
type MyType = String

-- | newtype documentation
-- | Documentation on a given newtype
newtype SmallInt = SmallInt Int

-- | type class documentation
-- | Documentation on a given type class
class MyClass a b | a -> b where
-- | Unfortunately, functions/values inside a type class cannot yet
-- | be documented because of a compiler bug:
-- | See https://github.com/purescript/purescript/issues/3507
-- | Documentation for a particular function/value
-- | defined in a type class
myFunction :: a -> b

-- | instance documentation
-- | Documentation for a particular instance of a type class
instance example :: MyClass String Int where
myFunction _ = 4
2 changes: 1 addition & 1 deletion 11-Syntax/02-Foreign-Function-Interface/packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ let mkPackage =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/mkPackage.dhall sha256:0b197efa1d397ace6eb46b243ff2d73a3da5638d8d0ac8473e8e4a8fc528cf57

let upstream =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/packages.dhall sha256:906af79ba3aec7f429b107fd8d12e8a29426db8229d228c6f992b58151e2308e
https://github.com/purescript/package-sets/releases/download/psc-0.13.3-20190818/packages.dhall sha256:c95c4a8b8033a48a350106b759179f68a695c7ea2208228c522866fd43814dc8

let overrides = {=}

Expand Down
4 changes: 3 additions & 1 deletion 11-Syntax/02-Foreign-Function-Interface/spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Welcome to a Spago project!
You can edit this file as you like.
-}
{ name =
{ sources =
[ "src/**/*.purs" ]
, name =
"untitled"
, dependencies =
[ "console", "effect", "newtype", "partial", "prelude", "psci-support" ]
Expand Down
2 changes: 1 addition & 1 deletion 11-Syntax/03-Type-Level-Programming-Syntax/packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ let mkPackage =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/mkPackage.dhall sha256:0b197efa1d397ace6eb46b243ff2d73a3da5638d8d0ac8473e8e4a8fc528cf57

let upstream =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/packages.dhall sha256:906af79ba3aec7f429b107fd8d12e8a29426db8229d228c6f992b58151e2308e
https://github.com/purescript/package-sets/releases/download/psc-0.13.3-20190818/packages.dhall sha256:c95c4a8b8033a48a350106b759179f68a695c7ea2208228c522866fd43814dc8

let overrides = {=}

Expand Down
4 changes: 3 additions & 1 deletion 11-Syntax/03-Type-Level-Programming-Syntax/spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Welcome to a Spago project!
You can edit this file as you like.
-}
{ name =
{ sources =
[ "src/**/*.purs" ]
, name =
"untitled"
, dependencies =
[ "console"
Expand Down
2 changes: 1 addition & 1 deletion 11-Syntax/04-Module-Syntax/packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ let mkPackage =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/mkPackage.dhall sha256:0b197efa1d397ace6eb46b243ff2d73a3da5638d8d0ac8473e8e4a8fc528cf57

let upstream =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/packages.dhall sha256:906af79ba3aec7f429b107fd8d12e8a29426db8229d228c6f992b58151e2308e
https://github.com/purescript/package-sets/releases/download/psc-0.13.3-20190818/packages.dhall sha256:c95c4a8b8033a48a350106b759179f68a695c7ea2208228c522866fd43814dc8

let overrides = {=}

Expand Down
4 changes: 3 additions & 1 deletion 11-Syntax/04-Module-Syntax/spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Welcome to a Spago project!
You can edit this file as you like.
-}
{ name =
{ sources =
[ "src/**/*.purs" ]
, name =
"untitled"
, dependencies =
[ "console", "effect", "newtype", "partial", "prelude", "psci-support" ]
Expand Down
2 changes: 1 addition & 1 deletion 11-Syntax/05-Prelude-Syntax/packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ let mkPackage =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/mkPackage.dhall sha256:0b197efa1d397ace6eb46b243ff2d73a3da5638d8d0ac8473e8e4a8fc528cf57

let upstream =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/packages.dhall sha256:906af79ba3aec7f429b107fd8d12e8a29426db8229d228c6f992b58151e2308e
https://github.com/purescript/package-sets/releases/download/psc-0.13.3-20190818/packages.dhall sha256:c95c4a8b8033a48a350106b759179f68a695c7ea2208228c522866fd43814dc8

let overrides = {=}

Expand Down
4 changes: 3 additions & 1 deletion 11-Syntax/05-Prelude-Syntax/spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Welcome to a Spago project!
You can edit this file as you like.
-}
{ name =
{ sources =
[ "src/**/*.purs" ]
, name =
"untitled"
, dependencies =
[ "console", "effect", "prelude" ]
Expand Down
2 changes: 1 addition & 1 deletion 11-Syntax/06-Modifying-Do-Ado-Syntax-Sugar/packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ let mkPackage =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/mkPackage.dhall sha256:0b197efa1d397ace6eb46b243ff2d73a3da5638d8d0ac8473e8e4a8fc528cf57

let upstream =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/packages.dhall sha256:906af79ba3aec7f429b107fd8d12e8a29426db8229d228c6f992b58151e2308e
https://github.com/purescript/package-sets/releases/download/psc-0.13.3-20190818/packages.dhall sha256:c95c4a8b8033a48a350106b759179f68a695c7ea2208228c522866fd43814dc8

let overrides = {=}

Expand Down
2 changes: 1 addition & 1 deletion 11-Syntax/06-Modifying-Do-Ado-Syntax-Sugar/spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ You can edit this file as you like.
, packages =
./packages.dhall
, sources =
[ "src/**/*.purs", "test/**/*.purs" ]
[ "src/**/*.purs" ]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ After Semigroup and Monoid, the rest of PureScript's Numeric type classes (e.g.

Once one finishes reading it, be sure to check out [his full-screen cheatsheet](https://harry.garrood.me/numeric-hierarchy-overview/) and [his overview of PureScript's numberic types](https://a-guide-to-the-purescript-numeric-hierarchy.readthedocs.io/en/latest/appendix/purescript-impls.html)

Another resource that might be helpful is [A Brief Guide to A Few Algebraic Data Structures](https://argumatronic.com/posts/2019-06-21-algebra-cheatsheet.html). However, this is more of a reference material than a tutorial like Harry's above overview.

## Docs

- [Semigring](https://pursuit.purescript.org/packages/purescript-prelude/4.1.0/docs/Data.Semiring)
Expand Down
2 changes: 1 addition & 1 deletion 21-Hello-World/03-Effect-and-Aff/packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ let mkPackage =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/mkPackage.dhall sha256:0b197efa1d397ace6eb46b243ff2d73a3da5638d8d0ac8473e8e4a8fc528cf57

let upstream =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/packages.dhall sha256:906af79ba3aec7f429b107fd8d12e8a29426db8229d228c6f992b58151e2308e
https://github.com/purescript/package-sets/releases/download/psc-0.13.3-20190818/packages.dhall sha256:c95c4a8b8033a48a350106b759179f68a695c7ea2208228c522866fd43814dc8

let overrides = {=}

Expand Down
2 changes: 1 addition & 1 deletion 21-Hello-World/03-Effect-and-Aff/spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Welcome to a Spago project!
You can edit this file as you like.
-}
{ sources =
[ "src/**/*.purs", "test/**/*.purs" ]
[ "src/**/*.purs" ]
, name =
"untitled"
, dependencies =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ ReadMe.md file to run it using Node (not Spago) to see what happens.
-}

-- new imports
import Node.ReadLine ( Interface
, createConsoleInterface, noCompletion
import Node.ReadLine ( createConsoleInterface, noCompletion
, question, close)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ These were found using a [purescript-aff-](https://pursuit.purescript.org/search
## Aff Wrappers Around Node

- [purescript-node-fs-aff](https://pursuit.purescript.org/packages/purescript-node-fs-aff/6.0.0)
- [purescript-node-readline-aff](https://pursuit.purescript.org/packages/purescript-node-readline-aff/0.1.2) (outdated: does not compile on `PureScript 0.13.x`)
- [purescript-node-readline-aff](https://pursuit.purescript.org/packages/purescript-node-readline-aff/0.1.2) (outdated: does not compile on `PureScript 0.13.3`)
2 changes: 1 addition & 1 deletion 21-Hello-World/04-Debugging/packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ let mkPackage =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/mkPackage.dhall sha256:0b197efa1d397ace6eb46b243ff2d73a3da5638d8d0ac8473e8e4a8fc528cf57

let upstream =
https://raw.githubusercontent.com/purescript/package-sets/psc-0.13.2-20190715/src/packages.dhall sha256:906af79ba3aec7f429b107fd8d12e8a29426db8229d228c6f992b58151e2308e
https://github.com/purescript/package-sets/releases/download/psc-0.13.3-20190818/packages.dhall sha256:c95c4a8b8033a48a350106b759179f68a695c7ea2208228c522866fd43814dc8

let overrides = {=}

Expand Down
2 changes: 1 addition & 1 deletion 21-Hello-World/04-Debugging/spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Welcome to a Spago project!
You can edit this file as you like.
-}
{ sources =
[ "src/**/*.purs", "test/**/*.purs" ]
[ "src/**/*.purs" ]
, name =
"untitled"
, dependencies =
Expand Down
Loading

0 comments on commit 9df8f52

Please sign in to comment.