From 697568a8c3d175bd03c4805c745120be624ce42a Mon Sep 17 00:00:00 2001 From: Felix Dilke Date: Fri, 30 Jan 2026 18:17:41 +0000 Subject: [PATCH] delinting --- haskell-experiments/src/Datalog/NaiveQE.hs | 4 ++-- haskell-experiments/src/Datalog/QueryEngine.hs | 4 ++-- haskell-experiments/src/Datalog/Rules.hs | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/haskell-experiments/src/Datalog/NaiveQE.hs b/haskell-experiments/src/Datalog/NaiveQE.hs index 4682737..a837537 100644 --- a/haskell-experiments/src/Datalog/NaiveQE.hs +++ b/haskell-experiments/src/Datalog/NaiveQE.hs @@ -1,8 +1,8 @@ {-# HLINT ignore "Redundant flip" #-} -{-# LANGUAGE ImportQualifiedPost #-} +-- {-# LANGUAGE ImportQualifiedPost #-} +-- {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} -{-# LANGUAGE InstanceSigs #-} {-# LANGUAGE BlockArguments #-} module Datalog.NaiveQE where diff --git a/haskell-experiments/src/Datalog/QueryEngine.hs b/haskell-experiments/src/Datalog/QueryEngine.hs index 7e0d3c4..5d905b5 100644 --- a/haskell-experiments/src/Datalog/QueryEngine.hs +++ b/haskell-experiments/src/Datalog/QueryEngine.hs @@ -1,8 +1,8 @@ {-# HLINT ignore "Redundant flip" #-} -{-# LANGUAGE ImportQualifiedPost #-} +-- {-# LANGUAGE ImportQualifiedPost #-} +-- {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} -{-# LANGUAGE InstanceSigs #-} {-# LANGUAGE BlockArguments #-} module Datalog.QueryEngine where diff --git a/haskell-experiments/src/Datalog/Rules.hs b/haskell-experiments/src/Datalog/Rules.hs index 754e58f..6094d04 100644 --- a/haskell-experiments/src/Datalog/Rules.hs +++ b/haskell-experiments/src/Datalog/Rules.hs @@ -28,7 +28,7 @@ extractRule ruleText = appendRule :: Relation -> RelationRule -> Relation appendRule relation rule = relation { - _rules = rule : (_rules relation) + _rules = rule : _rules relation } toRuleBodyElement :: BodyConstraint -> RuleBodyElement @@ -69,7 +69,7 @@ data (DatalogDB db) => RuleContext db = RuleContext } digestHead :: (DatalogDB db) => db -> Relation -> Literal -> RuleContext db -digestHead db relation (Literal neg relationName terms) = +digestHead db relation (Literal _ _ terms) = RuleContext { __relation = relation , _variableNames = variableNames @@ -79,13 +79,13 @@ digestHead db relation (Literal neg relationName terms) = } where variableNames = nub $ extractVariableNames terms - entries' = nub $ (headTermToElement variableNames) <$> terms + entries' = nub $ headTermToElement variableNames <$> terms extraConstants = Set.fromList $ mapMaybe extractConstant entries' where extractConstant :: RuleElement -> Maybe Constant extractConstant (RuleElementConstant constant) = Just constant extractConstant _ = Nothing digestBody :: (DatalogDB db) => Literal -> RuleContext db -> RuleContext db -digestBody (Literal neg subRelationName subTerms) context = +digestBody (Literal _ subRelationName subTerms) context = context { _variableNames = variableNames , _bodyConstraints = newConstraint : constraints