Skip to content

Commit 8f49436

Browse files
committed
Version: retain alias for renamed deduceVersion
1 parent ec35b8d commit 8f49436

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
* `FortranVersion` from `ParserMonad` moved to its own module
44
`Language.Fortran.Version`. `ParserMonad` will re-export it for now.
5-
* `Version.deduceVersion` renamed to `deduceFortranVersion`.
5+
* `Version.deduceVersion` renamed to `deduceFortranVersion` due to often being
6+
imported non-qualified. `deduceVersion` remains as an alias.
67
* Provide a continuation reformatter in `PrettyPrint`. Runs on `String`s and
78
doesn't guarantee the output is a valid program, so not enabled by default.
89
* Add a diff-like rewriter, similar to

src/Language/Fortran/Version.hs

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module Language.Fortran.Version
88
, fortranVersionAliases
99
, selectFortranVersion
1010
, deduceFortranVersion
11+
, deduceVersion -- deprecated
1112
) where
1213

1314
import Data.Char (toLower)
@@ -67,3 +68,7 @@ deduceFortranVersion path
6768
| otherwise = Fortran90 -- unrecognized, default to F90
6869
where
6970
isExtensionOf = flip isSuffixOf $ map toLower path
71+
72+
-- | Alias for previous function name. TODO: deprecate eventually.
73+
deduceVersion :: FilePath -> FortranVersion
74+
deduceVersion = deduceFortranVersion

0 commit comments

Comments
 (0)