Add failing test for template haskell splices

For some reason `brittany` is failing to print exact for top level
splices. This may be an issue in `brittany` or `ghc-exact-print`, I'm
not sure. I've added failing tests to highlight this issue. This bug
causes `brittany` to produce syntactically invalid Haskell.

```
1) template haskell top level splice
      expected: Right
                {-# LANGUAGE TemplateHaskell #-}
                deriveFromJSON (unPrefix "assignPost") ''AssignmentPost

      but got: Right
                {-# LANGUAGE TemplateHaskell #-}
                deriveFromJSON (unPrefix "assignPost") ''
```
pull/71/head
Evan Rutledge Borden 2017-11-28 18:46:57 -05:00
parent d1606932f8
commit 910937985a
1 changed files with 18 additions and 1 deletions

View File

@ -590,6 +590,23 @@ func =
++ [ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc] ++ [ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]
###############################################################################
###############################################################################
###############################################################################
#group template haskell
###############################################################################
###############################################################################
###############################################################################
#test top level splice
{-# LANGUAGE TemplateHaskell #-}
deriveFromJSON (unPrefix "assignPost") ''AssignmentPost
#test top level splice wrapped
{-# LANGUAGE TemplateHaskell #-}
$(deriveFromJSON (unPrefix "assignPost") ''AssignmentPost)
############################################################################### ###############################################################################
############################################################################### ###############################################################################
############################################################################### ###############################################################################
@ -1057,7 +1074,7 @@ foo =
## from the input; i cannot really express this yet with the current ## from the input; i cannot really express this yet with the current
## test-suite. ## test-suite.
## #test ayaz ## #test ayaz
## ##
## myManageHook = ## myManageHook =
## composeOne [isFullscreen -?> doFullFloat, isDialog -?> doFloat, transience] ## composeOne [isFullscreen -?> doFullFloat, isDialog -?> doFloat, transience]
## <+> composeAll ## <+> composeAll