Skip to content
This repository has been archived by the owner on Sep 7, 2018. It is now read-only.

Work around fromJust #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bgamari
Copy link
Contributor

@bgamari bgamari commented Dec 1, 2017

As noted in clash-lang/clash-compiler#274 Data.Maybe.fromJust has no unfolding in GHC 8.2. Here I remove instances of fromJust from clash-prelude. This works around the issue and perhaps offers slightly better error messages at the expense of some verbosity. It's not clear to me that this is the right trade-off but it's been a useful temporary hack for me.

Not only does this avoid fromJust, which lacks an unfolding in GHC 8.2, but the
errors are slightly more informative.
@bgamari
Copy link
Contributor Author

bgamari commented Jan 18, 2018

So in principle this shouldn't be needed due to clash-lang/clash-compiler@e5faf05, which replaces Ids which are known to bottom with an application of error. It's unclear why this wasn't happening in my case.

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

Successfully merging this pull request may close these issues.

1 participant