packages feed

holeyexp 0.2.0.0 → 0.3.0.0

raw patch · 4 files changed

+22/−22 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -7,6 +7,12 @@ [Haskell Package Versioning Policy](https://pvp.haskell.org/).  ## Unreleased+## [0.3.0.0] - 2026-09-02+### Changed+    - Now builds with GHC 9.8.4. This required the removal of the +      TypeApplications extension in the Test.QuickCheck.HExp. In order to +      continue building we had to add new constraints to the genHExpNat, +      genHExp, and the Arbitrary instance for HExp.  ## [0.2.0.0] - 2026-08-28 ### Added
holeyexp.cabal view
@@ -1,12 +1,13 @@ cabal-version:  2.4 name:           holeyexp-version:        0.2.0.0+version:        0.3.0.0 license:        BSD-3-Clause license-file:   LICENSE.md maintainer:     Harley Eades III <harley.eades@gmail.com> author:         Harley Eades III  tested-with: +    GHC == 9.8.4     GHC == 9.10.*     GHC == 9.12.*     GHC == 9.14.1@@ -48,12 +49,6 @@  library   import: depends  --  if impl(ghc >= 9.10.0)-    buildable: True-  else-    buildable: False-       exposed-modules:       Data.HoleyExp.HExp       Data.HoleyExp.HExpInternal
src/Data/HoleyExp/HExpInternal.hs view
@@ -13,14 +13,12 @@ {-# LANGUAGE TypeFamilies                 #-} {-# LANGUAGE ScopedTypeVariables          #-} {-# LANGUAGE RankNTypes                   #-}-{-# LANGUAGE TypeApplications             #-} {-# LANGUAGE BangPatterns                 #-} {-# LANGUAGE TupleSections                #-} {-# LANGUAGE PatternSynonyms              #-} {-# LANGUAGE MultiParamTypeClasses        #-} {-# LANGUAGE FlexibleInstances            #-} {-# OPTIONS_GHC -Wno-missing-export-lists #-}-{-# LANGUAGE TypeAbstractions #-} {-# LANGUAGE FlexibleContexts #-} module Data.HoleyExp.HExpInternal where import Prelude                    hiding (null)@@ -134,9 +132,12 @@     show (HExp (ICompose prefix i rest) (emptyHoles, filledHoles))         = (DT.unpack . toText $ prefix)          <> "$" <> show i <> "{"-        <> (if i `elem` emptyHoles then "" else (DT.unpack . toText . (fillingToText @text) $ filledHoles ! i))+        <> (if i `elem` emptyHoles then "" else (DT.unpack . toText . fToT $ filledHoles ! i))         <> "}"          <> show (HExp rest (emptyHoles, filledHoles))+        where+            fToT :: filling -> text+            fToT = fillingToText  -- * Combinators 
test/Test/QuickCheck/HExp.hs view
@@ -9,7 +9,6 @@ used for property-based testing. -} {-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE TypeAbstractions #-} {-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-unused-imports #-} module Test.QuickCheck.HExp@@ -35,24 +34,23 @@ genChunk = chunk <$> arbitrary  genHoleFilling :: Arbitrary filling => Gen (Maybe filling)-genHoleFilling @filling = sized $ \n -> +genHoleFilling = sized $ \n ->      frequency         [ (1, pure Nothing),-          (n, (arbitrary :: Gen filling) >>= (pure . Just))+          (n, (arbitrary) >>= (pure . Just))         ] -genHExpNat :: (Arbitrary text, Arbitrary filling) => Natural -> Gen (HExp text filling)+genHExpNat :: (Monoid text, Arbitrary text, Arbitrary filling) => Natural -> Gen (HExp text filling) genHExpNat 0 = genChunk-genHExpNat @text n = do (HExp t holeProps) <- genHExpNat $ n - 1-                        h <- arbitrary :: Gen Natural-                        f <- genHoleFilling-                        c <- arbitrary :: Gen text-                        let t' = ICompose c h t                      -                        pure $ HExp t' $ holeProps `updateFreshHolePropsWith` (h,f)+genHExpNat n = do t <- genHExpNat $ n - 1+                  h <- arbitrary :: Gen Natural+                  f <- genHoleFilling+                  c <- genChunk+                  pure $ c <> (maybe (empty h) (filled h) f) <> t -genHExp :: (Arbitrary text, Arbitrary filling) => Gen (HExp text filling)+genHExp :: (Monoid text, Arbitrary text, Arbitrary filling) => Gen (HExp text filling) genHExp = arbitrary >>= genHExpNat  -instance (Arbitrary text, Arbitrary filling) => Arbitrary (HExp text filling) where+instance (Monoid text, Arbitrary text, Arbitrary filling) => Arbitrary (HExp text filling) where     arbitrary :: Gen (HExp text filling)     arbitrary = genHExp