You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a heads-up issue in case someone will be banging their head against the wall as I did today.
haskell.nix backports GHC MR !948. It’s easy to see that this change is breaking the interface of template-haskell. In particular, it breaks singletons:
• Couldn't match type ‘Integer’ with ‘Int’
Expected type: q Int
Actual type: q Uniq
• In the expression: return n
In a case alternative: NameU n -> return n
In a stmt of a 'do' block:
case flav of
NameU n -> return n
_ -> error "Internal error: `qNewName` didn't return a NameU"
|
99 | NameU n -> return n
|
However, if you are using stack with Nix integration and the shell file relies on haskell.nix, you’ll get a compiler with the former patch backported, but the singletons patch will not be applied, as stack builds dependencies itself.
I’m not sure there is any moral to this story except for “be careful” and “let’s replace stack and all other similar tools by Nix ASAP”.
The text was updated successfully, but these errors were encountered:
By the way, the singletons patch pretty much negates the original fix as the supposedly unique names can again overflow in Int. Here is a better one (and it’s also how it has been fixed in singletons upstream): serokell/singletons@78bfaa7
@kirelagin right. this is a bit of an annoyance. It's somewhat fundamental to make ghcjs work properly. I hope we won't have breakage this bad in the future. For now the best option is likely to just provide an - extra-pkg to stack that has a patched singletons. The difference between the upstream ghc and the patched ghc in haskell.nix (and patched cabal to some degree) is something troubeling, but for now unavoidable I believe :-(
Your patch looks correct, and I'll update the one in haskell.nix! Thank you!
I agree, the upstream fix is better. Truncating to an Int reintroduces the problem. Using the Uniq type synonym was the intended way of making packages compatible across template-haskell versions.
This is a heads-up issue in case someone will be banging their head against the wall as I did today.
haskell.nix backports GHC MR !948. It’s easy to see that this change is breaking the interface of
template-haskell
. In particular, it breakssingletons
:haskell.nix also patches singletons to fix this.
However, if you are using stack with Nix integration and the shell file relies on haskell.nix, you’ll get a compiler with the former patch backported, but the singletons patch will not be applied, as stack builds dependencies itself.
I’m not sure there is any moral to this story except for “be careful” and “let’s replace stack and all other similar tools by Nix ASAP”.
The text was updated successfully, but these errors were encountered: