name: hid-examples
version: 0.4
synopsis: Examples to accompany the book "Haskell in Depth"
description:
This package provides source code examples which accompany the book
"Haskell in Depth" by Vitaly Bragilevsky (Manning Publications 2019).
You may want to get this package via @cabal get hid-examples@
and explore its content.
category: Sample Code
license: BSD3
author: Vitaly Bragilevsky
maintainer: Vitaly Bragilevsky <vit.bragilevsky@gmail.com>
github: bravit/hid-examples
extra-source-files:
- ChangeLog.md
- LICENSE
- README.md
- stack.yaml
- .travis.yml
- appveyor.yml
- package.yaml
data-files:
- data/*.*
- data/tests/iplookup/*.*
- texts/*.*
tested-with: GHC == 8.2.2, GHC == 8.4.3
dependencies: base >=4.10 && <4.13
_paths_workaround: &paths_workaround
generated-other-modules: Paths_hid_examples
executables:
# Chapter 2
locator:
main: locator.hs
<<: *paths_workaround
vocab1:
main: vocab1.hs
<<: *paths_workaround
dependencies: text >=1.2 && <1.3
vocab2:
main: vocab2.hs
<<: *paths_workaround
dependencies: text >=1.2 && <1.3
vocab3:
main: vocab3.hs
<<: *paths_workaround
dependencies: text >=1.2 && <1.3
showexpr:
main: expr/showexpr.hs
<<: *paths_workaround
dependencies: hint >=0.7 && <0.10
# Chapter 3
stockquotes:
source-dirs: stockquotes
main: Main.hs
<<: *paths_workaround
other-extensions:
- RecordWildCards
- OverloadedStrings
- FlexibleInstances
- DeriveGeneric
- DeriveAnyClass
dependencies:
- bytestring >=0.10 && <0.11
- blaze-html >=0.9 && <0.10
- optparse-applicative >=0.14 && <0.15
- time >=1.8 && <1.10
- text >=1.2 && <1.3
- fmt >=0.5 && <0.7
- safe >=0.3 && <0.4
- Chart >=1.8 && <1.10
- Chart-diagrams >=1.8 && <1.10
- cassava >=0.5 && <0.6
# Chapter 5
maybe:
main: maybe.hs
<<: *paths_workaround
dependencies:
- safe >=0.3 && <0.4
reader:
main: reader.hs
<<: *paths_workaround
other-extensions:
- NamedFieldPuns
dependencies:
- mtl >=2.0 && <2.3
genSQL:
main: genSQL.hs
<<: *paths_workaround
other-extensions:
- OverloadedStrings
- ViewPatterns
dependencies:
- text >=1.2 && <1.3
- mtl >=2.0 && <2.3
gcd:
main: gcd.hs
<<: *paths_workaround
dependencies:
- mtl >=2.0 && <2.3
weapons:
main: weapons.hs
<<: *paths_workaround
dependencies:
- mtl >=2.0 && <2.3
- random >=1.0 && <1.2
shunting-yard:
main: expr/shunting-yard.hs
<<: *paths_workaround
dependencies:
- mtl >=2.0 && <2.3
dicegame:
main: dicegame.hs
<<: *paths_workaround
dependencies:
- mtl >=2.0 && <2.3
- random >=1.0 && <1.2
ioref:
main: ioref.hs
<<: *paths_workaround
filecount:
main: filecount.hs
<<: *paths_workaround
dependencies:
- extra >=1.5 && <1.7
stref:
main: stref.hs
<<: *paths_workaround
# Chapter 6
du:
source-dirs: du
main: du.hs
<<: *paths_workaround
dependencies:
- mtl >=2.0 && <2.3
- filepath >= 1.4.1 && < 1.5
- directory >= 1.3 && < 1.4
- unix-compat >= 0.5 && < 0.6
- optparse-applicative >= 0.14 && < 0.15
other-extensions:
- GeneralizedNewtypeDeriving
- RecordWildCards
- FlexibleContexts
rpnexpr:
source-dirs: expr
main: rpnexpr.hs
<<: *paths_workaround
dependencies:
- mtl >= 2.0 && < 2.3
- transformers >= 0.5 && < 0.6
- safe >=0.3 && <0.4
other-extensions:
- FlexibleInstances
- MultiParamTypeClasses
- UndecidableInstances
- InstanceSigs
- LambdaCase
# Chapter 7
suntimes:
source-dirs: suntimes
main: Main.hs
<<: *paths_workaround
dependencies:
- mtl >= 2.0 && < 2.3
- transformers >= 0.5 && < 0.6
- time >=1.8 && <1.10
- text >=1.2 && <1.3
- safe-exceptions >= 0.1.5 && < 0.2
- aeson >= 1.2 && < 1.5
- req >= 1.0 && < 1.3
- http-client >= 0.4 && < 0.6
- data-default >= 0.5 && < 0.8
- system-locale >= 0.2 && < 0.4
- optparse-applicative >= 0.14 && < 0.15
- bytestring >= 0.10 && < 0.11
default-extensions:
- OverloadedStrings
other-extensions:
- RecordWildCards
- DeriveGeneric
# Chapter 8
iplookup:
main: iplookup/Main.hs
<<: *paths_workaround
dependencies:
- safe-exceptions >= 0.1.5 && < 0.2
- optparse-applicative >= 0.14 && < 0.15
- iplookup-lib
ipgen:
main: ipgen/Main.hs
<<: *paths_workaround
dependencies:
- ipgen-lib
- safe-exceptions >= 0.1.5 && < 0.2
- optparse-applicative >= 0.14 && < 0.15
- hedgehog >= 0.5 && < 0.7
internal-libraries:
# Chapter 8
iplookup-lib:
source-dirs: iplookup
exposed-modules:
- IPTypes
- LookupIP
- ParseIP
other-modules: []
dependencies:
- safe >= 0.3 && < 0.4
- split >= 0.2 && < 0.3
- safe-exceptions >= 0.1.5 && < 0.2
other-extensions:
- TypeApplications
ipgen-lib:
source-dirs: ipgen
exposed-modules:
- GenIP
other-modules: []
dependencies:
- iplookup-lib
- hedgehog >= 0.5 && < 0.7
tests:
# Chapter 8
iplookup-test:
main: Test.hs
<<: *paths_workaround
source-dirs: tests/iplookup
dependencies:
- iplookup-lib
- ipgen-lib
- tasty >= 0.11 && < 1.3
- tasty-hspec >= 1.1 && < 1.2
- tasty-hedgehog >= 0.1 && < 0.3
- hedgehog >= 0.5 && < 0.7
- tasty-golden >= 2.3 && < 2.4
- filepath >= 1.4.1 && < 1.5
iplookup-doctest:
main: tests/iplookup-doctest/Doctests.hs
<<: *paths_workaround
ghc-options:
- -threaded
dependencies:
- doctest >= 0.12 && < 0.17