Skip to content

Commit

Permalink
Fix cabal build (for version 3.2) and add newline in generated haskel…
Browse files Browse the repository at this point in the history
…l file (#138)

* add extra spacing for header

* fix cabal build error

Co-authored-by: Nes Cohen <[email protected]>
  • Loading branch information
nescohen and nes-group6 authored Aug 7, 2020
1 parent 45950a3 commit 3cf38bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion proto3-suite.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,13 @@ test-suite tests
cpp-options: -DDHALL

other-modules: ArbitraryGeneratedTestTypes
TestProto
TestCodeGen
TestProto
TestProtoImport
TestProtoOneof
TestProtoOneofImport
autogen-modules:
TestProto
TestProtoImport
TestProtoOneof
TestProtoOneofImport
Expand Down
2 changes: 1 addition & 1 deletion src/Proto3/Suite/DotProto/Generate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ renderHsModuleForDotProto
=> ([HsImportDecl],[HsDecl]) -> DotProto -> TypeContext -> m String
renderHsModuleForDotProto extraInstanceFiles dotProto importCtxt = do
haskellModule <- hsModuleForDotProto extraInstanceFiles dotProto importCtxt
return (T.unpack header ++ prettyPrint haskellModule)
return (T.unpack header ++ "\n" ++ prettyPrint haskellModule)
where
header = [Neat.text|
{-# LANGUAGE DeriveGeneric #-}
Expand Down

0 comments on commit 3cf38bc

Please sign in to comment.