Created
May 1, 2014 04:35
-
-
Save eldesh/7e61fc911a01ed464cb3 to your computer and use it in GitHub Desktop.
SML#1.2.0 でウソのシグネチャ(型注釈)がコンパイルを通るバグ。(SML#2.0.0では修正済み)
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
structure B = | |
struct | |
fun g (dir, name) = print (concat[dir, "/", name, "\n"]) | |
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
_require "basis.smi" | |
_require "body.smi" |
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
structure Main = | |
struct | |
fun main () = | |
B.g {dir="sml", name="sharp"} | |
end | |
val () = Main.main () |
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
#!/bin/sh | |
# smlsharp v1.2.0 | |
smlsharp -c body.sml | |
smlsharp -c main.sml | |
smlsharp -o main main.smi | |
./main | |
# smlsharp 1.2.0 (not 2.0.0) accept these code (o_O) | |
# $ ./run.sh | |
# sml/sharp | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment