1. Doug Burke
  2. swish

Commits

Doug Burke  committed 45c31d9

Removed un-used containedIn member of the LDGraph type class

  • Participants
  • Parent commits b33cc9c
  • Branches default

Comments (0)

Files changed (6)

File CHANGES

View file
 0.7.0.0:
 
+  - Removed the containedIn element of the LDGraph type class as it
+    was unused.
+
   - Support version 0.9 of intern using conditional compilation in
     Data.Interned.URI (for ghc 7.4)
 

File TODO

View file
   An EDSL for the command language or for the base components
   such as RDFTriple/Graph?
 
-- remove the containedIn function of the LDGraph type class,
-  or implement it. It is currently unused in the code base.
-
 - would it make sense to add some form of XSDType type class which
   would contain to/from and show canonical String methods and some
   form of equality test; these could then be used to create the

File src/Swish/RDF/GraphClass.hs

View file
 {-|
 Labelled Directed Graph class
 
-Minimum required implementation:  `setArcs`, `getArcs` and `containedIn`
-(although @containedIn@ may be removed as it is currently unused).
+Minimum required implementation:  `setArcs` and `getArcs`.
 -}
 class (Eq (lg lb), Eq lb ) => LDGraph lg lb
     where
     nodes       :: lg lb -> [lb]
     nodes g     = foldl' union [] (map arcNodes (getArcs g))
     
-    -- | Test for graph containment in another.
-    --
-    -- At present this is unused and may be removed in a future release.
-    containedIn :: lg lb -> lg lb -> Bool 
-    
     -- | Update the arcs in a graph using a supplied function.
     update      :: ( [Arc lb] -> [Arc lb] ) -> lg lb -> lg lb
     update f g  = setArcs ( f (getArcs g) ) g

File src/Swish/RDF/GraphMem.hs

View file
     getArcs      = arcs
     setArcs as g = g { arcs=as }
     -- gmap f g = g { arcs = (map $ fmap f) (arcs g) }
-    containedIn = error "containedIn for LDGraph GraphMem lb is undefined!" -- TODO: should there be one defined?
 
 instance (Label lb) => Eq (GraphMem lb) where
     (==) = graphEq

File src/Swish/RDF/RDFGraph.hs

View file
 instance (Label lb) => LDGraph NSGraph lb where
     getArcs      = statements 
     setArcs as g = g { statements=as }
-    containedIn = error "containedIn for LDGraph NSGraph lb is undefined!" -- TODO: should there be one defined?
 
 {-|
 Add an arc to the graph. It does not relabel any blank nodes in the input arc,

File swish.cabal

View file
   .
   Changes:
   .
-  [Version 0.7.0.0] Attempt to support using versions 0.8 or 0.9 of the
-  @intern@ package.
+  [Version 0.7.0.0] Removed un-used @containedIn@ element of the @LDGraph@ type class.
+  Attempt to support using versions 0.8 or 0.9 of the @intern@ package.
   .
   [Version 0.6.5.3] Minor Hlint changes.
   .