{-# OPTIONS_GHC -fno-warn-orphans #-}
module Language.Fortran.Extras.Encoding where
import Data.Aeson ( ToJSON
, FromJSON
, encode
)
import Language.Fortran.AST ( BaseType )
import Language.Fortran.Analysis.SemanticTypes
( CharacterLen
, SemType
)
import Language.Fortran.Version ( FortranVersion(..) )
import Language.Fortran.PrettyPrint ( IndentablePretty
, pprintAndRender
)
import Language.Fortran.Util.Position ( Position
, SrcSpan
)
import Data.ByteString.Lazy ( ByteString )
commonEncode :: ToJSON a => a -> ByteString
commonEncode :: forall a. ToJSON a => a -> ByteString
commonEncode = a -> ByteString
forall a. ToJSON a => a -> ByteString
encode
instance ToJSON Position
instance FromJSON Position
instance ToJSON SrcSpan
instance FromJSON SrcSpan
instance ToJSON CharacterLen
instance FromJSON CharacterLen
instance ToJSON SemType
instance FromJSON SemType
instance ToJSON BaseType
instance FromJSON BaseType
pprint77l :: IndentablePretty a => a -> String
pprint77l :: forall a. IndentablePretty a => a -> String
pprint77l a
s = FortranVersion -> a -> Indentation -> String
forall t.
IndentablePretty t =>
FortranVersion -> t -> Indentation -> String
pprintAndRender FortranVersion
Fortran77Legacy a
s Indentation
forall a. Maybe a
Nothing