-
Notifications
You must be signed in to change notification settings - Fork 5
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
Solve u ~ Pack (Unpack u)
in plugin
#24
Comments
This seems to be the cause of a regression since ghc-7.10.3 This compiles without issue with 7.10.3 but fails to compile with ghc-8.0.1 {-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DataKinds #-}
{-# OPTIONS_GHC -fplugin Data.UnitsOfMeasure.Plugin #-}
module Bug where
import Data.UnitsOfMeasure.Defs ()
import Data.UnitsOfMeasure
foo :: forall a. Fractional a => Quantity a [u|s|]
foo = convert $ bar b
where
b :: Quantity a [u|s * s|]
b = b
bar :: Quantity a (u*:u) -> Quantity a u
bar = bar
|
Thanks for reporting this. The problem seems to be the failure to solve for |
So could it be that GHC is failing on the spurious occurs check before uom-plugin gets a chance to solve things? |
Perhaps. I don't know whether GHC is failing too early because of the occurs check, or whether it is simply misreporting an unsolved constraint error as an occurs check failure. |
See #23.
The text was updated successfully, but these errors were encountered: