AsyncRattus 0.1 → 0.1.0.1
raw patch · 7 files changed
+50/−13 lines, 7 filesdep ~ghcPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: ghc
API changes (from Hackage documentation)
Files
- AsyncRattus.cabal +2/−2
- CHANGELOG.md +4/−0
- docs/paper.pdf binary
- src/AsyncRattus/Plugin/Dependency.hs +12/−4
- src/AsyncRattus/Plugin/ScopeCheck.hs +13/−2
- src/AsyncRattus/Plugin/StableSolver.hs +9/−4
- src/AsyncRattus/Plugin/Utils.hs +10/−1
AsyncRattus.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: AsyncRattus-version: 0.1+version: 0.1.0.1 category: FRP synopsis: An asynchronous modal FRP language description:@@ -159,7 +159,7 @@ AsyncRattus.Plugin.PrimExpr build-depends: base >=4.16 && <5, containers >= 0.6.5 && < 0.8,- ghc >= 9.2 && < 9.7,+ ghc >= 9.2 && < 9.9, hashtables >= 1.3.1 && < 1.4, simple-affine-space >= 0.2.1 && < 0.3, transformers >= 0.5.6 && < 0.7
CHANGELOG.md view
@@ -1,3 +1,7 @@+# 0.1.0.1++Compatibility with GHC 9.8+ # 0.1 First release.
docs/paper.pdf view
binary file changed (385715 → 387094 bytes)
src/AsyncRattus/Plugin/Dependency.hs view
@@ -382,8 +382,18 @@ getFV (HsCmdWrap _ _ cmd) = getFV cmd #endif getFV (XCmd e) = getFV e- ++instance (HasFV a, HasFV b) => HasFV (Either a b) where+ getFV (Left x) = getFV x+ getFV (Right x) = getFV x++#if __GLASGOW_HASKELL__ >= 908+instance HasFV (LHsRecUpdFields GhcTc) where+ getFV RegularRecUpdFields {recUpdFields = x} = getFV x+ getFV OverloadedRecUpdFields {olRecUpdFields = x} = getFV x+#endif+ instance HasFV (HsCmdTop GhcTc) where getFV (HsCmdTop _ cmd) = getFV cmd #if __GLASGOW_HASKELL__ < 900@@ -412,12 +422,10 @@ getFV HsProjection {} = Set.empty getFV HsGetField {gf_expr = e} = getFV e getFV (ExplicitList _ es) = getFV es- getFV (RecordUpd {rupd_expr = e, rupd_flds = fs}) =- getFV e `Set.union` either getFV getFV fs #else getFV (ExplicitList _ _ es) = getFV es- getFV (RecordUpd {rupd_expr = e, rupd_flds = fs}) = getFV e `Set.union` getFV fs #endif+ getFV (RecordUpd {rupd_expr = e, rupd_flds = fs}) = getFV e `Set.union` getFV fs getFV (RecordCon {rcon_flds = fs}) = getFV fs getFV (ArithSeq _ _ e) = getFV e #if __GLASGOW_HASKELL__ >= 906
src/AsyncRattus/Plugin/ScopeCheck.hs view
@@ -573,13 +573,12 @@ check (HsMultiIf _ e) = check e #if __GLASGOW_HASKELL__ >= 902 check (ExplicitList _ e) = check e- check RecordUpd { rupd_expr = e, rupd_flds = fs} = (&&) <$> check e <*> either check check fs check HsProjection {} = return True check HsGetField {gf_expr = e} = check e #else check (ExplicitList _ _ e) = check e- check RecordUpd { rupd_expr = e, rupd_flds = fs} = (&&) <$> check e <*> check fs #endif+ check RecordUpd { rupd_expr = e, rupd_flds = fs} = (&&) <$> check e <*> check fs check RecordCon { rcon_flds = f} = check f check (ArithSeq _ _ e) = check e #if __GLASGOW_HASKELL__ >= 906@@ -624,6 +623,18 @@ impossible :: GetCtxt => TcM Bool impossible = printMessageCheck SevError "This syntax should never occur after typechecking" #endif++instance (Scope a, Scope b) => Scope (Either a b) where+ check (Left x) = check x+ check (Right x) = check x+++#if __GLASGOW_HASKELL__ >= 908+instance Scope (LHsRecUpdFields GhcTc) where+ check RegularRecUpdFields {recUpdFields = x} = check x+ check OverloadedRecUpdFields {olRecUpdFields = x} = check x+#endif+ #if __GLASGOW_HASKELL__ >= 900 instance Scope XXExprGhcTc where
src/AsyncRattus/Plugin/StableSolver.hs view
@@ -82,11 +82,16 @@ Just evs -> return $ TcPluginOk evs [] Nothing -> return $ TcPluginOk [] [] - where filterCt ct@(CDictCan {cc_class = cl, cc_tyargs = [ty]})+ where+#if __GLASGOW_HASKELL__ >= 908+ filterCt ct@(CDictCan (DictCt {di_cls = cl, di_tys = [ty]}))+#else+ filterCt ct@(CDictCan {cc_class = cl, cc_tyargs = [ty]})+#endif = case getNameModule cl of- Just (name,mod)- | isRattModule mod && name == "Stable" -> [(ty,(ct,cl))]- _ -> []+ Just (name,mod)+ | isRattModule mod && name == "Stable" -> [(ty,(ct,cl))]+ _ -> [] filterCt _ = [] filterTypeVar ty = case getTyVar_maybe ty of Just v -> [v]
src/AsyncRattus/Plugin/Utils.hs view
@@ -33,6 +33,11 @@ getAlt, splitForAllTys') where++#if __GLASGOW_HASKELL__ >= 908+import GHC.Types.Error (ResolvedDiagnosticReason (..))+#endif+ #if __GLASGOW_HASKELL__ >= 906 import GHC.Builtin.Types.Prim import GHC.Tc.Utils.TcType@@ -105,7 +110,11 @@ #endif printMessage sev loc doc = do-#if __GLASGOW_HASKELL__ >= 906+#if __GLASGOW_HASKELL__ >= 908+ logger <- getLogger+ liftIO $ putLogMsg logger (logFlags logger)+ (MCDiagnostic sev (if sev == SevError then ResolvedDiagnosticReason ErrorWithoutFlag else ResolvedDiagnosticReason WarningWithoutFlag) Nothing) loc doc+#elif __GLASGOW_HASKELL__ >= 906 logger <- getLogger liftIO $ putLogMsg logger (logFlags logger) (MCDiagnostic sev (if sev == SevError then ErrorWithoutFlag else WarningWithoutFlag) Nothing) loc doc