Add support for OverloadedLabels #244
|
@ -130,3 +130,13 @@ func = do
|
||||||
hello
|
hello
|
||||||
|]
|
|]
|
||||||
pure True
|
pure True
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
## OverloadedLabels
|
||||||
|
#test bare label
|
||||||
|
{-# LANGUAGE OverloadedLabels #-}
|
||||||
|
foo = #bar
|
||||||
|
|
||||||
|
#test applied and composed label
|
||||||
|
{-# LANGUAGE OverloadedLabels #-}
|
||||||
|
foo = #bar . #baz $ fmap #foo xs
|
||||||
|
|
|
@ -55,9 +55,15 @@ layoutExpr lexpr@(L _ expr) = do
|
||||||
HsRecFld{} -> do
|
HsRecFld{} -> do
|
||||||
-- TODO
|
-- TODO
|
||||||
briDocByExactInlineOnly "HsRecFld" lexpr
|
briDocByExactInlineOnly "HsRecFld" lexpr
|
||||||
HsOverLabel{} -> do
|
#if MIN_VERSION_ghc(8,6,0) /* ghc-8.6 */
|
||||||
-- TODO
|
HsOverLabel _ext _reboundFromLabel name ->
|
||||||
briDocByExactInlineOnly "HsOverLabel{}" lexpr
|
#elif MIN_VERSION_ghc(8,2,0) /* ghc-8.2 8.4 */
|
||||||
|
HsOverLabel _reboundFromLabel name ->
|
||||||
|
#else /* ghc-8.0 */
|
||||||
|
HsOverLabel name ->
|
||||||
|
#endif
|
||||||
|
let label = FastString.unpackFS name
|
||||||
|
in docLit . Text.pack $ '#' : label
|
||||||
HsIPVar{} -> do
|
HsIPVar{} -> do
|
||||||
-- TODO
|
-- TODO
|
||||||
briDocByExactInlineOnly "HsOverLabel{}" lexpr
|
briDocByExactInlineOnly "HsOverLabel{}" lexpr
|
||||||
|
|
Loading…
Reference in New Issue