Thank you for your interest in contributing to Oskar Wickström's Quickstrom ("We" or "Us").
The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us.
Thank you for your interest in contributing to Oskar Wickström's Quickstrom ("We" or "Us").
The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us.
WebCheck uses a version of PureScript for specifications in testing web applications, which I'll refer to as "the language" in this document.
A specification includes a top-level definition called proposition
, which
must be a pure expression of type Boolean
. The interpreter of the language
does not allow effects (the Effect
type in PureScript, formerly known as
Eff
). But there are a few built-in constructs that are at least backed by
non-pure computations:
module WebCheck.PureScript.TodoMVC where | |
import WebCheck.DSL | |
import Data.Array (filter, foldMap, head, last, zip) | |
import Data.Foldable (length) | |
import Data.Int as Int | |
import Data.Maybe (Maybe(..), fromMaybe) | |
import Data.String (Pattern(..), split, trim) | |
import Data.Tuple (Tuple(..)) |
{-# OPTIONS_GHC -Wno-missing-methods #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
module ThoughtLeaderTom where | |
import Control.Monad ((>=>)) |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE NamedFieldPuns #-} | |
{-# LANGUAGE TypeApplications #-} | |
module HiggledyHedgehog where | |
import Control.Lens | |
import Data.Generic.HKD | |
import GHC.Generics (Generic) | |
import Hedgehog |
-- | This shows a way of computing a recursive type, and applying | |
-- constraints to individual types within it, using a type family. | |
-- I've commented the different parts, and the file ends with some | |
-- questions. | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE RankNTypes #-} |
.stack-work |
With Servant-style routing, the ordering of endpoints in types must line up with handlers on the value level. Destructuring clients and link structures derived from a routing type cannot be done without introducing coupling to the ordering of the routing type.
This experiment tries to remove that ordering issue, by using named resources and methods on the type level, in combination with PureScript's records (constrained by RowCons
) at the value level. The ordering no longer matter when we give handlers in a record. We could also implement link or client deriving functions that would extract specific clients based on a given name. All name checks are done at compile time.
module Examples.SafeForm where | |
import Control.IxMonad ((:*>)) | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Console (CONSOLE) | |
import Control.Monad.Except (ExceptT) | |
import Data.Foldable (traverse_) | |
import Data.Maybe (Maybe(..), maybe) | |
import Data.MediaType.Common (textHTML) | |
import Data.Monoid (mempty) |
I hereby claim:
To claim this, I am signing this object: