Tritlo / PropR

Genetic program repair using GHC
MIT License
30 stars 2 forks source link

Ambiguous type variables #80

Closed Tritlo closed 3 years ago

Tritlo commented 3 years ago

Sometimes we can't figure out the type of the property propely from only the application:

 /input/sudoku_props/checks/697b90e1/FakeCheckTarget697b90e1.hs:667:19: error:
     • Ambiguous type variable ‘t0’ arising from a use of ‘prop'_anyBlock_withWrongNumberOfCells_isInvalid’
       prevents the constraint ‘(Ord t0)’ from being solved.
       Probable fix: use a type annotation to specify what ‘t0’ should be.
       These potential instances exist:
         instance (Ord a, Ord b) => Ord (Either a b)
           -- Defined in ‘Data.Either’
         instance Ord GeneralCategory -- Defined in ‘GHC.Unicode’
         instance Ord Ordering -- Defined in ‘GHC.Classes’
         ...plus 24 others
         ...plus 92 instances involving out-of-scope types
         (use -fprint-potential-instances to see them all)
     • In the third argument of ‘qcWRes’, namely
         ‘(prop'_anyBlock_withWrongNumberOfCells_isInvalid
             expr__isOkayBlock)’
       In the second argument of ‘fmap’, namely
         ‘(qcWRes
             (1000000) qc__
             (prop'_anyBlock_withWrongNumberOfCells_isInvalid
                expr__isOkayBlock))’
       In the expression:
         fmap
           qcSuccess
           (qcWRes
              (1000000) qc__
              (prop'_anyBlock_withWrongNumberOfCells_isInvalid
                 expr__isOkayBlock))
     |
 667 |                  (prop'_anyBlock_withWrongNumberOfCells_isInvalid
     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...