fortran-src-extras-0.2.0: Common functions and utils for fortran-src.
Safe HaskellNone
LanguageHaskell2010

Language.Fortran.Extras.Encoding

Description

Utils and Aeson orphan instances for common types in the AST.

Synopsis

Documentation

commonEncode :: ToJSON a => a -> ByteString Source #

Provide a wrapper for the encode function to allow indirect use in modules importing Encoding.

pprint77l :: IndentablePretty a => a -> String Source #

Render some AST element to a String using F77 legacy mode.

Orphan instances

FromJSON BaseType Source # 
Instance details

Methods

parseJSON :: Value -> Parser BaseType

parseJSONList :: Value -> Parser [BaseType]

FromJSON SrcSpan Source # 
Instance details

Methods

parseJSON :: Value -> Parser SrcSpan

parseJSONList :: Value -> Parser [SrcSpan]

FromJSON Position Source # 
Instance details

Methods

parseJSON :: Value -> Parser Position

parseJSONList :: Value -> Parser [Position]

FromJSON CharacterLen Source # 
Instance details

Methods

parseJSON :: Value -> Parser CharacterLen

parseJSONList :: Value -> Parser [CharacterLen]

FromJSON SemType Source # 
Instance details

Methods

parseJSON :: Value -> Parser SemType

parseJSONList :: Value -> Parser [SemType]

ToJSON BaseType Source # 
Instance details

Methods

toJSON :: BaseType -> Value

toEncoding :: BaseType -> Encoding

toJSONList :: [BaseType] -> Value

toEncodingList :: [BaseType] -> Encoding

ToJSON SrcSpan Source # 
Instance details

Methods

toJSON :: SrcSpan -> Value

toEncoding :: SrcSpan -> Encoding

toJSONList :: [SrcSpan] -> Value

toEncodingList :: [SrcSpan] -> Encoding

ToJSON Position Source # 
Instance details

Methods

toJSON :: Position -> Value

toEncoding :: Position -> Encoding

toJSONList :: [Position] -> Value

toEncodingList :: [Position] -> Encoding

ToJSON CharacterLen Source # 
Instance details

Methods

toJSON :: CharacterLen -> Value

toEncoding :: CharacterLen -> Encoding

toJSONList :: [CharacterLen] -> Value

toEncodingList :: [CharacterLen] -> Encoding

ToJSON SemType Source # 
Instance details

Methods

toJSON :: SemType -> Value

toEncoding :: SemType -> Encoding

toJSONList :: [SemType] -> Value

toEncodingList :: [SemType] -> Encoding