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
(* .smi *) | |
_require "basis.smi" | |
structure S = | |
struct | |
val id : 'a -> 'a | |
end | |
structure Top = | |
struct |
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
/* base/runtime/mach-dep/cygwin-fault.c */ | |
$ diff base/runtime/mach-dep/cygwin-fault.c base/runtime/mach-dep/cygwin-fault.new.c | |
20,21c20 | |
< #include <windows.h> | |
< #include <exceptions.h> /* Cygwin stuff */ | |
--- | |
> #include "cygwin-fault.h" /* Cygwin stuff */ |
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
_require "basis.smi" | |
structure B = | |
struct | |
val g : {dir:string, name:string} -> unit | |
end |
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
(** | |
* import from sample code | |
* > https://raw.github.com/MLton/mlton/master/doc/examples/ffi/iimport.sml | |
*) | |
signature DYN_LINK = | |
sig | |
type hndl | |
type mode | |
type fptr |
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
library | |
structure Sample | |
is | |
$/basis.cm | |
$/qcheck.cm | |
qcheck_sample.sml |
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
(*** | |
* Array, Vector 等の固定長データ構造を生成するために状態を持ちたい。 | |
* unfold すればよいが、要素を一つずつ連結するのはイヤ(重すぎる)なので 配列用unfold 作ってみた | |
* ***) | |
infixr 1 $ | |
fun f $ a = f a | |
structure Array = |
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
/** | |
* 動的リンクされたライブラリのパスを表示する | |
* | |
* **Linux specific program** | |
* | |
* build: | |
* $ gcc -Wall -pedantic-errors -std=c99 -DNDEBUG -o sopath sopath.c -ldl | |
*/ | |
#define _GNU_SOURCE | |
#include <stdio.h> |
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
(** | |
* datatype replication declarations(specifications)のサンプル | |
*) | |
(** monomorphic version *) | |
structure S = | |
struct | |
datatype either = L | R | |
end |
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
(* | |
* (* debruijn.cm *) | |
* Group | |
* is | |
* $/basis.cm | |
* debrujn.sml | |
*) | |
(** | |
* De Bruijn変換 |
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
(** | |
* SEND | |
* + MORE | |
* ------ | |
* MONEY | |
* | |
* S,E,N,D,M,O,R,Y | |
* | |
* run: | |
* - Option.app (print o pp) (search ()) |
OlderNewer