Releases: camfort/fortran-src
Releases · camfort/fortran-src
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 _
.
Version 0.6.1
- Properly include test data in package dist (in preparation for placing on
Stackage)
Version 0.6.0
- IF and CASE block constructs are now parsed as blocks at parsing instead of
as a post-parse transformation (no intermediate statement representation)
#154 - add ASSOCIATE block construct (Fortran 2003 parser only) #165
CommonGroup
AST nodes now storeDeclarator
s instead ofExpression
s
#173- various bug fixes related to their typing as a result
- CI now building on Windows, and save Linux & Windows executables for each
build - various bugfixes (#34, #155)
Version 0.5.0
- Introduce a second-stage type representation including kind info alongside
types, and resolving some types to semantic type with preset kinds (e.g.
DOUBLE PRECISION
->REAL(8)
).- Module is at Language.Fortran.Analysis.SemanticTypes . Includes utils and
instances. - The type analysis in Language.Fortran.Analysis.Types uses this
representation now (IDType
stores aSemType
instead of aBaseType
).
- Module is at Language.Fortran.Analysis.SemanticTypes . Includes utils and
- Move
CharacterLen
from parsing to type analysis.- This makes
BaseType
now a plain tag/enum with no extra info.
- This makes
- Add extended Fortran 90 real literal parser (parses kind info).
- Export some infer monad utils (potentially useful for running just parts of
type analysis) - Parser & lexer tweaks
- Fortran 77 parser should no longer attempt to parse kind selectors for
DOUBLE
types - Fix an edge case with the fixed form lexer (#150)
- Fortran 77 parser should no longer attempt to parse kind selectors for
Version 0.4.3
- Add Haddock documentation to AST module. Many parts of the AST now have
commentary on meaning and usage, and the Haddock page is sectioned. - Add STATIC statement (should be similar/identical to SAVE attribute) to
fixed-form lexer, support in Fortran 77 Extended parser. - Rewrite post-parse transformation handling. Parser modules now export more
parsers which allow you to select post-parse transformations to apply,
intended to enable quicker parsing if you know you don't need to certain
transformations. - Support percent data references in fixed-form lexer, enable in Fortran 77
parser - Now also testing on GHC 9.0
- Cache INCLUDE-ed files to avoid unnecessary re-parsing
Version 0.4.2
FortranVersion
fromParserMonad
moved to its own moduleLanguage.Fortran.Version
.ParserMonad
will re-export it for now.Version.deduceVersion
renamed todeduceFortranVersion
due to often being imported non-qualified.deduceVersion
remains as an alias.- Provide a continuation reformatter in
PrettyPrint
. Runs onString
s and doesn't guarantee the output is a valid program, so not enabled by default. - Add a diff-like rewriter, similar to reprinter but uses replacements rather than an annotated AST.
- Various internal de-duplication and changes.
Version 0.4.0
- ModGraph: parse Fortran files and assemble them into a dependency graph in order to construct automated 'build' plans for analysis and summarisation (e.g. with --make-mods option).
- Change name of compilation to summarisation. Remains as '-c' option.
- Allow multiple files and directories to be specified on command line.
- Search includedir recursively for fsmod files.
- Change format of fsmod-files so that they can contain [ModFile] since multiple Fortran files can be summarised into a single mod file.
- Introduce strictness and NFData dependencies across the board.
- Use Pipes to process large amounts of files in order to control memory usage and more efficiently process things.
- Parsing rules for StructStructures (thanks Raoul Charman)