This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Require Import Nat. | |
| Require Import Arith. | |
| Require Import Lia. | |
| Require Import Wf. | |
| Inductive term := | |
| | t_true : term | |
| | t_false : term |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Require Import ssreflect. | |
| Require Import Nat Arith. | |
| Definition id := nat. | |
| Inductive type : Type := | |
| | Bool : type | |
| | Nat : type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From mathcomp Require Import ssrbool ssrnat. | |
| Section Eden. | |
| (********************) | |
| (* Primitive states *) | |
| (********************) | |
| Variable Subject : Type. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Require Import RelationClasses Relation_Definitions Morphisms. | |
| Class Graph := { | |
| T : Type; | |
| X : T -> T -> Type; | |
| equal : forall n m, relation (X n m); (* X -> X -> Prop from Relation_Definitions*) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Require Export Lib. | |
| (* | |
| Inductive id : Type := | |
| Id : nat -> id. | |
| *) | |
| Inductive type : Type := | |
| | BOOL : type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Inductive peano : Set := | |
| | Z : peano | |
| | S : peano -> peano. | |
| Inductive Plus : peano -> peano -> peano -> Prop := | |
| | P_Zero : forall n, Plus Z n n | |
| | P_Succ : forall n m l, | |
| Plus n m l -> Plus (S n) m (S l). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Data.List | |
| import Control.Monad | |
| import Control.Concurrent | |
| import System.Random.Shuffle (shuffleM) | |
| ------------------------------ | |
| -- Comonad | |
| ------------------------------ | |
| class Functor w => Comonad w where |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE DeriveFunctor #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| module StackMachine where | |
| import Control.Monad.Free | |
| import Control.Monad.Trans.State | |
| import Prelude hiding (EQ, LT, GT) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE FlexibleInstances #-} | |
| module ControllerDSL where | |
| import Control.Monad.Free | |
| import qualified Control.Monad.State as S (liftIO) | |
| import qualified Control.Monad.Trans.State as S | |
| import Prelude hiding (read) | |
| import qualified Data.Map as M | |
| -- These types are defined in a separate library |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module BlackJack where | |
| import Control.Monad (liftM2) | |
| import Data.Char (toLower) | |
| import Data.List (intercalate, sort) | |
| import System.Random.Shuffle (shuffleM) | |
| import Control.Monad (sequence) | |
| import Control.Monad.Trans.State | |
| import Control.Monad.Trans.Class | |
| import Control.Monad.Trans.Except |