Skip to content

Commit ca0e416

Browse files
authored
Merge pull request #33 from VariantSync/benjamin/hierarchical-modules
Use hierarchical modules in the proofs subproject
2 parents e11f6fa + 5cea255 commit ca0e416

11 files changed

Lines changed: 19 additions & 21 deletions

File tree

proofs/app/ExampleFeatures.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module ExampleFeatures where
22

3-
import Propositions
3+
import Feature.Propositions
44

55
fFire = PVariable "Fire"
66
fGrass = PVariable "Grass"

proofs/app/VariationTreeExamples.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import Time
44
import VariationTree
55
import VariationDiff
6-
import PaperLabels
6+
import Labels.PaperLabels
77

8-
import Logic
9-
import Propositions
8+
import Feature.Logic
9+
import Feature.Propositions
1010
import ExampleFeatures
1111
import MainUtils
1212

proofs/package.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: proofs
22
version: 0.1.0.0
33
github: "githubuser/proofs"
4-
license: BSD3
4+
license: LGPL-3.0
55
author: "Author name here"
66
maintainer: "[email protected]"
77
copyright: "2021 Author name here"
@@ -28,8 +28,6 @@ dependencies:
2828
library:
2929
source-dirs:
3030
- src
31-
- src/feature
32-
- src/labels
3331

3432
executables:
3533
proofs-exe:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ License: GNU LGPLv3
44
Maintainer: [email protected]
55
Type class for reasoning on 'Logic's.
66
-}
7-
module Logic where
7+
module Feature.Logic where
88

99
class Negatable f where
1010
-- | Negation of a logical formula.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ License: GNU LGPLv3
44
Maintainer: [email protected]
55
Definition and operations of propositional logic.
66
-}
7-
module Propositions where
7+
module Feature.Propositions where
88

9-
import Logic
9+
import Feature.Logic
1010
import Data.List ( intercalate )
1111

1212
-- | Sum type similar to a grammar for building propositional formulas.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{-# LANGUAGE GADTs #-}
22

3-
module MinimalLabels where
3+
module Labels.MinimalLabels where
44

55
import VariationTree
6-
import Logic
6+
import Feature.Logic
77
import Data.Maybe ( fromJust )
88

99
data MinimalLabels f where
@@ -27,4 +27,4 @@ instance Comparable f => Eq (MinimalLabels f) where
2727
x == y = case (x, y) of
2828
(Artifact a, Artifact b) -> a == b
2929
(Mapping a, Mapping b) -> lequivalent a b
30-
(_, _) -> False
30+
(_, _) -> False
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{-# LANGUAGE GADTs #-}
22
{-# LANGUAGE StandaloneDeriving #-}
33

4-
module PaperLabels where
4+
module Labels.PaperLabels where
55

66
import VariationTree
7-
import Logic
7+
import Feature.Logic
88
import Data.Maybe ( fromJust )
99

1010
data PaperLabels f where
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{-# LANGUAGE GADTs #-}
22

3-
module WithElif where
3+
module Labels.WithElif where
44

55
import VariationTree
66
import Data.Maybe (fromJust)
7-
import Logic
7+
import Feature.Logic
88

99
data WithElif f where
1010
Artifact :: ArtifactReference -> WithElif f
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Completeness where
1+
module Proofs.Completeness where
22

33
{-
44
Definitions for fast lookup:
@@ -89,4 +89,4 @@ where
8989
Note that we cannot prove that all possible functions of type "VariationTree l f -> VariationTree l f -> VariationDiff l f" are valid diff as these functions could
9090
create any resulting diff (for example an empty diff). In fact, the above equalities are axioms any diff has to fulfill to be valid and we showed that there exists at
9191
least one valid diff.
92-
-}
92+
-}

proofs/src/VariationDiff.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Data.List ( intercalate )
66

77
import VariationTree
88
import Time
9-
import Logic
9+
import Feature.Logic
1010

1111
type Delta l f = Either (VTNode l f) (VTEdge l f) -> DiffType
1212

0 commit comments

Comments
 (0)