Skip to content

Commit

Permalink
Release v0.3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alt-romes committed Dec 9, 2022
1 parent ee34a63 commit 52c0143
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## 0.3.0.0 -- 2022-12-09

* A better `Analysis` tutorial in the README.

* Complete `Analysis` redesign.
Expand All @@ -26,6 +28,9 @@
* An `EGraph` now also has two type parameters instead of one (the latter is
the language is the former the domain of the analysis).

* Allow customization of Schedulers through parameters (by accepting a scheduler
rather than a proxy for it)

## 0.2.0.0 -- 2022-09-19

* Expose `runEqualitySaturation` to run equality saturation on existing e-graphs
Expand Down
4 changes: 2 additions & 2 deletions hegg.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 2.4
name: hegg
version: 0.2.0.0
Tested-With: GHC ==9.4.1 || ==9.2.2 || ==9.0.2 || ==8.10.7
version: 0.3.0.0
Tested-With: GHC ==9.4.2 || ==9.2.2 || ==9.0.2 || ==8.10.7
synopsis: Fast equality saturation in Haskell

description: Fast equality saturation and equality graphs based on "egg:
Expand Down
2 changes: 2 additions & 0 deletions src/Data/Equality/Graph.hs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ import Data.Equality.Utils
-- instance Ord1 l => Monoid (EGraph l) where
-- mempty = EGraph emptyUF mempty mempty mempty

-- | Represent an expression (in it's fixed point form) in an e-graph.
-- Returns the updated e-graph and the id from the e-class in which it was represented.
represent :: forall a l. (Analysis a l, Language l) => Fix l -> EGraph a l -> (ClassId, EGraph a l)
represent = cata (flip $ \e -> uncurry add . first Node . (`runState` e) . traverse (gets >=> \(x,e') -> x <$ put e'))

Expand Down

0 comments on commit 52c0143

Please sign in to comment.