This folder contains compileable Purescript syntax using meta-language (a language that describes the syntax). Thus, rather than saying something like
f :: String -> Intwhich doesn't tell you anything, it'll say:
functionName :: ParameterType -> ReturnTypeSince the syntax can be compiled, it can be verified as valid and correct syntax.
As a result, most files will appear like so:
-- The module will be declared at the top of the file
-- It can be ignored.
module Syntax.ModuleName where
-- The Prelude module might be imported
-- It, too, can be ignored.
import Prelude
-- The thing that the file is documenting usually goes here.
-- Don't ignore this stuff.
data Box a = Box a
-- Sometimes the comment "necessary to compile" will appear.
-- It makes the meta-language compileable. Ignore everything underneath it
-- as you read through the files.
-- necessary to compile
type SomeTypeName = StringIf you want to play around with the syntax, follow these instructions:
- Go to a directory that has a
spago.dhallfile (otherwise, the rest of these commands won't work) - Install the dependencies:
spago install - Start a REPL or build the files with watching (refer to the table below)
