diagrams / diagrams-doc

Documentation for the diagrams project
19 stars 27 forks source link

Fix Quick Start Tutorial for GHC 7.10 #89

Open ghost opened 9 years ago

ghost commented 9 years ago

Expand the code examples and add explanations, so that the tutorial's examples can be compiled without errors with GHC 7.10.

In the current state it is neccessary to either add type annotations or language pragmas (both of which are not given/explained in the tutorial) at various points in the tutorial. For Haskell beginners this might be very non-trivial to figure out.

From a didactic point of view it might be useful to add and explain type annotations to make it work, rather than language pragmas, as the types support the understanding for what's going on and they might be needed anyways when continuing to work with Diagrams. Language pragmas, however, seem quite black-magicky.

byorgey commented 9 years ago

For reference here are some specific problems redwyn was running into: http://lpaste.net/132571 http://lpaste.net/132572

The problem is that GHC 7.10 has gotten a lot stricter about requiring extensions that would be necessary to actually write down any inferred types. So this can be solved either by enabling some extra extensions, or by giving things more concrete type signatures that do not require the extensions.

fryguybob commented 9 years ago

Some gallery examples also suffer from this. Relevant 7.10 release note is here.