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
| open Bechamel | |
| open Toolkit | |
| let opt_int0 = | |
| Test.make ~name:"(opaque/prim/Some)" (Staged.stage @@ fun () -> | |
| Sys.opaque_identity @@ int_of_string_opt "123") | |
| let opt_int1 = | |
| Test.make ~name:"(opaque/prim/None)" (Staged.stage @@ fun () -> | |
| Sys.opaque_identity @@ int_of_string_opt "123aa") |
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
| type 'a tt = Leaf | Node of 'a tt * 'a * 'a tt | |
| let leaf = Leaf | |
| let node l x r = Node (l, x, r) | |
| let rec deep = function | |
| | 0 -> Leaf | |
| | n -> | |
| let t = deep (n - 1) in | |
| Node (t, n, t) |
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
| [START][2021-12-16 10:13:34] LSP logging initiated | |
| [START][2021-12-16 10:19:07] LSP logging initiated | |
| [START][2021-12-16 10:22:07] LSP logging initiated | |
| [START][2021-12-16 10:29:22] LSP logging initiated | |
| [START][2021-12-16 14:02:31] LSP logging initiated | |
| [START][2021-12-16 14:02:59] LSP logging initiated | |
| [START][2021-12-16 14:03:42] LSP logging initiated | |
| [START][2021-12-16 14:05:21] LSP logging initiated | |
| [START][2021-12-16 14:09:34] LSP logging initiated | |
| [START][2021-12-16 14:13:31] LSP logging initiated |
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 Eq = struct | |
| type (_, _) t = Eq : ('a, 'a) t | |
| end | |
| type _ tid = .. | |
| type _ tid += Int : int tid | Float : float tid | Bool : bool tid | |
| type _ key = | |
| | K : |
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 Params = struct | |
| type _ t = | |
| | [] : 'a t | |
| | ( :: ) : 'a * 'b t -> ('a -> 'b) t | |
| let c = [ "s"; 1; 2.3; true ] | |
| let parse l = | |
| let parse_int s = | |
| try Some (int_of_string s) with |
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
| https://github.com/nathanWilson81/reason-image-grid/blob/master/src/Utils.re |
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
| https://github.com/SVdotCO/pupilfirst/blob/110b1ce95c60e246db2d0214f5d79841eec59ca7/app/javascript/coaches/dashboard/components/EvaluationForm.re#L59 |
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
| #!/usr/bin/env bash | |
| set -e | |
| # Converts .ml to .re | |
| ls -A *ml* | while read file; do | |
| if [[ "$file" =~ (\.ml|\.mli)$ ]]; then | |
| # Convert from OCaml to ReasonML | |
| newfile=$(echo $file | sed 's/\.ml/\.re/' | python -c "print raw_input().capitalize()") | |
| echo "Converting $file to $newfile" |
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
| /* | |
| P-code for PL/0 machine | |
| [ref] https://en.wikipedia.org/wiki/P-code_machine | |
| [ref] http://blackmesatech.com/2011/12/pl0/pl0.xhtml | |
| The PL/0 virtual machine was originally specified by Nicklaus Wirth in his book | |
| Algorithms + Data Structures = Programs; it's used as the target machine for a | |
| PL/0 compiler. |
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
| (* | |
| * An OCaml implementation of final tagless, inspired from this article by Oleksandr Manzyuk: | |
| * https://oleksandrmanzyuk.wordpress.com/2014/06/18/from-object-algebras-to-finally-tagless-interpreters-2/ | |
| *) | |
| module FinalTagless = struct | |
| type eval = { eval : int } | |
| type view = { view : string } | |
| module type ExpT = sig |
NewerOlder