abau / co4

COmplexity COncerned COnstraint COmpiler
GNU General Public License v3.0
2 stars 3 forks source link

encConstraint has wrong type (perhaps wrong number of arguments?) #28

Closed jwaldmann closed 11 years ago

jwaldmann commented 11 years ago

commit ac8e7ece3a01aabd238d4620bb764c2c58f8356d

this is fine:

ghci CO4/Test/WCB_Matrix.standalone.hs 

but this fails:

ghci CO4/Test/WCB_Matrix.hs

CO4/Test/WCB_Matrix.hs:73:8:
    Couldn't match type `e0 p0
                         -> CO4.EncodedAdt.Overlapping.Overlapping
                              Satchmo.Core.Boolean.Boolean'
                  with `Satchmo.Core.SAT.Minisat.SAT
                          (EncodedAdt Satchmo.Core.Boolean.Boolean)'
    Expected type: ParamConstraintSystem
                     Satchmo.Core.SAT.Minisat.SAT Satchmo.Core.Boolean.Boolean
      Actual type: CO4.EncodedAdt.Overlapping.Overlapping
                     Satchmo.Core.Boolean.Boolean
                   -> CO4.EncodedAdt.Overlapping.Overlapping
                        Satchmo.Core.Boolean.Boolean
                   -> e0 p0
                   -> CO4.EncodedAdt.Overlapping.Overlapping
                        Satchmo.Core.Boolean.Boolean
    In the fourth argument of `solveAndTestBooleanP', namely
      `encConstraint'

now ParamConstraintSystem SAT Boolean expands to

Overlapping Boolean
-> Overlapping Boolean
-> SAT (Overlapping Boolean)

and this looks like encConstraint somehow got one extra argument (of type e p)

strange thing is: if I comment out the second clause (after &&) of

simple s (p, t) =
           ( geEnergy (bound p s) (get t (leftmostI p) (rightmostI p)) )
        && ( maxboundOk mi zero plus times eqEnergy cost p t )

then it works fine.

abau commented 11 years ago

fixed by https://github.com/apunktbau/co4/commit/258e41e38c4bfc84067e5495dec193d2fae3df2a