Support nullary data types
Add tests for nullary prefix data types and nullary record data types.pull/259/head
parent
0381b9fe24
commit
80f370a8e1
|
@ -318,6 +318,11 @@ func = f
|
||||||
###############################################################################
|
###############################################################################
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
#test nullary data type
|
||||||
|
data Foo = Bar {}
|
||||||
|
|
||||||
|
data Biz = Baz
|
||||||
|
|
||||||
#test single record
|
#test single record
|
||||||
data Foo = Bar { foo :: Baz }
|
data Foo = Bar { foo :: Baz }
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,7 @@ createDetailsDoc consNameStr details = case details of
|
||||||
IndentPolicyLeft -> docAlt [singleLine, leftIndented]
|
IndentPolicyLeft -> docAlt [singleLine, leftIndented]
|
||||||
IndentPolicyMultiple -> docAlt [singleLine, multiIndented]
|
IndentPolicyMultiple -> docAlt [singleLine, multiIndented]
|
||||||
IndentPolicyFree -> docAlt [singleLine, multiIndented]
|
IndentPolicyFree -> docAlt [singleLine, multiIndented]
|
||||||
RecCon (L _ []) -> docEmpty
|
RecCon (L _ []) -> docSeq [docLit consNameStr, docSeparator, docLit $ Text.pack "{}"]
|
||||||
#if MIN_VERSION_ghc(8,6,0) /* ghc-8.6 */
|
#if MIN_VERSION_ghc(8,6,0) /* ghc-8.6 */
|
||||||
RecCon lRec@(L _ [lField@(L _ (ConDeclField _ext names t _))]) ->
|
RecCon lRec@(L _ [lField@(L _ (ConDeclField _ext names t _))]) ->
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue