
14 Aug
2021
14 Aug
'21
1:10 p.m.
On Sat, Aug 14, 2021 at 06:53:08PM +0200, Andreas Abel wrote:
How is the parser for Data.Version supposed to work?
```haskell import Data.Version
readVersion :: String -> Version readVersion = read
main :: IO () main = print $ readVersion "8.10.5"
-- *** Exception: Prelude.read: no parse ```
The Read instance is derived https://hackage.haskell.org/package/base-4.15.0.0/docs/src/Data-Version.html... so it behaves like any other derived Read instance: Prelude Data.Version> read "Version {versionBranch = [8,10,5], versionTags = []}" :: Version Version {versionBranch = [8,10,5], versionTags = []} Tom