Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Haskell
Wiki community
Recent changes
Random page
HaskellWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Diagrams/Dev/Expression
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Pros === * No more backend type parameter "infecting" the types. 2D diagrams have the simple type <code>Diagram R2</code>. * Would allow getting rid of the dummy "backend token" parameter to many functions * The above makes it much easier to hand a diagram to different backends, or even to use multiple backends at once. * More graceful degrading of service---if a diagram has a single primitive that is not supported by backend X, it is still possible to use that diagram with backend X, for the price of one missing primitive. * In conjunction with the above, this should make it possible to add a choice combinator, <code>orElse :: Diagram v -> Diagram v -> Diagram v</code>, which instructs a backend to use the first diagram it fully supports. This would make it even easier to construct diagrams that are portable between different backends, letting the user explicitly supply fallbacks in cases of differing features. * As diagrams continues to grow it is becoming increasingly clear that we will need some testing frameworks. If a diagram is defined as <code>Diagram R2</code> we would be able to create tests that pass if they produce a diagram that matches a reference diagram. * Consistency with attributes. We already use dynamic typing for attributes and we may want to have the backends handle attributes and primitives they do not support the same way.
Summary:
Please note that all contributions to HaskellWiki are considered to be released under simple permissive license (see
HaskellWiki:Copyrights
for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!
Cancel
Editing help
(opens in new window)
Toggle limited content width