brittany
brittany copied to clipboard
Newlines between array items are not preserved
I have a program that looks like this:
queryType :: ObjectType Database ()
queryType = query
Nothing
[ fieldWithArgs
"account"
Nothing
accountType
(args1 (arg "id" Nothing intInputType))
(\context () id ->
return (databaseTableLookup id (databaseAccounts context))
)
, fieldWithArgs
"post"
Nothing
postType
(args1 (arg "id" Nothing intInputType))
(\context () id -> return (databaseTableLookup id (databasePosts context)))
, fieldWithArgs
"comment"
Nothing
commentType
(args1 (arg "id" Nothing intInputType))
(\context () id ->
return (databaseTableLookup id (databaseComments context))
)
]
…but when Brittany runs the newlines are removed and the end result is this:
queryType :: ObjectType Database ()
queryType = query
Nothing
[ fieldWithArgs
"account"
Nothing
accountType
(args1 (arg "id" Nothing intInputType))
(\context () id ->
return (databaseTableLookup id (databaseAccounts context))
)
, fieldWithArgs
"post"
Nothing
postType
(args1 (arg "id" Nothing intInputType))
(\context () id -> return (databaseTableLookup id (databasePosts context)))
, fieldWithArgs
"comment"
Nothing
commentType
(args1 (arg "id" Nothing intInputType))
(\context () id ->
return (databaseTableLookup id (databaseComments context))
)
]