Don't use fundeps, they are too much pain. Use associated types.
Don't use fundeps, they are too much pain. Use associated types. Class (Eq (Vertex g), Eq (Edge g)) => Graph g where type Edge g :: * type Vertex g :: * edges :: g -> Edge g src :: g -> Edge g -> Vertex g dst :: g -> Edge g -> Vertex g vertices :: g -> Vertex g vertices g = nub $ map (src g) (edges g) ++ map (dst g) (edges g) class Graph g => Subgraph g where extVertices :: g -> Edge g data Subgraph1 g where Subgraph1 :: Graph g => g -> Edge g -> Subgraph1 g instance Graph g => Graph (Subgraph1 g) where type Edge (Subgraph1 g) = Edge g type Vertex (Subgraph1 g) = Vertex g vertices (Subgraph1 g _) = vertices g edges (Subgraph1 g _) = edges g src (Subgraph1 g _) = src g dst (Subgraph1 g _) = dst g This looks somewhat more readable.
Edge g is the type of g's edges, etc. Note that I translated your code mechanically, without understanding what Subgraph1 does. Why do you need a GADT here, and what the second argument of the data constructor means? It is not used anywhere.
Nice, that looks beautiful! I read about these but haven't used them yet. The GADT was used to say that only types g which were graphs could be used to construct Subgraph1.
– gatoatigrado Jul 23 at 17:18.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.