Changelog for shakespeare-2.2.0

ChangeLog for shakespeare

2.2.0

You can now bind a component-producing function and reuse its sub-components within the same Hamlet block.

Example

data Modal = Modal
  { modalHeader :: Widget -> Widget
  , modalBody   :: Widget -> Widget
  }

modalWidget :: (Modal -> Widget) -> Widget
$component modal <- modalWidget
  $component modalHeader modal
    <h1>This is the title

  $component modalBody modal
    <p>This is the content

Conceptually, this desugars to:

^{ modalWidget $ \modal ->
     [whamlet|
       ^{ modalHeader modal [whamlet| <h1>This is the title |] }
       ^{ modalBody   modal [whamlet| <p>This is the content |] }
     |]
 }
<p>outside

Since everything here is just plain Haskell, you can freely pass additional data or parameters to your component-producing function—modalWidget and its subcomponents are ordinary functions. Only the outermost component (modalWidget in this case) needs to follow the (Modal -> Widget) -> Widget pattern; all nested subcomponents can have arbitrary types and arguments.

2.1.7.1

2.1.7

2.1.6

2.1.5

2.1.4

2.1.2

2.1.0

2.0.30

2.0.29

2.0.28

2.0.27

2.0.26

2.0.25.1

2.0.25

2.0.24.1

2.0.24

2.0.23

2.0.22

2.0.21

2.0.20

2.0.19

2.0.18

2.0.17

2.0.16

2.0.15

2.0.14.1

2.0.14

2.0.13

2.0.12.1

2.0.12

2.0.11.2

2.0.11.1

2.0.11

2.0.10

2.0.9

2.0.8.1

2.0.8

2.0.7

2.0.6

2.0.5

2.0.4.1

Fix build for GHC 7.10 #151

2.0.4

2.0.3

2.0.2.2

GHC 7.10 support

shakesepare 2.0.2

shakespeare-i18n supports message directories.

Hamlet 0.5.0 (August 29, 2010)

New in Hamlet 0.4.0