packages feed

large-anon 0.3.3 → 0.3.4

raw patch · 29 files changed

+55/−30 lines, 29 filesdep ~basedep ~ghcdep ~ghc-tcplugin-apiPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, ghc, ghc-tcplugin-api

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for large-anon +## 0.3.4 -- 2026-05-20++* Support ghc 9.14+* Use ghc-tcplugin-api 0.19+ ## 0.3.3 -- 2025-07-19  * Support ghc 9.8 (Gabriele Sales)
large-anon.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               large-anon-version:            0.3.3+version:            0.3.4 synopsis:           Scalable anonymous records description:        The @large-anon@ package provides support for anonymous                     records in Haskell, with a focus on compile-time (and@@ -13,12 +13,14 @@ extra-doc-files:    CHANGELOG.md                     test/Test/Sanity/RebindableSyntax/Tests.hs tested-with:        GHC ==8.10.7+                    GHC ==9.0.2                     GHC ==9.2.8                     GHC ==9.4.8                     GHC ==9.6.7                     GHC ==9.8.4                     GHC ==9.10.2                     GHC ==9.12.2+                    GHC ==9.14.1  library   exposed-modules:@@ -76,11 +78,11 @@    build-depends:     , aeson            >= 1.4.4  && < 2.3-    , base             >= 4.14   && < 4.22+    , base             >= 4.14   && < 4.23     , containers       >= 0.6.2  && < 0.9     , deepseq          >= 1.4.4  && < 1.6-    , ghc              >= 8.10   && < 9.13-    , ghc-tcplugin-api >= 0.16.1 && < 0.17+    , ghc              >= 8.10   && < 9.15+    , ghc-tcplugin-api >= 0.19   && < 0.20     , hashable         >= 1.3    && < 1.6     , mtl              >= 2.2.1  && < 2.4     , optics-core      >= 0.3    && < 0.5@@ -109,6 +111,10 @@     cpp-options:       -DDEBUG +  if flag(enable-core-lint)+    ghc-options:+      -dcore-lint+ test-suite test-large-anon   default-language:       Haskell2010@@ -192,7 +198,16 @@     cpp-options:       -DNO_RECORD_DOT_PREPROCESSOR +  if flag(enable-core-lint)+    ghc-options:+      -dcore-lint+ Flag debug   Description: Enable internal debugging features+  Default: False+  Manual: True++Flag enable-core-lint+  Description: Debugging: Enable GHC's core linter   Default: False   Manual: True
src/Data/Record/Anon.hs view
@@ -72,7 +72,3 @@ import Data.Record.Anon.Internal.Advanced (Field, Some(..)) import Data.Record.Anon.Internal.Reflection (Reflected(Reflected)) ----
src/Data/Record/Anon/Advanced.hs view
@@ -583,4 +583,3 @@ castEqual :: Equal a b => a -> b castEqual = TypeLet.castEqual -
src/Data/Record/Anon/Internal/Advanced.hs view
@@ -677,4 +677,3 @@   -> Record f r letInsertAs _ n x r = letAs' (insert n x r) -
src/Data/Record/Anon/Internal/Core/Canonical.hs view
src/Data/Record/Anon/Internal/Core/FieldName.hs view
@@ -65,4 +65,3 @@ instance Outputable FieldName where   ppr = pprString . fieldNameLabel -
src/Data/Record/Anon/Internal/Plugin.hs view
@@ -40,6 +40,7 @@       tcPluginInit    = nameResolution     , tcPluginSolve   = solve     , tcPluginRewrite = rewrite-    , tcPluginStop    = const $ return ()+    , tcPluginPostTc   = const $ return ()+    , tcPluginShutdown = const $ return ()     } 
src/Data/Record/Anon/Internal/Plugin/Source/GhcShim.hs view
@@ -257,6 +257,9 @@ #if __GLASGOW_HASKELL__ >= 906     , ideclImportList = Nothing #endif+#if __GLASGOW_HASKELL__ >= 914+    , ideclLevelSpec = NotLevelled+#endif     }  issueWarning :: SrcSpan -> SDoc -> Hsc ()@@ -294,7 +297,11 @@                          (initPrintConfig dynFlags)                          (initDiagOpts dynFlags) +#if __GLASGOW_HASKELL__ >= 914+    let msg :: Err.UnknownDiagnostic opts Err.GhcHint+#else     let msg :: Err.UnknownDiagnostic opts+#endif         msg = Err.mkSimpleUnknownDiagnostic $                 mkPlainError [] errMsg #endif
src/Data/Record/Anon/Internal/Plugin/TC/Constraints/KnownHash.hs view
@@ -48,7 +48,7 @@   -> Ct   -> ParseResult Void (GenLocated CtLoc CKnownHash) parseKnownHash _ ResolvedNames{..} =-    parseConstraint isRelevant $ \(ty, label) -> do+    parseConstraint isRelevant (text "isRelevant") $ \(ty, label) -> do       return $ CKnownHash {           knownHashLabel = label         , knownHashType  = ty
src/Data/Record/Anon/Internal/Plugin/TC/EquivClasses.hs view
src/Data/Record/Anon/Internal/Plugin/TC/Parsing.hs view
@@ -81,10 +81,11 @@ parseConstraint ::      HasCallStack   => (Class -> [Type] -> Maybe a) -- ^ Do we want to try and match against this?+  -> SDoc                         -- ^ Description of above predicate   -> (a -> Maybe b)               -- ^ Parser for the class arguments   -> Ct                           -- ^ Constraint to parse   -> ParseResult e (GenLocated CtLoc b)-parseConstraint p f ct = fmap (L $ ctLoc ct) $+parseConstraint p doc f ct = fmap (L $ ctLoc ct) $     -- TODO: classify up to equalities..?     case classifyPredType (ctPred ct) of       ClassPred cls args | Just a <- p cls args ->@@ -97,6 +98,8 @@               , showSDocUnsafe (ppr cls)               , " constraint with arguments:\n"               , unlines (map (showSDocUnsafe . ppr) args)+              , "\nWhen parsing " ++ showSDocUnsafe (ppr ct)+              , "\nlooking for " ++ showSDocUnsafe doc               , "\nat\n"               , prettyCallStack callStack               ]@@ -110,7 +113,7 @@   -> ([Type] -> Maybe a)          -- ^ Parser for the class arguments   -> Ct                           -- ^ Constraint to parse   -> ParseResult e (GenLocated CtLoc a)-parseConstraint' cls = parseConstraint p+parseConstraint' cls = parseConstraint p (ppr cls)   where     p :: Class -> [Type] -> Maybe [Type]     p cls' args = if cls == cls' then Just args else Nothing@@ -152,4 +155,11 @@     -- When this is the case, however, by injectivity of 'tyCon' we know that     -- @args1 ~ args1'@, so we can just return /any/ of the matches; we will     -- return the first.-    lookup tyCon (toList splits)+    --+    -- 2025-08-26: we ignore constraints here.+    -- Prior using ghc-tcplugin-api-0.17 we ignored them by necessity and plugin worked.+    -- There is a concern that the plugin should record (equality) constraints+    -- used for reasoning in evidences it constructs,+    -- but AFAIK, GHC simply has no direct mechanism to do that+    -- (see the hoops GHC itself jumps though to make `unsafeCoerce` behave well).+    lookup tyCon [ (x,y) | (x,y,_) <- toList splits]
src/Data/Record/Anon/Internal/Plugin/TC/Row/ParsedRow.hs view
@@ -115,7 +115,7 @@         , do FieldsVar <$> getTyVar_maybe fields         , do args <- parseInjTyConApp tcs tyConMerge fields              (left, right) <- case args of-                                [l, r]     -> return (l, r)+                                [_k, l, r]     -> return (l, r)                                 _otherwise -> mzero              FieldsMerge <$> go left <*> go right         ]
src/Data/Record/Anon/Internal/Util/StrictArray.hs view
src/Data/Record/Anon/Overloading.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP                 #-} {-# LANGUAGE PolyKinds           #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications    #-}@@ -41,5 +42,11 @@ ifThenElse :: Bool -> a -> a -> a ifThenElse b x y = if b then x else y +-- | NOTE: the order of arguments is GHC version dependent.+#if __GLASGOW_HASKELL__ >=914+setField :: forall x r a. GHC.Records.Compat.HasField x r a => a -> r -> r+setField = flip (fst . GHC.Records.Compat.hasField @x)+#else setField :: forall x r a. GHC.Records.Compat.HasField x r a => r -> a -> r setField = fst . GHC.Records.Compat.hasField @x+#endif
src/Data/Record/Anon/Plugin.hs view
@@ -1,15 +1,6 @@ {-# OPTIONS_HADDOCK hide #-} --- | Type checker and source plugin for working with anonymous records------ To use this, add------ > {-# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #-}------ to your module. You should not need to import this module; see--- "Data.Record.Anon.Simple" or "Data.Record.Anon.Advanced" instead. module Data.Record.Anon.Plugin (plugin) where  import Data.Record.Anon.Internal.Plugin (plugin)- 
test/Test/Infra/Discovery.hs view
@@ -210,4 +210,3 @@ pairSnd :: Product f g x -> g x pairSnd (Pair _ gx) = gx -
test/Test/Infra/Generics.hs view
@@ -68,5 +68,3 @@     name :: forall n a. KnownSymbol n => K String '(n, a)     name = K (symbolVal (Proxy @n)) --
test/Test/Prop/Record/Model/Orphans.hs view
test/Test/Sanity/BlogPost.hs view
test/Test/Sanity/Generics.hs view
test/Test/Sanity/HasField.hs view
@@ -60,4 +60,3 @@      assertEqual "set field 1" record1' $ Anon.set #x (I False) record1 -
test/Test/Sanity/Intersection.hs view
test/Test/Sanity/OverloadedRecordDot.hs view
test/Test/Sanity/OverloadedRecordUpdate.hs view
test/Test/Sanity/RebindableSyntax/Disabled.hs view
test/Test/Sanity/RebindableSyntax/Tests.hs view
test/Test/Sanity/Simple.hs view
test/TestLargeAnon.hs view