From 44c82f4cbd6c9c58d756dcd96585e4ced9a1e817 Mon Sep 17 00:00:00 2001 From: Jashweii Date: Thu, 16 May 2019 06:01:00 +0100 Subject: [PATCH] Removed Show superclass of Alpha --- src/Unbound/Generics/LocallyNameless/Alpha.hs | 2 +- src/Unbound/Generics/LocallyNameless/Bind.hs | 5 +++-- src/Unbound/Generics/LocallyNameless/Ignore.hs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Unbound/Generics/LocallyNameless/Alpha.hs b/src/Unbound/Generics/LocallyNameless/Alpha.hs index 573705b..e211380 100644 --- a/src/Unbound/Generics/LocallyNameless/Alpha.hs +++ b/src/Unbound/Generics/LocallyNameless/Alpha.hs @@ -157,7 +157,7 @@ isNullDisjointSet _ = False -- -- Minimal instance is entirely empty, provided that your type is an instance of -- 'Generic'. -class (Show a) => Alpha a where +class Alpha a where -- | See 'Unbound.Generics.LocallyNameless.Operations.aeq'. aeq' :: AlphaCtx -> a -> a -> Bool default aeq' :: (Generic a, GAlpha (Rep a)) => AlphaCtx -> a -> a -> Bool diff --git a/src/Unbound/Generics/LocallyNameless/Bind.hs b/src/Unbound/Generics/LocallyNameless/Bind.hs index b34d06f..03d494b 100644 --- a/src/Unbound/Generics/LocallyNameless/Bind.hs +++ b/src/Unbound/Generics/LocallyNameless/Bind.hs @@ -63,8 +63,9 @@ instance (Alpha p, Alpha t) => Alpha (Bind p t) where open ctx b (B p t) = B (open (patternCtx ctx) b p) (open (incrLevelCtx ctx) b t) - nthPatFind b = error $ "Binding " ++ show b ++ " used as a pattern" - namePatFind b = error $ "Binding " ++ show b ++ " used as a pattern" + nthPatFind _ = error "Binding used as a pattern" + + namePatFind _ = error "Binding used as a pattern" swaps' ctx perm (B p t) = B (swaps' (patternCtx ctx) perm p) diff --git a/src/Unbound/Generics/LocallyNameless/Ignore.hs b/src/Unbound/Generics/LocallyNameless/Ignore.hs index d20fcfa..54a2808 100644 --- a/src/Unbound/Generics/LocallyNameless/Ignore.hs +++ b/src/Unbound/Generics/LocallyNameless/Ignore.hs @@ -32,7 +32,7 @@ instance (Show t) => Show (Ignore t) where . showsPrec prec t . showString "->") -instance (Show t) => Alpha (Ignore t) where +instance Alpha (Ignore t) where aeq' _ _ _ = True fvAny' _ _ = pure isPat _ = inconsistentDisjointSet