Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump stack lts resolver from 10.5 to 19.31 (ghc 8.2.2 -> 9.0.2) #64

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ doc/
org/
tmp/
.stack-work/
dist-newstyle/
*.hp
*.prof
*.xsl
Expand All @@ -29,7 +30,7 @@ images/.directory


# Editor/IDE stuff
TAGS
*#
.vscode/
.idea/
.fleet/
verigraph.code-workspace
3 changes: 1 addition & 2 deletions src/CLI/ApplySndOrderRules.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ module ApplySndOrderRules
) where

import Control.Monad (when)
import Data.Monoid ((<>))
import Data.Text.Prettyprint.Doc (Pretty (..))
import Prettyprinter (Pretty (..))
import Options.Applicative
import System.IO (hPrint, stderr)

Expand Down
1 change: 0 additions & 1 deletion src/CLI/Cli.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module Main (main) where

import Data.Monoid ((<>))
import GlobalOptions
import Options.Applicative

Expand Down
1 change: 0 additions & 1 deletion src/CLI/ConcurrentRules.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module ConcurrentRules
) where

import Control.Monad
import Data.Monoid ((<>))
import Options.Applicative

import Abstract.Constraint
Expand Down
3 changes: 0 additions & 3 deletions src/CLI/CriticalPairAnalysis.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE TupleSections #-}
module CriticalPairAnalysis
( Options
, options
Expand All @@ -8,8 +7,6 @@ module CriticalPairAnalysis
import Control.Monad (when)
import Data.Matrix (Matrix)
import qualified Data.Matrix as Matrix
import Data.Maybe (maybe)
import Data.Monoid ((<>))
import qualified Data.Set as Set
import GHC.Conc (numCapabilities)
import Options.Applicative
Expand Down
1 change: 0 additions & 1 deletion src/CLI/GlobalOptions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module GlobalOptions
, morphismsConf
) where

import Data.Monoid ((<>))
import Options.Applicative

import Abstract.Category
Expand Down
7 changes: 3 additions & 4 deletions src/CLI/ModelChecker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ module Main (main) where
import Control.Monad
import qualified Data.IntMap as IntMap
import qualified Data.List as List
import Data.Monoid ((<>))
import Data.Text.Prettyprint.Doc (Pretty (..))
import qualified Data.Text.Prettyprint.Doc as PP
import Data.Text.Prettyprint.Doc.Render.Text (renderIO)
import Prettyprinter (Pretty (..))
import qualified Prettyprinter as PP
import Prettyprinter.Render.Text (renderIO)
import Options.Applicative
import System.Exit
import System.IO
Expand Down
1 change: 0 additions & 1 deletion src/CLI/ParallelIndependence.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Abstract.Rewriting.DPO
import Analysis.ParallelIndependent
import Control.Monad (unless, when)
import Data.Matrix hiding ((<|>))
import Data.Monoid ((<>))
import GlobalOptions
import Options.Applicative
import Rewriting.DPO.TypedGraphRule
Expand Down
1 change: 0 additions & 1 deletion src/CLI/Processes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module Processes

import Control.Monad
import Data.Maybe (fromJust, isJust)
import Data.Monoid ((<>))
import Data.Set (toList)
import GlobalOptions
import Options.Applicative
Expand Down
5 changes: 3 additions & 2 deletions src/library/Abstract/Category.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module Abstract.Category
, Cospan
) where

import Data.Kind (Type)

{- | Type class for representing categories in Verigraph.

Expand All @@ -20,7 +21,7 @@ there is an associated type of objects @Obj morph@.
-}
class (Eq morph) => Category morph where
-- | Data type that represents objects of the category
type Obj morph :: *
type Obj morph :: Type

-- | Morphism composition operator.
--
Expand All @@ -36,7 +37,7 @@ class (Eq morph) => Category morph where
codomain :: morph -> Obj morph

-- | Data type defining the different classes of morphism for this category.
data MorphismClass morph :: *
data MorphismClass morph :: Type
-- | Class containing all morphisms of the category.
anyMorphism :: MorphismClass morph
-- | Class containing all monomorphisms of the category.
Expand Down
4 changes: 2 additions & 2 deletions src/library/Base/Annotation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ module Base.Annotation

import Prelude hiding (drop)

import Data.Text.Prettyprint.Doc (Doc, Pretty (..), (<+>))
import qualified Data.Text.Prettyprint.Doc as PP
import Prettyprinter (Doc, Pretty (..), (<+>))
import qualified Prettyprinter as PP

import Base.Location

Expand Down
3 changes: 1 addition & 2 deletions src/library/Base/Location.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ module Base.Location
, Position(..)
) where

import Data.Monoid
import Data.Text.Prettyprint.Doc (Pretty (..))
import Prettyprinter (Pretty (..))


-- | Position within a text file.
Expand Down
2 changes: 2 additions & 0 deletions src/library/Base/Valid.hs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ data ValidationResult
deriving (Eq, Show)


instance Semigroup ValidationResult

instance Monoid ValidationResult where

mempty = IsValid
Expand Down
1 change: 0 additions & 1 deletion src/library/Category/TypedGraph/Finitary.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Abstract.Category
import Abstract.Category.Finitary
import Category.TypedGraph.Category
import Category.Graph ()
import Data.Graphs (Node(..), Edge(..))
import qualified Data.Graphs as Graph
import qualified Data.Graphs.Morphism as Untyped
import Data.TypedGraph
Expand Down
2 changes: 2 additions & 0 deletions src/library/Data/DList.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import Prelude hiding (null)
-- difference lists, allowing /O(1)/ checks if the list is empty.
newtype DList a = DList { unDList :: Maybe ([a] -> [a]) }

instance Semigroup (DList a)

instance Monoid (DList a) where
mempty = empty

Expand Down
4 changes: 2 additions & 2 deletions src/library/Data/Graphs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ module Data.Graphs (
import Data.Function (on)
import Data.List
import Data.Maybe (fromMaybe)
import Data.Text.Prettyprint.Doc (Pretty (..), (<+>))
import qualified Data.Text.Prettyprint.Doc as PP
import Prettyprinter (Pretty (..), (<+>))
import qualified Prettyprinter as PP

import Base.Cardinality
import Base.Valid
Expand Down
4 changes: 2 additions & 2 deletions src/library/Data/TypedGraph.hs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ removeNodeAndIncidentEdges :: NodeId -> TypedGraph n e -> TypedGraph n e
removeNodeAndIncidentEdges nodeId g@(GraphMorphism dom cod nodeMap edgeMap) =
case lookupNodeInContext nodeId g of
Nothing -> g
Just (_,_,nodeCtx) ->
Just _ ->
let
dom' = Graph.removeNodeAndIncidentEdges nodeId dom
notRemoved e = isJust (Graph.lookupEdge e dom')
Expand All @@ -308,5 +308,5 @@ removeNodeAndIncidentEdges nodeId g@(GraphMorphism dom cod nodeMap edgeMap) =

-- | Remove the given edge from the graph. /O(e)/.
removeEdge :: EdgeId -> TypedGraph n e -> TypedGraph n e
removeEdge e g@(GraphMorphism dom cod nodeMap edgeMap) =
removeEdge e (GraphMorphism dom cod nodeMap edgeMap) =
GraphMorphism (Graph.removeEdge e dom) cod nodeMap (Relation.removeFromDomain e edgeMap)
4 changes: 2 additions & 2 deletions src/library/GrLang/AST.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module GrLang.AST
) where

import Data.Text (Text)
import Data.Text.Prettyprint.Doc (Doc, Pretty (..), (<+>), (<>))
import qualified Data.Text.Prettyprint.Doc as PP
import Prettyprinter (Doc, Pretty (..), (<+>))
import qualified Prettyprinter as PP

import Base.Annotation (Annotated (..), Located)
import qualified Base.Annotation as Ann
Expand Down
13 changes: 7 additions & 6 deletions src/library/GrLang/Compiler.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module GrLang.Compiler
, compileRule
) where

import Control.Monad.Except (ExceptT (..), mapExceptT)
import Control.Monad.Except (mapExceptT)
import Control.Monad.State
import Data.Either (lefts, rights)
import Data.Map (Map)
Expand All @@ -19,9 +19,9 @@ import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text as Text
import Data.Text.Lazy.IO as Text
import Data.Text.Prettyprint.Doc (Pretty (..), (<>))
import qualified Data.Text.Prettyprint.Doc as PP
import qualified Data.Text.Prettyprint.Doc.Util as PP
import Prettyprinter (Pretty (..))
import qualified Prettyprinter as PP
import qualified Prettyprinter.Util as PP
import System.FilePath (takeDirectory, (</>))
import System.IO.Error (ioeGetErrorString, tryIOError)

Expand Down Expand Up @@ -171,9 +171,10 @@ createEdge edgeType src tgt loc Nothing = do
return newId


compileMorphism' :: MonadGrLang m => Maybe Location -> Located Text -> Located Text -> [MorphismDeclaration] -> ExceptT Error m GrMorphism
compileMorphism' :: (MonadGrLang m) => Maybe Location -> Located Text -> Located Text -> [MorphismDeclaration] -> ExceptT Error m GrMorphism
compileMorphism' loc domName codName decls = do
[domain, codomain] <- mapMCollectErrors getGraph [(domName, "domain"), (codName, "codomain")]
errors <- mapMCollectErrors getGraph [(domName, "domain"), (codName, "codomain")]
let [domain, codomain] = errors
compileMorphism loc domain codomain decls
where
getGraph (name, descr) = do
Expand Down
7 changes: 3 additions & 4 deletions src/library/GrLang/Monad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ import qualified Data.DList as DList
import Data.Functor.Identity
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Monoid
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Text (Text)
import Data.Text.Prettyprint.Doc (Doc, Pretty (..), (<+>))
import qualified Data.Text.Prettyprint.Doc as PP
import qualified Data.Text.Prettyprint.Doc.Util as PP
import Prettyprinter (Doc, Pretty (..), (<+>))
import qualified Prettyprinter as PP
import qualified Prettyprinter.Util as PP

import Base.Annotation (Annotated (..), Located, locatedDoc, locationOf)
import qualified Base.Annotation as Ann
Expand Down
4 changes: 2 additions & 2 deletions src/library/GrLang/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import Data.Functor (($>))
import Data.Functor.Identity
import Data.Text (Text)
import qualified Data.Text as Text
import Data.Text.Prettyprint.Doc (Pretty (..))
import qualified Data.Text.Prettyprint.Doc as PP
import Prettyprinter (Pretty (..))
import qualified Prettyprinter as PP
import Text.Parsec
import Text.Parsec.Error
import qualified Text.Parsec.Token as P
Expand Down
3 changes: 1 addition & 2 deletions src/library/GrLang/Value.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ import Data.Function (on)
import qualified Data.List as List
import qualified Data.Map as Map
import Data.Maybe (fromMaybe, isJust, mapMaybe)
import Data.Monoid ((<>))
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text as Text
import Data.Text.Prettyprint.Doc (Pretty (..))
import Prettyprinter (Pretty (..))

import Abstract.Category
import Base.Annotation (Annotated (..))
Expand Down
2 changes: 1 addition & 1 deletion src/library/Image/Dot/Prettyprint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
module Image.Dot.Prettyprint
(graph, digraph, node, undirEdge, dirEdge, attrList, subgraph, anonSubgraph) where

import Data.Text.Prettyprint.Doc
import Prettyprinter

-- | Pretty prints a (undirected) graph with the given name and list of statements.
graph :: Doc ann -> [Doc ann] -> Doc ann
Expand Down
4 changes: 2 additions & 2 deletions src/library/Image/Dot/StateSpace.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ module Image.Dot.StateSpace (stateSpace) where

import qualified Data.IntMap as IntMap
import qualified Data.Set as Set
import Data.Text.Prettyprint.Doc (Doc, Pretty (..))
import qualified Data.Text.Prettyprint.Doc as PP
import Prettyprinter (Doc, Pretty (..))
import qualified Prettyprinter as PP

import Abstract.Rewriting.DPO.StateSpace
import qualified Image.Dot.Prettyprint as Dot
Expand Down
4 changes: 2 additions & 2 deletions src/library/Image/Dot/TypedGraph.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ module Image.Dot.TypedGraph
, sndOrderRule
) where

import Data.Text.Prettyprint.Doc (Doc, Pretty (..), (<+>), (<>))
import qualified Data.Text.Prettyprint.Doc as PP
import Prettyprinter (Doc, Pretty (..), (<+>))
import qualified Prettyprinter as PP

import Abstract.Category
import Category.TypedGraphRule
Expand Down
2 changes: 1 addition & 1 deletion src/library/Logic/Ctl/Base.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Logic.Ctl.Base
, StateQuantified(..)
) where

import Data.Text.Prettyprint.Doc
import Prettyprinter


-- | CTL expressions
Expand Down
4 changes: 2 additions & 2 deletions src/library/Logic/Model.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module Logic.Model
) where

import Data.Maybe

import Data.Kind (Type)

-- | A Kripke structure is composed of a list of states and a list of
-- transitions between such states. States are labeled with the atomic
Expand Down Expand Up @@ -132,7 +132,7 @@ precedes ts s1 s2 =
-- | Type class for elements that have a numeric identifier and a list of associated values.
class Element e where
-- | Type of associated values.
type Payload e :: *
type Payload e :: Type

-- | Obtain the numeric identifier of an element.
elementId :: e -> Int
Expand Down
11 changes: 5 additions & 6 deletions src/library/Rewriting/DPO/TypedGraph.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ import Abstract.Category
import Abstract.Rewriting.DPO as DPO
import Category.TypedGraph.Category (toMorphismType, MorphismType(..))
import Category.TypedGraph
import Category.TypedGraph.Adhesive (isDeleted)
import Data.Graphs (Graph)
import qualified Data.Graphs as G
import qualified Data.Graphs.Morphism as GM
import Data.TypedGraph as GM
import Data.TypedGraph.Morphism as TGM
import Category.TypedGraph.Adhesive (isDeleted)
import Data.Graphs (Graph)
import qualified Data.Graphs as G
import Data.TypedGraph as GM
import Data.TypedGraph.Morphism as TGM
import Data.TypedGraph.Partition (generateGraphPartitions)
import Data.TypedGraph.Partition.ToVerigraph (mountTypedGraphMorphisms)
import Data.TypedGraph.Partition.FromVerigraph (createSatisfyingNacsDisjointUnion)
Expand Down
Loading