# $Id: Portfile 131201 2015-01-06 19:52:47Z cal@macports.org $ PortSystem 1.0 name hs-typenats set shortname typenats version 0.2 revision 1 categories devel maintainers nomaintainer platforms darwin license BSD description Type level natural numbers for haskell long_description \ This library defines type level arithmetic by \ heavily abusing GHC's typechecker. It includes \ the following operations on type level \ naturals: \ \ * addition \ * subtraction \ * multiplication \ * division \ * remainder \ * GCD \ \ It also contains the following predicates: \ \ * test for zero \ * test for equality \ * < \ * > \ * <= \ * >= homepage http://www.eecs.tufts.edu/~rdocki01/typenats.html master_sites http://www.eecs.tufts.edu/~rdocki01/projects distname ${shortname}-${version}-source checksums md5 ee9f4e51b49d927e7ade1034211a14b9 depends_build port:ghc pre-configure { system -W ${worksrcpath} "ghc -o Setup Setup.hs -package Cabal" } configure { system -W ${worksrcpath} "./Setup configure --ghc --prefix=${prefix} --enable-library-profiling" } build { system -W ${worksrcpath} "./Setup build -v" } destroot { system -W ${worksrcpath} "./Setup copy --copy-prefix=${destroot}${prefix}" system -W ${worksrcpath} "./Setup register --gen-script" system -W ${worksrcpath} "./Setup unregister --gen-script" file mkdir ${destroot}${prefix}/libexec/${name} file copy ${worksrcpath}/register.sh \ ${destroot}${prefix}/libexec/${name} file copy ${worksrcpath}/unregister.sh \ ${destroot}${prefix}/libexec/${name} } post-activate { system "${prefix}/libexec/${name}/register.sh" } pre-deactivate { system "${prefix}/libexec/${name}/unregister.sh" }