Skip to content
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

changes for ghc-9 #19

Open
jwaldmann opened this issue Mar 5, 2021 · 1 comment
Open

changes for ghc-9 #19

jwaldmann opened this issue Mar 5, 2021 · 1 comment

Comments

@jwaldmann
Copy link

jwaldmann commented Mar 5, 2021

not all for ghc-9, some are required earlier.

 import Data.GADT.Show
+import Data.Type.Equality ((:~:)(Refl))
 import Data.GADT.Compare

and import package some, because of
https://github.com/obsidiansystems/dependent-sum/blob/73ab6cb23331f463c384290b4a1be542e68b323d/dependent-sum/ChangeLog.md#0621---2020-03-21

@jwaldmann jwaldmann changed the title Not in scope: data constructor ‘Refl’ - with ghc-9.0 Not in scope: data constructor ‘Refl’ Mar 5, 2021
jwaldmann pushed a commit to jwaldmann/smtlib2 that referenced this issue Mar 5, 2021
@jwaldmann jwaldmann changed the title Not in scope: data constructor ‘Refl’ changes for ghc-9 Mar 5, 2021
jwaldmann pushed a commit to jwaldmann/smtlib2 that referenced this issue Mar 5, 2021
@jwaldmann
Copy link
Author

There were several failable pattern matches, which would require MonadFail , which would later not match runIdentity. So I decided to leave the type constraint at Monad, and introduce a partial function

+unJust m = m >>= \ case Just x -> return x

and change pattern matches as in

-      Just errCond <- compositeGEQ idx (bound arr)
+      errCond <- unJust $ compositeGEQ idx (bound arr)

for the few failable matches at other types, I used LambdaCase directly

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

No branches or pull requests

1 participant