params: ["agent", null]
result: [null, "nonce1", "nonce2 size"]
Caveat: It's just personal opinion, and was written to be a bit provocative and encourage discussion . It is also something that is constantly evolving. Some of the main criteria I used in constructing this taxonomy are age, how widely used it us, and how well understood it is by the average Haskell programmer. These things will change over time.
Aso, this is focused on appropriateness for use in commercial production code bases. If you are not thinking about commercial use with a team of multiple
This file contains 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 OverloadedStrings #-} | |
import Reflex.Dom | |
counter = el "div" $ do | |
click <- button "Click" | |
clicks <- foldDyn (\() n -> n + 1) 0 click | |
el "p" $ display clicks | |
return clicks | |
main = mainWidget $ do |
This file contains 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
{ compiler ? "ghc844" | |
, rev ? "497e6f1705107a7d60e400e3b6dd6df5ca8bcdba" | |
, sha256 ? "1gwdxpx5ix3k6j5q3704xchw4cfzmmr2sd6gsqmsln9yrmjzg9p4" | |
, pkgs ? | |
import (builtins.fetchTarball { | |
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz"; | |
inherit sha256; }) { | |
config.allowBroken = false; | |
config.allowUnfree = true; | |
} |
This file contains 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
code: |- | |
(use coin) | |
(let* ((acct:string "rotest") | |
(bal:decimal (coin.get-balance acct)) | |
) | |
(coin.rotate acct (read-keyset "ks")) | |
(coin.transfer acct "croesus" bal) | |
) | |
data: | |
ks: |
This file contains 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
code: |- | |
(coin.transfer-create "alice" "bob" (read-keyset "ks") 100.1) | |
(coin.transfer "bob" "alice" 0.1) | |
data: | |
ks: | |
keys: [0ba113d8a84c307ebc2ace5090f117d921c43d9d3011e9cb9e030cb8ea5502eb] | |
pred: "keys-all" | |
publicMeta: | |
chainId: "0" | |
sender: alice |
This file contains 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 hash MODULE_ADMIN | |
"A smart contract to greet the world." | |
(defcap MODULE_ADMIN () true) | |
(defun revcat (a b) | |
(+ b a) | |
) | |
(defun phash:string (str:string) | |
(let* ((h (hash str)) |
This file contains 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
{ compiler ? "ghc844" | |
, rev ? "497e6f1705107a7d60e400e3b6dd6df5ca8bcdba" | |
, sha256 ? "1gwdxpx5ix3k6j5q3704xchw4cfzmmr2sd6gsqmsln9yrmjzg9p4" | |
, pkgs ? | |
import (builtins.fetchTarball { | |
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz"; | |
inherit sha256; }) { | |
config.allowBroken = false; | |
config.allowUnfree = true; | |
} |
This file contains 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
;; | |
;; "Hello, world!" smart contract/module | |
;; | |
;; Define the module. | |
(module hello-world MODULE_ADMIN | |
"A smart contract to greet the world." | |
; no-op module admin for example purposes. | |
; in a real contract this could enforce a keyset, or |
This file contains 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
; Simplified example of a token implementation. | |
; When I run `(typecheck "my-token")` I get the error: | |
; > Typecheck my-token: Unable to resolve all types | |
(module my-token GOVERNANCE | |
(defschema accounts-schema | |
balance:integer | |
guard:guard | |
) |
NewerOlder