Comments (4)
Big thanks to nick8325 for helping me understand this behavior in nick8325/quickcheck#53!
from fgl.
By the way - I'm using fgl 5.5.1.0.
from fgl.
Hmmmm.... this is a bug in that:
let g = Graph.mkGraph [(1,())] [(1,2,True), (2,1,False)] :: Gr () Bool
Should return an error: you're referencing nodes that don't exist in the graph!
(And that's what I get when I try this:
mkGraph *** Exception: Data/Graph/Inductive/Graph.hs:229:5-38: Irrefutable pattern failed for pattern (Data.Maybe.Just (pr,
_,
la,
su),
g')
but that might be from changes I've made since the release.)
This occurs, as there is no validation that occurs in mkGraph
; there are two possible ways of handling this:
- Add validation to
mkGraph
; this will make it slower and less efficient for the (more common I think) cases of correct usage - Keep doing what it does (in HEAD) of throwing an error
Unless there's a compelling reason, I don't think I'll change the behaviour.
To be able to use QuickCheck with FGL, see #12.
from fgl.
Ah, I see. Good to know that the behavior has been fixed in master. Thanks!
from fgl.
Related Issues (20)
- DynGraph contraint seems redundant in prettify
- GHC 9.4 compatibility
- Add tag for 5.8.1.0
- 5.8.1.0 crashes when computing dominators in graphs with unreachable nodes HOT 1
- fails to build with ghc-9.6 HOT 3
- Release tag for version 5.8.2.0 is missing HOT 1
- fgl and fgl-arbitrary need bumps for QuickCheck 2.10 and QuickCheck 2.11 HOT 2
- FLG doesn't build with MonadFailDesugaring HOT 4
- fgl-5.6.0.0 fails with ghc-8.6.1 HOT 10
- fgl and fgl-arbitrary incompatible with current QuickCheck
- Data.Graph.Inductive.Basic.undir appears to handle self-edges wrongly
- Data.Graph.Inductive.Query.TransClos.rc is wrongly implemented HOT 5
- Data/Graph/Inductive/NodeMap.hs:159:9-32: Non-exhaustive patterns in Just es' HOT 2
- gsel ignores edges to nodes HOT 1
- Add plain text synonym for `&`. HOT 2
- fgl-arbitrary on Hackage is extremely outdated. HOT 2
- `gfiltermap` can result in inconsistent graph. HOT 1
- Is the PatriciaTree matchGr too strict?
- Documentation updates for predicate functions that rely on match HOT 1
- The insMapEdge family of functions are partial HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fgl.