-
-
Notifications
You must be signed in to change notification settings - Fork 0
Claude/language roadmap planning pjm qg #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Add extensive documentation covering: Roadmap (ROADMAP.md): - Complete development roadmap through v1.0 - Phase-by-phase implementation plan - Testing strategy with property-based testing - Standard library and framework ecosystem plans - Milestone definitions and release schedule Wiki documentation (wiki/): - Language reference: lexical structure, types, ownership, effects, traits, modules, dependent types, row polymorphism, patterns, functions - Compiler implementation guides: architecture, lexer, parser, type checker, borrow checker, code generation - Tooling: CLI reference, REPL guide - Testing: comprehensive testing guide with property-based testing inspired by Echidna/QuickCheck - Standard library overview - Tutorials: introduction and quick start guide This documentation provides a foundation for contributors and users to understand the language design and implementation.
Implement a complete Menhir parser covering:
Expressions:
- Literals (int, float, string, char, bool, unit)
- Variables and field access
- Binary operators with correct precedence
- Unary operators (negation, not, ref, deref)
- Function calls and indexing
- Tuples, arrays, and records
- If/else and match expressions
- Lambda expressions
- Blocks and let bindings
- Effect handlers and resume
Types:
- Simple types and type constructors
- Generic types (Option[T], Vec[n, T])
- Function types with optional effects
- Tuple and record types
- Row polymorphism ({x: Int, ..r})
- Ownership modifiers (own, ref, mut)
Patterns:
- Wildcards, variables, literals
- Constructor patterns
- Tuple and record patterns
- Or-patterns and binding patterns
Declarations:
- Functions (with total, generic, effects)
- Structs and enums
- Type aliases
- Traits and implementations
- Effect declarations
- Imports and modules
Also includes:
- Parse driver bridging sedlex and Menhir
- Comprehensive parser test suite (60+ tests)
- CLI integration for 'parse' command
…ructure Phase 2 implementation of AffineScript: REPL & Interpreter: - value.ml: Runtime value representation with linear tracking - eval.ml: Tree-walking interpreter with pattern matching - repl.ml: Interactive REPL with commands (:help, :env, :debug, etc.) - stdlib.ml: Standard library modules (Math, String, Array, Option, Result) Semantic Analysis: - symbol.ml: Symbol table with scope management - resolve.ml: Name resolution pass for all AST nodes - types.ml: Internal type representation (QTT quantities, rows, effects) - typecheck.ml: Bidirectional type checker with unification - borrow.ml: Affine type borrow checker (use-after-move detection) Code Generation: - codegen.ml: WebAssembly code generator (WAT output) CLI Updates: - Added 'repl', 'run', and 'eval' commands - Integrated stdlib prelude loading Examples: - hello.afs, fibonacci.afs, factorial.afs - higher_order.afs, records.afs, enums.afs Tests: - test_eval.ml: 35+ interpreter tests
Add comprehensive compiler infrastructure: - lib/wasm_binary.ml: Full WASM binary encoder with LEB128, sections - lib/dependent.ml: Dependent types (length-indexed vectors, refinements) - lib/effects.ml: Algebraic effects and handlers runtime - lib/package.ml: Package manager with semver, dependency resolution - lib/lsp.ml: Language Server Protocol implementation Add standard library in library/: Common library (library/common/): - prelude.afs: Core types (Option, Result), traits (Eq, Ord, Iterator) - collections.afs: Vec, HashMap, HashSet, LinkedList, BinaryHeap - io.afs: IO effect, file handling, streams, buffered I/O - async.afs: Futures, channels, async primitives - string.afs: String utilities, StringBuilder - math.afs: Math functions, constants, statistics, RNG - time.afs: Duration, Instant, DateTime - sync.afs: Atomics, spinlocks, RwLock, barriers AffineScript-specific library (library/affinescript/): - linear.afs: Linear types, tokens, session types - effects.afs: Effect handlers (Reader, Writer, State, Except) - ownership.afs: Box, Rc, Weak, Cow, RefCell - refinements.afs: Positive, NonZero, Vec[N,T], Matrix[M,N,T] Total: ~8400 lines of new code
Replace open_in with open_in_bin in file reading operations to ensure consistent behavior across Windows and Unix systems. This addresses Semgrep warning about CRLF line ending handling. Files changed: - lib/repl.ml: load_file function - lib/package.ml: read_manifest function - lib/parse_driver.ml: parse_file function
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.