Skip to content

Dependency bound issues #20

@mniip

Description

@mniip

th-utilities dependency bounds on base and template-haskell are consistenty too loose compared to actual compiler versions the package can build with.

On hackage:

  • th-utilities >=0.1.0.0 && <=0.2.4.1 build-depends on base >=4.7 (GHC >=7.8) and template-haskell >=2.7 && <2.17 (GHC >=7.4 && < 9.0)
  • th-utilities >=0.2.4.2 && <=0.2.5.0 build-depends on base >=4.7 (GHC >=7.8) and template-haskell >=2.7 (GHC >=7.4)
  • th-utilities >=0.2.5.1 && <=0.2.5.2 build-depends on base >=4.7 (GHC >=7.8) and template-haskell >=2.8 (GHC >=7.6)

However:

  • th-utilities >=0.1.0.0 && <=0.1.0.1 fails to build against GHC 8.0-8.10 because of seemingly a typo inside an #if MIN_VERSION_template_haskell(2,11,0) block.

    Error
    src/TH/Utilities.hs:56:67: error: Variable not in scope: y :: Type
    
    src/TH/Utilities.hs:57:68: error: Variable not in scope: y :: Type
    
    src/TH/Utilities.hs:79:53: error: Variable not in scope: y :: Type
    
    src/TH/Utilities.hs:80:54: error: Variable not in scope: y :: Type
    

    This was fixed in e6b4ef4 and landed in th-utilities-0.1.1.0, but on hackage th-utilities >=0.1.0.0 && <=0.1.0.1 need a template-haskell <2.11 upper bound (and/or base <4.9).

  • th-utilities >=0.2.0.0 && <=0.2.3.0 fail to build against GHC 8.8-8.10 because of changes in TySynInstD.

    Error
    src/TH/ReifySimple.hs:267:9: error:
        • The constructor ‘TySynInstD’ should have 1 argument, but has been given 2
        • In the pattern: TySynInstD name (TySynEqn params ty)
          In an equation for ‘go’:
              go (TySynInstD name (TySynEqn params ty)) = TypeInst name params ty
          In an equation for ‘infoToTypeFamily’:
              infoToTypeFamily info
                = case info of
                    FamilyI (ClosedTypeFamilyD (TypeFamilyHead name
                                                               tvs
                                                               _result
                                                               _injectivity)
                                               eqns)
                            _
                      -> Just
                           $ TypeFamily name (map tyVarBndrName tvs) $ map (goEqn name) eqns
                    FamilyI (OpenTypeFamilyD (TypeFamilyHead name
                                                             tvs
                                                             _result
                                                             _injectivity))
                            insts
                      -> Just $ TypeFamily name (map tyVarBndrName tvs) $ map go insts
                    _ -> Nothing
                where
                    goEqn name (TySynEqn params ty) = TypeInst name params ty
                    go (TySynInstD name (TySynEqn params ty)) = TypeInst name params ty
                    go info'
                      = error
                          $ "Unexpected instance in FamilyI in infoToTypeInsts:\n"
                              ++ pprint info'
        |
    267 |     go (TySynInstD name (TySynEqn params ty)) = TypeInst name params ty
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    

    This was fixed in b5f3275 and landed in th-utilities-0.2.3.1, but on hackage th-utilities >=0.2.0.0 && <=0.2.3.0 need a template-haskell <2.15 upper bound (and/or base <4.13).

  • th-utilities ==0.2.3.1 fails to build against GHC 8.10 because of a naming conflict with reifyType.

    Error
    src/TH/ReifySimple.hs:41:17: error:
        Ambiguous occurrence ‘reifyType’
        It could refer to
           either ‘Language.Haskell.TH.reifyType’,
                  imported from ‘Language.Haskell.TH’ at src/TH/ReifySimple.hs:63:1-36
                  (and originally defined in ‘Language.Haskell.TH.Syntax’)
               or ‘TH.ReifySimple.reifyType’,
                  defined at src/TH/ReifySimple.hs:80:1
       |
    41 |       TypeInfo, reifyType, infoToType
       |                 ^^^^^^^^^
    

    This was fixed in 3b3d248 and landed in th-utilities-0.2.4.0, but on hackage th-utilities-0.2.3.1 needs a template-haskell <2.16 upper bound (and/or base <4.14).

  • th-utilities ==0.2.5.1 fails to build against GHC 9.0 because of an incorrect #if MIN_VERSION_template_haskell.

    Error
    src/TH/Utilities.hs:192:43: error:
        Data constructor not in scope: CharTyLit :: Char -> TyLit
        |
    192 |                 ['\'', c, '\''] -> LitT $ CharTyLit c
        |                                           ^^^^^^^^^
    

    This was fixed in 213354f and landed in th-utilities-0.2.5.2, but on hackage th-utilities-0.2.5.1 needs a template-haskell <2.17 || >2.17 upper bound (and/or base <4.15 || >4.15).

  • th-utilities >=0.2.5.0 (up to git head) fails to build against GHC <=8.2 because FixIOException was only introduced in GHC 8.4.

    Error
    src/TH/FixQ.hs:17:32: error:
        Module
        ‘Control.Exception.Base’
        does not export
        ‘FixIOException(..)’
       |
    17 | import Control.Exception.Base (FixIOException (..))
       |                                ^^^^^^^^^^^^^^^^^^^
    
    And also GHC.IO.Unsafe was only introduced in GHC 8.0.
    Error
    src/TH/FixQ.hs:19:8:
        Could not find module ‘GHC.IO.Unsafe’
        Use -v to see a list of the files searched for.
    

    This is still unfixed and will need hackage revisions for th-utilities >=0.2.5.0 && <=0.2.5.2 adding base >=4.11 (and/or template-haskell >=2.13).

Here's a chart:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions