Releases: neohaskell/NeoHaskell
v0.5.0: HTTP, TOML, Nested Actions Now Executed and Major Refactoring
🚀 New Features and Improvements
🛠️ Fixed Execution of Nested Actions
- Issue Addressed: Nested actions were not being executed, leading to incomplete workflows and unexpected behavior.
- Solution: Refactored the action processing system to correctly handle and execute nested actions.
- Impact: Ensures that all intended actions are performed, providing more reliable and predictable application behavior.
🌐 Introduced HTTP Client Support
- Capability: Added HTTP client functionalities using the
http-conduit
library. - Modules Added:
core/http/Http.hs
core/http/Http/Client.hs
- Features:
- Perform HTTP GET requests with JSON parsing.
- Seamless integration of HTTP requests into NeoHaskell applications.
- Note: Currently supports only GET requests.
📄 Transitioned from YAML to TOML for Configuration
- Change: Replaced YAML configuration support with TOML.
- Reason: TOML offers a simpler syntax and is better suited for configuration needs.
- Action Required: Users must migrate their YAML configuration files to TOML format.
- Modules Affected:
- Removed:
core/yaml/Yaml.hs
- Added:
core/toml/Toml.hs
(using thetoml-parser
library)
- Removed:
⚙️ Refactored Core Modules
- Standardization and Cleanup:
- Removed custom implementations and redundant GHC extensions.
- Cleaned up imports and exports in core modules for clarity and maintainability.
- IO Module Enhancements (
core/core/IO.hs
):- Added
map
andtry
functions for improved error handling and functional composition.
- Added
- Result Module Enhancements (
core/core/Result.hs
):- Introduced
fromEither
function for better interoperability with Haskell'sEither
type.
- Introduced
🚀 Improved Service Layer
- Action Processing (
core/service/Action.hs
):- Rewrote action processing logic to correctly handle nested actions.
- Adjusted the
Action
type and related functions to support new data structures.
- Event Handling (
core/service/Service/EventWorker.hs
):- Enhanced event worker logic to accurately process events derived from actions.
- Ensured proper propagation of events throughout the system.
- Runtime State Management (
core/service/Service/RuntimeState.hs
):- Refactored runtime state handling to use standard data types.
- Simplified registration of default action handlers and improved extensibility.
🧹 Removed large-anon
Library and Anonymous Records
- Change: Eliminated the
large-anon
library and the use of anonymous records. - Reason: To simplify the codebase, reduce complexity, and improve performance.
- Changes Made:
- Replaced anonymous records with standard Haskell data types using
data
declarations. - Removed GHC extensions:
OverloadedRecordUpdate
,RebindableSyntax
, and unnecessaryOverloadedRecordDot
. - Updated all modules to use conventional records, enhancing compatibility and maintainability.
- Replaced anonymous records with standard Haskell data types using
- Note: This feature might be reintroduced in the future.
📝 Miscellaneous Changes
- Updated Cabal Files:
cli/nhcli.cabal
andcore/nhcore.cabal
updated.- Removed unused dependencies and GHC extensions.
- Added new dependencies:
http-conduit
,toml-parser
.
- Console and Logging Enhancements:
- Improved logging messages for better debugging and visibility.
- Standardized log formats and included more contextual information.
- Code Cleanup:
- Removed deprecated code and modules (e.g.,
core/yaml/Yaml.hs
,cli/src/Neo/Transpile.hs
). - Ensured all modules are updated to use new data type definitions.
- Removed deprecated code and modules (e.g.,
- Removed Modules:
- Deleted content of
core/core/Record.hs
as it's no longer necessary. - Removed dependencies on external libraries in
core/service/Html.hs
, provided placeholders instead.
- Deleted content of
⚠️ Breaking Changes
- Data Types:
- Replaced anonymous records with standard data types.
- Affects the structure of
State
,Event
,Action
, and other core components.
- GHC Extensions:
- Removed extensions that were previously required for anonymous records.
- Configuration Files:
- Users need to migrate their configuration files from YAML to TOML format.
- Module Imports:
- Updated module imports and exports.
- User code may require updates to accommodate these changes.
v0.4.0 - Enhanced CLI Parsing, Bug Fixes, and Architectural Improvements
New Features
-
Enhanced CLI Argument Parsing
- Introduced a new
Command
module with improved functionality for parsing CLI arguments. - Added support for
Path
type arguments in CLI parsing. - Integrated CLI argument parsing with the action system for seamless command handling.
- Introduced a new
-
Improved Text Formatting
- Added support for text interpolation using the
fmt
quasi-quoter, allowing for more readable string formatting.
- Added support for text interpolation using the
Bug Fixes
-
Terminal Rendering Issue Resolved
- Fixed a critical bug where the terminal was left in an unusable state after program exit.
- Implemented proper cleanup using
Vty.shutdown
to ensure the terminal returns to a normal state.
-
Exception Handling in Worker Threads
- Resolved an issue where worker threads couldn't stop gracefully on exceptions.
- Implemented a coordinated shutdown mechanism across all threads using a
shouldExit
flag.
Improvements and Refactoring
-
Service Architecture Overhaul
- Refactored the monolithic
Service
module into smaller, focused modules for improved maintainability:Service.Core
: Core types and interfacesService.ActionWorker
: Action processingService.EventWorker
: Event handling and model updatesService.RenderWorker
: View renderingService.RuntimeState
: Shared runtime state management
- Refactored the monolithic
-
Enhanced Error Handling
- Introduced a new
ActionResult
type in theAction
module for more robust error management. - Improved logging and error reporting throughout service components.
- Introduced a new
-
Core Module Updates
- Added new utility functions to
Array
,Basics
, andIO
modules, expanding the toolkit for developers.
- Added new utility functions to
These updates significantly improve the stability, functionality, and developer experience of the NeoHaskell CLI. Users should experience better performance, more reliable CLI interactions, and improved error handling.
v0.3.0 - Triggers and renaming
-
Major Architecture Refactoring:
- Renamed "Command" to "Action" throughout the codebase for clarity.
- Replaced "Platform" with "Service" as the core runtime concept.
- Introduced a new "Trigger" system for handling background processes and events.
-
Enhanced Time-based Functionality:
- Added a new
Time
module withtriggerEveryMilliseconds
function. - Implemented support for creating time-based triggers that generate events at specified intervals.
- Added a new
-
Improved Project Structure:
- Reorganized core modules into more logical groupings (e.g., 'system', 'service').
- Moved file-related operations to a dedicated 'File' module in the 'system' directory.
-
Updated CLI Implementation:
- Refactored the main
Neo
module to use the new Service and Action paradigms. - Added support for a simple counter demonstration using the new time-based trigger system.
- Refactored the main
-
Development Environment Improvements:
- Switched from ghcup to DevEnv for development environment setup.
- Updated README with new setup instructions for contributors.
-
Artifact System Updates:
- Expanded support for various artifact types, including React components and SVG images.
- Improved handling and rendering of different artifact types.
-
Dependencies and Libraries:
- Added 'nanotime' as a new dependency for precise time measurements.
- Updated cabal file to reflect new module structure and dependencies.
-
Documentation:
- Removed placeholder text from README, replacing it with actual project information and setup instructions.
- Added inline documentation for new concepts like Triggers and Actions.
v0.2.0 - Basic CLI Scaffolding
This release lays the foundation for building CLI applications in NeoHaskell using an Elm-inspired architecture. It introduces a basic scaffolding for CLI apps and significantly expands the core library functionality.
Key Features
-
CLI Application Architecture:
- Introduced a
Platform
module that provides an Elm-like architecture for CLI apps - Added
Command
andHtml
modules to support this architecture - Implemented a main event loop and rendering system using the
brick
library
- Introduced a
-
Enhanced Core Library:
- Added
Channel
,Var
, andConcurrentVar
modules for improved concurrency support - Introduced
AsyncIO
for asynchronous operations - Expanded
Array
module with new functions likeflatMap
andforEach
- Added
Version
module with parsing and quasiquoting capabilities
- Added
-
Improved Type System:
- Introduced
Unknown
type for dynamic typing scenarios - Added
Record
module for working with extensible records
- Introduced
-
New Modules:
Json
andYaml
modules for data serialization and deserializationOptionsParser
module for CLI argument parsingConsole
module with debugging capabilities
-
Trait System Enhancements:
- Reorganized and expanded trait modules (e.g.,
Appendable
,Applicable
,Combinable
) - Introduced
ToText
trait for consistent string conversion
- Reorganized and expanded trait modules (e.g.,
-
Project Structure:
- Restructured the project layout for better organization
- Added a basic project configuration file (
project.yaml
)
-
Development Environment:
- Updated
devenv.nix
for an improved development setup - Added CodeRabbit configuration for code review automation
- Updated
Breaking Changes
- Significant changes to the core library structure and module names
- Altered behavior of some existing functions to align with the new architecture
Notes
This release focuses on establishing the foundational architecture for NeoHaskell CLI applications. While it introduces many new features, it's important to note that the API is still in flux and may undergo further changes in future releases.
v0.1.0 - Barebones Core Library
Barebones Core Library
This version includes a fork of nri-prelude
that has been modified to follow the NeoHaskell goals.
What's Changed
- v0.1.0 - Barebones Core Library by @NickSeagull in #81
New Contributors
- @NickSeagull made their first contribution in #81
Full Changelog: https://github.com/neohaskell/NeoHaskell/commits/v0.1.0