peteg / hBDD

BDD (Boolean Decision Diagram) bindings for Haskell
Other
7 stars 3 forks source link

Once installed, error in test code #4

Closed javierdiegof closed 6 years ago

javierdiegof commented 6 years ago

I think i have installed correctly both hBDD-0.0.3 and hBDD-CUBDD-0.0.3. When trying to test a simple program that returns one of the types of Data.Boolean.BF i get the following error:

GHCi, version 8.2.1: http://www.haskell.org/ghc/  :? for help
[1 of 3] Compiling Data.Boolean     ( Data/Boolean.hs, interpreted )

Data/Boolean.hs:111:5: error:
    • Illegal family declaration for ‘Group’
        Use TypeFamilies to allow indexed type families
    • In the class declaration for ‘QBF’
    |
111 |     data Group b :: *
    |     ^^^^^^^^^^^^^^^^^
Failed, 0 modules loaded.

The script that provokes this error is the following:

import qualified Data.Boolean.BF as DBB
hola :: BF
hola = BFtrue

Honestly, im not sure wether i installed everything correctly, and i have no clear idea what i have to do to install the specific hBDD-CUDD (i just used runghc with the Setup file in this folder). Of course, i already have downloaded cudd-2.4.1 and made the project with all corresponding directories. Im quite a novice in Cabal and i have some questions regarding your project:

Any kind of suggestion whatsoever is useful, thanks in advance and i apologize for my lack of knowledge of the topic.

peteg commented 6 years ago

Hi Javier.

This code is quite old, and I haven't used it in many years. You can try adding a language pragma for TypeFamilies to the top of Boolean.hs (and perhaps elsewhere) or perhaps to the .cabal file itself. I have never used cabal install, and can't help you with those bits sorry.

I'm happy to accept PRs against this project.

cheers, peter

javierdiegof commented 6 years ago

Thank you very much, i decided to go with HasCacBDD in the end, i was not able to make it run.