Skip to content

Instantly share code, notes, and snippets.

module Main where
import Data.Generic.Rep (class Generic, Argument, Constructor, Product)
import Effect (Effect)
import Effect.Class.Console as Console
import Effect.Uncurried (EffectFn1, EffectFn2, EffectFn3, runEffectFn1, runEffectFn2, runEffectFn3)
import Prelude (Unit, bind, discard, (>>=))
import Type.Data.Peano.Nat (class IsNat, NProxy, Succ, Z, d0, reflectNat, kind Nat)
-- Any product data type with a Generic instance can be made mutable!
module SIMPLE-SYNTAX
endmodule
module SIMPLE
imports BOOL
imports INT
syntax S ::= "mul(" S "," S ")"
module SIMPLE-SYNTAX
endmodule
module SIMPLE
imports BOOL
imports INT
syntax S ::= "mul(" S "," S ")"
module SIMPLE-SYNTAX
endmodule
module SIMPLE
imports BOOL
imports INT
syntax Bitfield ::= Bitfield Bit
module SIMPLE-SYNTAX
endmodule
module SIMPLE
imports BOOL
imports INT
syntax Bitfield ::= Bitfield Bit
// simple.k
module SIMPLE-SYNTAX
endmodule
module SIMPLE
imports BOOL
imports INT
module FRIST-SYNTAX
imports BOOL
syntax Expr ::= Expr "+" Expr [left, strict]
| "(" Expr ")" [bracket]
| Ident
syntax Ident ::= "x" | "y" | "z"
module FRIST-SYNTAX
syntax Expr ::= Expr "+" Expr [left, strict]
| "(" Expr ")" [bracket]
| Ident
syntax Ident ::= "x" | "y" | "z"
endmodule
if (interrupt === null) {
switch (status) {
case SUSPEND: return util.stateSuspended;
case COMPLETED: return util.stateCompleted;
default: return util.stateRunning;
}
}
else {
switch (status) {
case COMPLETED: return util.stateKilled;
@eric-corumdigital
eric-corumdigital / x.purs
Last active April 29, 2019 15:14
PureScript deriving newtype Number not of form
class (LeftModule v a, RightModule v a) ⇐ Bimodule v a
newtype Pixels = Pixels (Additive Number)
derive newtype instance bimodulePixels ∷ Bimodule Pixels Number
---
Cannot derive the type class instance