QuickCheck is a language for stating properties of programs.
?FORALL(X, nat(), X*X >= 0)The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
git clone --bare [email protected]:usi-systems/easytrace.git
| (** "Landin's Knot" - implements recursion by backpatching *) | |
| let landins_knot f = | |
| let r = ref (fun x -> assert false) in | |
| let fixedpoint = f (fun x -> !r x) in | |
| r := fixedpoint; | |
| fixedpoint | |
| let factorial = | |
| let g f x = | |
| if x = 0 then |
| #! /usr/bin/env stack | |
| -- stack --resolver lts-8.15 --install-ghc script --package base | |
| -- Usage: | |
| -- $ echo -e "1.2 3.4\n5.6 not-a-number" | ./total.hs | |
| -- 10.2 | |
| import Data.Maybe (mapMaybe) | |
| import Text.Read (readMaybe) |
| {-# LANGUAGE GADTs, TypeFamilies, EmptyDataDecls #-} | |
| {- | |
| A Haskell-based implementation of the monadic semantics for the | |
| simply-typed Call-By-Name computational lambda calculus, following | |
| Moggi's 'Computational lambda-calculus and monads' (1989) (technical report version) | |
| but for the typed calculus (rather than untyped as in this paper). | |
| Category theory seminar, Programming Languages and Systems group, |
| {-# LANGUAGE RecordWildCards #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| module Main where | |
| import Control.Monad.Random.Class | |
| import Control.Monad.Reader | |
| import Data.Foldable (for_) | |
| import Graphics.Rendering.Cairo hiding (x, y) | |
| import qualified Numeric.Noise.Perlin as P | |
| import System.Random |
| {-# LANGUAGE | |
| TypeFamilies | |
| , KindSignatures | |
| , ScopedTypeVariables | |
| , ConstraintKinds | |
| , FlexibleInstances | |
| , FlexibleContexts | |
| , DeriveGeneric | |
| , DeriveAnyClass | |
| , TypeApplications |
| {-# LANGUAGE DeriveAnyClass #-} | |
| {-# LANGUAGE DeriveGeneric #-} | |
| {-# LANGUAGE NamedFieldPuns #-} | |
| import Data.SBV | |
| import Data.SBV.Control | |
| import GHC.Generics (Generic) | |
| data SIntX = SIntX { isInf :: SBool | |
| , xVal :: SInteger |
| {-# lAnGuAgE DataKinds #-} | |
| {-# LaNgUaGe FlexibleInstances #-} | |
| {-# lAnGuAgE FunctionalDependencies #-} | |
| {-# LaNgUaGe KindSignatures #-} | |
| {-# lAnGuAgE TypeFamilies #-} | |
| {-# LaNgUaGe TypeOperators #-} | |
| {-# lAnGuAgE UndecidableInstances #-} | |
| module Commit where | |
| import Data.Kind (Constraint, Type) |