diff options
| author | adelon <22380201+adelon@users.noreply.github.com> | 2026-02-05 22:02:25 +0100 |
|---|---|---|
| committer | adelon <22380201+adelon@users.noreply.github.com> | 2026-02-05 22:02:25 +0100 |
| commit | f30325ed4d1ca2035b8d4ae4e3dc2fdca4e9ad44 (patch) | |
| tree | ab1f2460b38160c739d26dc9121ac50ca8ac3076 /source/Syntax | |
| parent | 67384ec803f5b64e463698bdef6b8a8cc7736193 (diff) | |
Cache hypothesis line
Diffstat (limited to 'source/Syntax')
| -rw-r--r-- | source/Syntax/Internal.hs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/Syntax/Internal.hs b/source/Syntax/Internal.hs index f2d9de3..a589a5a 100644 --- a/source/Syntax/Internal.hs +++ b/source/Syntax/Internal.hs @@ -643,26 +643,26 @@ data Task = Task , taskConjecture :: Formula } deriving (Show, Eq, Generic, Hashable) --- | Cached encoding of a hypothesis formula (after boolean contraction). --- Equality, ordering, and hashing ignore the cached encoding. -data EncodedHypothesis = EncodedHypothesis - { hypothesisFormula :: Formula +data Hypothesis = Hypothesis + { hypothesisMarker :: Marker + , hypothesisFormula :: Formula , hypothesisEncoded :: TextBuilder + , hypothesisLine :: TextBuilder } -instance Show EncodedHypothesis where - show (EncodedHypothesis f _) = "EncodedHypothesis " <> show f +instance Show Hypothesis where + show (Hypothesis marker formula _ _) = + "Hypothesis " <> show marker <> " " <> show formula -instance Eq EncodedHypothesis where - EncodedHypothesis f _ == EncodedHypothesis f' _ = f == f' +instance Eq Hypothesis where + Hypothesis m f _ _ == Hypothesis m' f' _ _ = (m, f) == (m', f') -instance Ord EncodedHypothesis where - compare (EncodedHypothesis f _) (EncodedHypothesis f' _) = compare f f' +instance Ord Hypothesis where + compare (Hypothesis m f _ _) (Hypothesis m' f' _ _) = + compare (m, f) (m', f') -instance Hashable EncodedHypothesis where - hashWithSalt s (EncodedHypothesis f _) = hashWithSalt s f - -type Hypothesis = (Marker, EncodedHypothesis) +instance Hashable Hypothesis where + hashWithSalt s (Hypothesis m f _ _) = hashWithSalt s (m, f) -- | Indicates whether a given proof is direct or indirect. |
