diff --git a/README.md b/README.md index f7edffb..29b2463 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Read Online: If you'd like a physical copy of the text you can either print it out for yourself (see Printable PDF) or purchase one from a publisher. The price is -at-cost since the book is open source and free. +at-cost since the text is open source and free. * [**Blurb Publisher**](https://www.blurb.co.uk/b/9958091-what-i-wish-i-knew-when-learning-haskell) @@ -39,9 +39,9 @@ Markdown file which generates all other targets. [tutorial.md](./tutorial.md) Source code is directly included from the `src` directory into the resulting -document. To fix a change or include a new sample edit the example source code -directly. In addition add the new file to the `ci` script inside of the folder -so it is run in the continuous integration script. +document by the preprocessor. To fix a change or include a new sample edit the +example source code directly. In addition add the new file to the `ci` script +inside of the folder so it is run in the continuous integration script. Source Code ----------- diff --git a/src/32-cryptography/Pairing.hs b/src/32-cryptography/Pairing.hs index d01cc19..a717ed9 100644 --- a/src/32-cryptography/Pairing.hs +++ b/src/32-cryptography/Pairing.hs @@ -23,10 +23,6 @@ q = main :: IO () main = do - putText "P:" - print p - putText "Q:" - print q putText "e(P, Q):" print (pairing p q) putText "e(P, Q) is bilinear:" diff --git a/src/32-cryptography/example.cabal b/src/32-cryptography/example.cabal index 61b6b73..5659523 100644 --- a/src/32-cryptography/example.cabal +++ b/src/32-cryptography/example.cabal @@ -1,21 +1,20 @@ -name: example -version: 0.1 -author: Stephen Diehl -maintainer: stephen.m.diehl@gmail.com -copyright: 2020 Stephen Diehl -category: Documentation -build-type: Simple -cabal-version: >=1.10 -tested-with: GHC == 7.6.3 +cabal-version: >=1.10 +name: example +version: 0.1 +copyright: 2020 Stephen Diehl +maintainer: stephen.m.diehl@gmail.com +author: Stephen Diehl +tested-with: GHC ==7.6.3 +category: Documentation +build-type: Simple -library - - build-depends: - base >= 4.10 && < 4.14, - cryptonite >= 0.20 && < 0.30, - pairing >= 1.0 && < 2.0, - elliptic-curve >= 0.3 && < 0.4, - galois-field >= 1.0 && < 1.1, - memory -any, - bytestring -any - default-language: Haskell2010 +library + default-language: Haskell2010 + build-depends: + base >=4.10 && <4.14 + , bytestring >=0.10.8.2 && <0.11 + , cryptonite >=0.20 && <0.30 + , elliptic-curve >=0.3 && <0.4 + , galois-field >=1.0 && <1.1 + , memory >=0.14.0 && <0.16 + , pairing >=1.0 && <2.0 diff --git a/tutorial.md b/tutorial.md index 1d2fffe..271538d 100644 --- a/tutorial.md +++ b/tutorial.md @@ -657,7 +657,7 @@ build-depends: transformers >= 0.2 && <0.6, text >= 1.2 && <1.3, bytestring >= 0.10 && <0.11, - mtl >= 2.1 && <2.3, + mtl >= 2.1 && <2.3 ``` Individual lines in the version specification can be dependent on other @@ -2245,7 +2245,7 @@ on :: (b -> b -> c) -> (a -> b) -> a -> a -> c This is used quite often in sort functions. For example we can write a custom sort function which sorts a lists of lists based on length. -``` +```haskell λ: import Data.List λ: sortSize = sortBy (compare `on` length) λ: sortSize [[1,2], [1,2,3], [1]] @@ -2661,7 +2661,7 @@ replacement message. ```haskell module Widget {-# DEPRECATED "This module is deprecated." #-} -module Widget {-# WARNING "This module is dangerous." #-}where +module Widget {-# WARNING "This module is dangerous." #-} ``` Newtypes