From 0474960a73d7911dd9d1508fe4922ab7e314ee21 Mon Sep 17 00:00:00 2001 From: Aleksey Kliger Date: Fri, 31 Jul 2015 21:13:08 -0400 Subject: [PATCH] Make `Embed` an instance of `Ord` --- Changelog.md | 6 ++++++ src/Unbound/Generics/LocallyNameless/Embed.hs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 122f119..caacc9d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,11 @@ # 0.2 +* Incorporating some of the extras/oversights from + [clash-lib Unbound.Generics.LocallyNameless.Extra](https://github.com/clash-lang/clash-compiler/blob/master/clash-lib/src/Unbound/Generics/LocallyNameless/Extra.hs) + + * Make `Embed` an instance of `Ord` + * `NFData` instances (see below) + * Re-implement `freshen'` and `gfreshen` using a free monad to give GHC a chance to inline it all away. This changes the type of `gfreshen`. Major version bump. diff --git a/src/Unbound/Generics/LocallyNameless/Embed.hs b/src/Unbound/Generics/LocallyNameless/Embed.hs index b430496..14f49cf 100644 --- a/src/Unbound/Generics/LocallyNameless/Embed.hs +++ b/src/Unbound/Generics/LocallyNameless/Embed.hs @@ -32,7 +32,7 @@ import Unbound.Generics.LocallyNameless.Internal.Iso (iso) -- (You may also use the functions 'embed' and 'unembed', which -- additionally can construct or destruct any number of enclosing -- 'Shift's at the same time.) -newtype Embed t = Embed t deriving (Eq, Generic) +newtype Embed t = Embed t deriving (Eq, Ord, Generic) class IsEmbed e where -- | The term type embedded in the embedding 'e'