hegg-0.5.0.0: Fast equality saturation in Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Equality.Utils

Description

Misc utilities used accross modules

Synopsis

Documentation

newtype Fix (f :: Type -> Type) Source #

Fixed point newtype.

Ideally we should use the data-fix package, but right now we're rolling our own due to an initial idea to avoid dependencies to be easier to upstream into GHC (for improvements to the pattern match checker involving equality graphs). I no longer think we can do that without vendoring in some part of just e-graphs, but until I revert the decision we use this type.

Constructors

Fix 

Fields

Instances

Instances details
(forall a. Show a => Show (f a)) => Show (Fix f) Source # 
Instance details

Defined in Data.Equality.Utils

Methods

showsPrec :: Int -> Fix f -> ShowS #

show :: Fix f -> String #

showList :: [Fix f] -> ShowS #

(forall a. Eq a => Eq (f a)) => Eq (Fix f) Source # 
Instance details

Defined in Data.Equality.Utils

Methods

(==) :: Fix f -> Fix f -> Bool #

(/=) :: Fix f -> Fix f -> Bool #

cata :: Functor f => (f a -> a) -> Fix f -> a Source #

Catamorphism

hashString :: String -> Int Source #

Get the hash of a string.

This util is currently used to generate an Int used for the internal pattern variable representation from the external pattern variable representation (String)