Tritlo / PropR

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

Not all constraints are being solved for some fits #84

Closed Tritlo closed 3 years ago

Tritlo commented 3 years ago

Trying to repair

module PatternFixes where

import Data.Maybe (isJust)

allBlankEx :: [Maybe Int]
allBlankEx = [Just 2 | n <- [0]]

propIsAllBlank :: Bool
propIsAllBlank = not (any isJust allBlankEx)

will fail with

  temp_dir/712220e3/tests/cases/PatternFixes/checks/3ca70f53/FakeCheckTarget3ca70f53.hs:94:39: error:
    * No instance for (Num (Maybe Int)) arising from the literal `0'
    * In the expression: 0
      In the expression: [0]
      In a stmt of a list comprehension: n <- [0]
   |
94 |               allBlankEx = [n | n <- [0]]
   |                                       ^