Skip to content

Introduce Template Haskell companion library. #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 19, 2020

Conversation

jonathanknowles
Copy link
Contributor

@jonathanknowles jonathanknowles commented Feb 17, 2020

This PR:

  • Introduces a Template Haskell companion library bech32-th, with an accompanying test suite.
  • Adjusts the directory structure so that both libraries are included in a single repository.
  • Adjusts the automated build so that both libraries are built and tested by a single script.
  • Removes inappropriate flags that were identified by cabal check.
  • Bumps the version to 1.0.2, in preparation for a new release.

@jonathanknowles jonathanknowles self-assigned this Feb 17, 2020
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/bech32-th branch 4 times, most recently from f1b4ca0 to 27b4115 Compare February 17, 2020 10:32
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/bech32-th branch 2 times, most recently from 97caeca to 5bd598a Compare February 18, 2020 08:05
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/bech32-th branch from 5bd598a to 574cf25 Compare February 18, 2020 08:13
@jonathanknowles jonathanknowles changed the title WIP: Introduce Template Haskell companion library. Introduce Template Haskell companion library. Feb 18, 2020
.travis.yml Outdated
- cabal-3.0 haddock
- cabal-3.0 sdist
- pushd bech32 && cabal-3.0 check && popd
- pushd bech32-th && cabal-3.0 check && popd
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately we can't run a cabal check all here, as this is not yet supported. (See haskell/cabal#6282)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check may not work, but what about test ?

The test command still works. See a couple of lines down:

  - cabal-3.0 test all --test-show-details=streaming

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's right, check just checks that the packaging info is right. Never mind me. Yes I think your solution works, but so does:

(cd bech32  && cabal-3.0 check)
(cd bech32-th && cabal-3.0 check)

and has better behavior in the failure case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(cd bech32 && cabal-3.0 check)
(cd bech32-th && cabal-3.0 check)

That's a great suggestion. I'll make the change: 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erikd: Fixed in 1f78b8e.

@@ -0,0 +1,5 @@
# ChangeLog for `bech32-th`

## 1.0.2 -- 2020-02-18
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We start immediately with 1.0.2 so that bech32 and bech32-th can be kept in lockstep with one another.

This package adds Template-Haskell-specific extensions to the `bech32`
library.

In particular, it includes quasi-quoters capable of checking Bech32
string literals at compile-time.
Unfortunately, there is no `cabal check all`. See:

haskell/cabal#6282

So we have to manually change directories before we can issue the `cabal
check` command.
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/bech32-th branch from 574cf25 to f156577 Compare February 19, 2020 02:01
@jonathanknowles jonathanknowles merged commit 4959d84 into master Feb 19, 2020
@jonathanknowles jonathanknowles deleted the jonathanknowles/bech32-th branch February 19, 2020 02:45
forM_ invalidHumanReadableParts $ \(hrp, expectedError) ->
it (show hrp) $
mkHumanReadablePartExp hrp
`shouldThrow` (== expectedError)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@KtorZ KtorZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants