#849: [PATCH] Store licenses in text files instead of code. ---------------------------------+------------------------------------------ Reporter: refold | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: HEAD Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------
Comment(by duncan): Yeah, something like that. I was thinking of a slightly more general interface that would allow other/different implementation options on different machines or in different contexts (e.g. debug builds). Something like, Resources_$packagename.hs: {{{ openResource :: String -> IO Handle }}} So it's very much like the current Paths_$packagename.hs: {{{ getDataFileName :: FilePath -> IO FilePath }}} but it combines locating with opening the resource as an ordinary `Handle`. Doing IO to perform the open and providing a `Handle` gives us quite a lot of implementation options. We can still do the ELF `foreign import ccall "&"` stuff or we can use ordinary files (e.g. for debug and I think MacOSX bundles use separate files too), and for Win32 we can use the Windows resource APIs. This relies on the new base-4 `Handle` stuff which lets you create custom handle implementations. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/849#comment:8> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects _______________________________________________ cabal-devel mailing list cabal-devel@haskell.org http://www.haskell.org/mailman/listinfo/cabal-devel