초기 커밋: thesis 문서와 OCaml v0 스캐폴딩
문서(docs/thesis.md)에 네 가지 파생 결정을 반영: - Effect 다형성: effect 변수는 타입 파라미터와 동일 규율(선언 명시, 해소는 호출 지점에서 로컬). 집합 의미론으로 row polymorphism 회피. - 인터페이스 경계: public 경계 전면 명시, 본문 추론 누출 금지, interface hash는 정규화된 시그니처 텍스트만으로 계산. - 모듈/패키지: content hash는 무결성이지 가용성이 아님을 명시. - 형식 명세 범위를 capability의 affine 규칙까지 확장. 스캐폴딩은 CLI 형태만 고정하고 파이프라인 단계는 비워 둔다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ZVDeU6KLuUVL3gs18Hm3E
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
(executable
|
||||
(name main)
|
||||
(public_name cool)
|
||||
(libraries coollang))
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
let usage =
|
||||
{|coollang toolchain
|
||||
|
||||
사용법:
|
||||
cool check <file.cool>... 타입/effect/capability 검사 (fast path)
|
||||
cool run <file.cool> typed IR 인터프리터로 실행
|
||||
cool version 버전 출력
|
||||
|}
|
||||
|
||||
let report = function
|
||||
| Ok () -> 0
|
||||
| Error errors ->
|
||||
List.iter
|
||||
(fun e -> prerr_endline (Coollang.Driver.string_of_error e))
|
||||
errors;
|
||||
1
|
||||
|
||||
let () =
|
||||
let argv = Array.to_list Sys.argv in
|
||||
let code =
|
||||
match List.tl argv with
|
||||
| "check" :: files -> report (Coollang.Driver.check files)
|
||||
| [ "run"; file ] -> report (Coollang.Driver.run file)
|
||||
| [ "version" ] ->
|
||||
print_endline Coollang.Version.string;
|
||||
0
|
||||
| [] | [ "help" ] | [ "--help" ] | [ "-h" ] ->
|
||||
print_string usage;
|
||||
0
|
||||
| cmd :: _ ->
|
||||
Printf.eprintf "알 수 없는 명령: %s\n\n%s" cmd usage;
|
||||
2
|
||||
in
|
||||
exit code
|
||||
Reference in New Issue
Block a user