diff --git a/source/library/Language/Haskell/Brittany/Internal/EPCompat.hs b/source/library/Language/Haskell/Brittany/Internal/EPCompat.hs new file mode 100644 index 0000000..16d753d --- /dev/null +++ b/source/library/Language/Haskell/Brittany/Internal/EPCompat.hs @@ -0,0 +1,13 @@ +module Language.Haskell.Brittany.Internal.EPCompat where + +import Data.Map (Map) + +type DeltaPos = () +type Comment = () + +type Annotation = () + +type Anns = Map AnnKey () +type AnnKey = () + +type EPAnns = () diff --git a/source/library/Language/Haskell/Brittany/Internal/LayouterBasics.hs b/source/library/Language/Haskell/Brittany/Internal/LayouterBasics.hs index e24d26c..cd8899a 100644 --- a/source/library/Language/Haskell/Brittany/Internal/LayouterBasics.hs +++ b/source/library/Language/Haskell/Brittany/Internal/LayouterBasics.hs @@ -37,7 +37,7 @@ import qualified Language.Haskell.GHC.ExactPrint.Types as ExactPrint -- import Language.Haskell.GHC.ExactPrint.Types (AnnKey, Annotation) import qualified Language.Haskell.GHC.ExactPrint.Utils as ExactPrint.Utils - +import Language.Haskell.Brittany.Internal.EPCompat processDefault :: ( @@ -294,9 +294,6 @@ hasAnyRegularCommentsConnected ast = -- isRegularComment :: (ExactPrint.Comment, ExactPrint.DeltaPos) -> Bool -- isRegularComment = (== Nothing) . ExactPrint.Types.commentOrigin . fst -type DeltaPos = () -type Comment = () - astConnectedComments :: Data ast => GHC.LocatedAn an ast @@ -344,8 +341,6 @@ hasAnnKeyword ast annKeyword = {-astAnn-} astAnn' ast <&> \case -- astAnn' :: Functor f => Located a -> f (Maybe b) astAnn' = undefined -type Annotation = () - -- astAnn -- :: (Data ast, MonadMultiReader (Map AnnKey Annotation) m) -- => GHC.Located ast diff --git a/source/library/Language/Haskell/Brittany/Internal/Layouters/Module.hs b/source/library/Language/Haskell/Brittany/Internal/Layouters/Module.hs index 8de45d7..7109a38 100644 --- a/source/library/Language/Haskell/Brittany/Internal/Layouters/Module.hs +++ b/source/library/Language/Haskell/Brittany/Internal/Layouters/Module.hs @@ -18,8 +18,9 @@ import Language.Haskell.Brittany.Internal.PreludeUtils import Language.Haskell.Brittany.Internal.Types import Language.Haskell.GHC.ExactPrint as ExactPrint import Language.Haskell.GHC.ExactPrint.Types - (DeltaPos(..), commentContents, deltaRow) + (commentContents) +import Language.Haskell.Brittany.Internal.EPCompat (Annotation) layoutModule :: ToBriDoc' HsModule diff --git a/source/library/Language/Haskell/Brittany/Internal/Types.hs b/source/library/Language/Haskell/Brittany/Internal/Types.hs index 822fd84..0e0c27d 100644 --- a/source/library/Language/Haskell/Brittany/Internal/Types.hs +++ b/source/library/Language/Haskell/Brittany/Internal/Types.hs @@ -27,8 +27,7 @@ import qualified Language.Haskell.GHC.ExactPrint.Types as ExactPrint.Types -- import Language.Haskell.GHC.ExactPrint.Types (Anns) import qualified Safe -type Anns = Map AnnKey () -type AnnKey = () +import Language.Haskell.Brittany.Internal.EPCompat data PerItemConfig = PerItemConfig { _icd_perBinding :: Map String (CConfig Maybe) diff --git a/source/library/Language/Haskell/Brittany/Internal/Utils.hs b/source/library/Language/Haskell/Brittany/Internal/Utils.hs index 5de87df..154461d 100644 --- a/source/library/Language/Haskell/Brittany/Internal/Utils.hs +++ b/source/library/Language/Haskell/Brittany/Internal/Utils.hs @@ -32,6 +32,7 @@ import qualified Language.Haskell.GHC.ExactPrint.Utils as ExactPrint.Utils import qualified Language.Haskell.Syntax.Extension as HsExtension import qualified Text.PrettyPrint as PP +import Language.Haskell.Brittany.Internal.EPCompat parDoc :: String -> PP.Doc @@ -74,8 +75,6 @@ instance Show ShowIsId where data A x = A ShowIsId x deriving Data -type EPAnns = () - customLayouterF :: LayouterF customLayouterF layoutF = DataToLayouter