Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Surgery on 0.14 syntax branch (#502)
* Relocate 'let lacks generalization' to be after let/where file * Mention that let bindings can have type signatures * Cover let..in syntax first; explain that where is syntax sugar for let * Update let lacks generalization examples to be clearer * Fix type signature: result is a value, not a function * Temporarily update Prelude to point to ps-0.14 branch * Update `spago docs` command to use `spago docs --open` * Provide examples of values before example of a function * Add a JavaScript corresponding example to how functions are defined in PS * Clean up explanations for initial exposure to syntax in PS * Update Box example to illustrate which parts define the type and value * Start introducing the concept of explicit kind signatures * Fix identation of explanation so that it's more readable * Clean up the type signatures a bit and rename type via emphasis * Fix typo and provide clearer rendering without mentioning Haskell * Remove `data`: might incorrectly convey that such types are data types * Start exposing reader to various ways of writing functions * Cleanup docs * Remove unused trailing comment * Explain that concept is known as 'eta-expansion' * Update data examples; note situations where kind signatures are required * Clarify what Type Constructor and Data Constructor mean * Fix typo * Replace notion of Type in pattern matching with Data Constructor * Swap positions: unicode syntax follows keywords and syntax * Add forall's unicode character: ∀ * Reword explanation of adding forall syntax to front of type signature * Remove unicode version of forall as it's covered in Unicode file now * Show that type aliases can also have kind signatures * Clean up rendering for let..in/where syntax usage * Indicate the start and end of let blocks and in blocks * Rerender type signature phrase using annotation rather than association * Make monomorphism and polymorphism difference clearer * Update line numbers in example compiler error example * Reword indentation explanation to be shorter * Fix typo * Capitalize type class to Type Class * Use commas to separate list * Add type signatures to remove compiler warnings * Get rid of compiler warnings in file; fix whitespace issues * Add whitespace for readability * Add or remove whitespace for readability * Fix error in understanding: Boxable still requires an instance * Bump type class syntax file order by one to make room for new file * Document that type classes can have kind signatures and provide examples * Remove some whitespace * Prevent types from being higher-kinded so as to prevent compiler warnings * Update FD examples to include variants with kind signatures * Add kind signatures to prevent compiler warnings * Indicate that newtypes can have kind signatures, too * Fix compiler warning: shadowed definition, `Type`, from Prim * Add kind signatures to prevent compiler warnings * Remove unneeded import * Add kind signature to "needed to compile" code * Briefly cover row kinds so that kind signature for empty row makes sense - This kind signature is required. Otherwise, we need to write `forall kind. kind -> Row kind` as its kind signature. * Use 'label, rather than 'field' when referring to name part of row * Fix typo: constraint -> constrain * Update function abbreviation to use eta-expansion and eta-reduction * Fix value to types as types to kinds diagram - This change was made previously, but it looks like it was overwritten later, possibly via a bad merge or bad force-push? * Rephrase: "`kind Type`" -> "kind, `Type`," * Update '# Type' to be 'Row Type' * Indicate that there's only one Proxy type now * Update examples showing how to create custom kinds * Use explicit kind signatures rather than (Type :: Kind) syntax * Add compiler-failing example for data type using coustom kind * Reorder content * Add type class example of using custom kind * Change members to data constructors * Rename file by dropping the 'Revisited' part * Update type name: clashing with previous one due to copy and paste * Comment out Proxy type for now to prevent compiler error * Bump files twice to make room for two files * Describe new polykind signature via forall kind * Explain `Proxy` as a way to pass around type-level values at value-level * Update type-level functions ReadMe to use kind signature syntax * Add headers to Unification section to Unification more strongly indicate breaks * Fix typo due to copy and paste * Fix generic function to use polymorphic types * Fix compiler error due to typos * Change `kind` to something else - Using `kind` here clashes with the name from `forall kind. kind` * Update type-level programming examples to use kind signatures * Show but don't explain reification pattern * Update conventions; remove ConstrainedToKindName * Add missing Constraint kind * Use polykinded Proxy rather than kind-specific Proxy types * Update module syntax to remove pre 0.14.0 kind imports/exports * Bump type class gotchas and errors to make room for special classes * Document special type class: Partial * Document special type class Coercible (doesn't currently work yet) * Install safe-coerce * Import coerce from correct module * Provide breaking example based on hash being applied to key2 first * Fix typos * Fix example illustrating the need for the type role, nominal * Remove need for type-level programming pre-req for app structure folder * Remove mention of 'upcoming app structure folder' in type level programming folder * Fix typo * Document higher-kinded data, how it works and why use it * Remove "type classes solve problem of code reuse" and Cat. Theory origin * Add short explanation of 'scrap your type classes' * Link to and summarize the Fairbairn Threshold * Link to 'thinking with types' notes * Expand and clarify derive newtype & Newtype instance * Remove PS by Example outdatedness comment in why not learn PS * Update PS by Example links * Update Spago: 0.14.0 -> 0.15.2 * Link to minesweeper CLI game * Link to Boolean Blindness video * Update overviews of newtypes for Monoid * Cover Endo monoidal newtype before Dual * Link to Thomas' answer on why Halogen and comparison to other frameworks * Link and fully quote Thomas' answer for 'why halogen?' * Link to debugging tip by kritzcreek * Update explanation of link: PS book is no longer outdated * Link to PS Cookbook * Add more recent link for GADTs/tagless discussion * Update package-set to latst release; drop ps-0.14 set * Update `tree` to `tree-rose` * Make Module Syntax compile again on PS 0.13.x syntax PS 0.14.x syntax was commented out * Move ps-0.14.x type-level syntax folder to own temporary folder * Make Type-Level Syntax compile again on PS 0.13.x * Remove 'safe-coerce' library from Basic Syntax folder's dependencies * Move current state of files to 'ps-0.14-syntax' folder * Get Basic Syntax folder to compile on PS 0.13.x again * Update PureScript to 0.13.9 * Update spago to 0.16.0 * Update ToC to ps-0.13.x-v0.25.0 * Regenerate changelog * Do not specify package version; make link always refer to latest release Note: there are still links that could be updated to use this 'relative' link approach. These have not been done here due to lack of time. * Update ToC to ps-0.13.x-v0.25.0 * Regenerate changelog * Change PureScript version to 0.13.8 Co-authored-by: Miles Frain <miles.frain@colorado.edu> Co-authored-by: Răzvan C. Rădulescu <razcore.art@gmail.com>
- Loading branch information