Releases: camfort/fortran-src
Releases · camfort/fortran-src
Version 0.14.0
Version 0.13.0
- better handling for line directives in free form lexer (#248, @mrd)
- don't inline solo includes in relevant F77 parsers (#245, @RaoulHC)
- add
-C=opts
CLI option for passing CPP arguments (#250, @mrd) - fix reformatting of 73 character long lines in naive mixed form reformatter
(#251, @ksromanov) - assume extended
Fortran77Legacy
rather thanFortran77
for*.f
,*.for
etc. files (#260) - allow comment lines between continuation lines in F77 parser (in standard)
(#257, @RaoulHC) - refactor Fortran type & value representation & expression evaluator without
Fortran kind-indexed GADTs; replace constant folder (#253, @raehik)
Version 0.12.0
- clean up F77 include inlining (#245, @RaoulHC)
- directly export F77 include parser at
f77lIncludesNoTransform
f77lIncIncludes :: String -> ByteString -> IO [Block A0]
should now be
defined by the user e.g.\fn bs -> throwIOLeft $ f77lIncludesNoTransform fn bs
- directly export F77 include parser at
Language.Fortran.Analysis.SemanticTypes
: alterSemType
constructor
TArray
to support assumed-size (e.g.integer arr(*)
) arrays (#244)Language.Fortran.Rewriter
: fix inline comment padding (#242, @RaoulHC)
Version 0.11.0
- add strong Fortran value & type representation at
Language.Fortran.Repr
(currently unused) (#235, @raehik)- operations are accurate to actual Fortran compiler behaviour e.g. integers
are stored fixed-width based on kind, so overflow behaviour is free - can recover a value's precise type (e.g.
INTEGER(8)
, including kind) via
pattern matching
- operations are accurate to actual Fortran compiler behaviour e.g. integers
- bump minimum compiler version to GHC 9.0
- improved comment handling in fixed form lexer: parse more comment syntax,
case sensitive, parse beyond column 72 (#237, @RaoulHC) - allow
ExpDataRef
constructor invarName
(fixes a crash in type analysis
#238) - add
Annotated
,Spanned
instances for intermediate AST data type
ArgumentExpression
- export statement-level "pre-prepared" parsers (previously, you would have to
define the parser yourself using parser utils and the Happy parser export) - export
Language.Fortran.Parser.byVerFromFilename :: Parser (ProgramFile A0)
, a replacement for the removed
Language.Fortran.Parser.Any.fortranParser
Version 0.10.2
Version 0.10.1
- export
ParseErrorSimple
fromParser
, not internal moduleParser.Monad
- rewriter fixes #232
Version 0.10.0
- Fix parsing kind parameters like
a_1
on literals. Previously, that would
be parsed as a kind parameter on a kind parameter. Now we don't do that,
following gfortran's behaviour.- Kind parameter representation is changed to explicitly say if it's an
integer kind or named constant kind, rather than reusingExpression
.
- Kind parameter representation is changed to explicitly say if it's an
- BOZ literals
- add some syntactic info (to enable checking standards conformance)
- export
bozAsTwosComp
function for reading as two's complement integer
- allow named constants in complex literals
- document
FirstParameter
,SecondParameter
behaviour/safety, fix erroneous
instances - fiddle with record selectors for some AST nodes (for better Aeson instances)
- pair IF/CASE conditions with their blocks, rather than splitting between two
lists ExpFunctionCall
andStCall
store procedure arguments inAList
([a]
)
instead ofMaybe AList
(Maybe [a]
)- Matching is safer because empty lists are always
[]
instead ofNothing
orJust []
. Construction for empty lists is more awkward. - A better solution would be to use an
AList
-like that also stores extra
syntactic information.
- Matching is safer because empty lists are always
- refactored a number of small AST nodes
ImpElement
ForallHeader
- add Hackage documentation to many individual AST constructors and fields
- improve include parser interface #227
- improve newline handling for block parsers #228
- fix some source span misses #225
Version 0.9.0
- Restructure parsing-related modules for code deduplication and better user
experience.- Now all user-facing parsers and the combinators to create them are in a
single module atLanguage.Fortran.Parser
. - The Happy parsers have fewer dependencies, so should no longer require a
recompile due to apparently unrelated changes.
- Now all user-facing parsers and the combinators to create them are in a
- Remove some deprecated shims (from the restructured modules).
- Merge fortran-src-extras
Language.Fortran.Extras.ModFiles.Extras
module
intoLanguage.Fortran.Util.ModFile
.
Version 0.8.0
- Merge declarator constructors. Now you differentiate between array and
scalar declarators by looking at the relevant field. See
Language.Fortran.AST.Declarator
for details. - Add
bozAsNatural :: Num a => Boz -> a
function to resolve BOZ constants as
integers
Version 0.7.0
- No longer treat
!
in strings as comments in continuation reformatter
(thanks @envp) #179 - CI builds on Mac; more release automation #181 #189
- Handle nonstandard kind parameter in parsing & type analysis #188
- Fix renamer ambiguity resulting in unusual name-related breakages (e.g.
ValVariable
not getting transformed toValIntrinsic
) #190 - Fully parse logical literals early (don't leave as
String
) #185- Code that touches
ValLogical
will have to be updated -- it should mean
removal of user-side parsing.
- Code that touches
- Explicitly parse integer literal kind parameter #191
- The
String
representation stored should now always be safe toread
to
a HaskellIntegral
.
- The
- Provide real literals in a semi-parsed "decomposed" format #193
- Kind parameters are also made explicit.
- Libraries with custom real literal parsing should be able to replace it
withreadRealLit :: (Fractional a, Read a) => RealLit -> a
.
- BOZ literal constants receive their own
Value
constructor (instead of
sharing one with integers) #194- Also parse them to an intermediate data type and provide handling
functions.
- Also parse them to an intermediate data type and provide handling
Note that kind parameters are disabled in fixed form parsers (F77, F66), so for
codebases targeting older standards, many changes will be along the lines of
ValInteger x
-> ValInteger x _
.