https://wiki.haskell.org/api.php?action=feedcontributions&user=JudahJacobson&feedformat=atomHaskellWiki - User contributions [en]2021-05-14T17:11:05ZUser contributionsMediaWiki 1.27.4https://wiki.haskell.org/index.php?title=BayHac2017/tensorflow&diff=61632BayHac2017/tensorflow2017-03-16T01:17:26Z<p>JudahJacobson: </p>
<hr />
<div>{|<br />
|Project:<br />
|tensorflow<br />
|-<br />
|Description:<br />
|Haskell bindings for TensorFlow (machine intelligence lib)<br />
|-<br />
|Maintainers/liaisons:<br />
|Judah Jacobson, Frederick Mayle<br />
|-<br />
|Source:<br />
|https://github.com/tensorflow/haskell<br />
|-<br />
|Build instructions:<br />
|https://github.com/tensorflow/haskell/blob/master/README.md<br />
|-<br />
|API documentation:<br />
|https://tensorflow.github.io/haskell/haddock/ (A good starting place is [https://tensorflow.github.io/haskell/haddock/tensorflow-0.1.0.0/TensorFlow-Core.html TensorFlow.Core])<br />
|-<br />
|Website:<br />
|https://www.tensorflow.org/<br />
|}<br />
<br />
TODO: information on dependencies, testing, etc.</div>JudahJacobsonhttps://wiki.haskell.org/index.php?title=Upgrading_packages/Updating_to_GHC_6.10&diff=23437Upgrading packages/Updating to GHC 6.102008-10-11T18:00:01Z<p>JudahJacobson: Correct usage of the -package flag</p>
<hr />
<div>A list of things that need updating when porting packages to newer library/cabal versions.<br />
<br />
If you maintain a Haskell package this is for you.<br />
For older versions of this document:<br />
<br />
* [[/Updating to GHC 6.8]]<br />
<br />
'''Updating to GHC 6.10 and Cabal 1.6'''<br />
<br />
When upgrading to GHC 6.10, any of your packages that worked against<br />
the base-3 library will continue to work. GHC 6.10 provides both the old<br />
base-3 library and the new base-4.<br />
<br />
To ensure your old code continues to work, you can have the code compile<br />
and link against base-3, and then, over time, migrate code to the base-4<br />
series.<br />
<br />
== Adding base-3 constraints ==<br />
<br />
How to do this depends on how you build your Haskell code. We'll start<br />
with the most simplistic build mechanisms. cabal-install, the most<br />
sophisticated tool, will sort this all out for you anyway, so things<br />
should change.<br />
<br />
=== ghc --make ===<br />
<br />
Force use of package base-3 when using --make,<br />
<br />
ghc --make -package base-3.0.3.0<br />
<br />
===runhaskell ===<br />
<br />
If you build your packages with the 'runhaskell Setup.hs configure'<br />
method, then you can force the use of base-3,<br />
<br />
--constraint="base<4"<br />
<br />
=== cabal-install===<br />
<br />
It is worth upgrading cabal-install immediately (maybe before installing<br />
GHC). This way you can use the smart dependency solver to work out what<br />
to install for you.<br />
<br />
* install [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HTTP HTTP] from hackage<br />
* install [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/zlib zlib] from hackage<br />
<br />
Then build cabal-install.<br />
<br />
You can also override the dependencies when using the 'cabal' binary, with<br />
<br />
--constraint="base<4"<br />
<br />
== Typical breakages with GHC 6.10 ==<br />
<br />
[http://article.gmane.org/gmane.comp.lang.haskell.glasgow.user/15430 54 new packages] break with the current GHC 6.10 release candidate.<br />
<br />
The primary reasons are:<br />
<br />
* Changes to Arrow class definition<br />
* Changes to Map monadic types<br />
* Cabal changes<br />
* Changes to ghc-api<br />
* Changes to when 'forall' is parsed<br />
* GHC.Prim was moved,<br />
* Changes to -fvia-C and headers?<br />
* GADT changes,<br />
* pragma warnings tightened<br />
* Integer constructors have moved<br />
* New warnings and used -Werror<br />
* Exception handling: catch, finally, throwIO don't work anymore<br />
<br />
Each of these has a standard way to solve the problem. Techniques should be attached here.<br />
<br />
=== Changes to Arrow class definition ===<br />
<br />
The relevant change is essentially that Arrow became a superclass of Category. To be exact:<br />
<br />
* <code>(>>>)</code> was removed from Arrow, instead we have <code>(.)</code> in Category<br />
* <code>id</code> is a new function, in Category<br />
<br />
What this means for code is that you need to declare an instance of Category as well as Arrow. A brute-force fix which should work:<br />
<br />
* Add the following imports:<br />
<br />
import Control.Category<br />
import Prelude hiding (id,(.)) -- conflicts with Category otherwise<br />
<br />
* Add <code>instance Category [your type] where</code> for any Arrows<br />
* Move your <code>(>>>)</code> definition into Category, and change <code>f >>> g = ...</code> into <code>g . f = ...</code><br />
* Define <code>id</code> in Category. (Actually, I'm not 100% sure if this is strictly necessary for code that used to work in 6.8, but it's safest.)<br />
<br />
And you're done.<br />
<br />
=== Exception handling changes ===<br />
<br />
The exception system was generalised in GHC 6.10, but GHC 6.10 still provides base-3, so all your applications can continue to work. <br />
<br />
Follow the steps for compiling against base-3 at the top of the page, baesd on your build system.<br />
<br />
Note that if you use cabal-install, it is smart enough to work this out for you.<br />
<br />
== Backwards compatibility ==<br />
<br />
The new, suggested Cabal version range syntax,<br />
<br />
build-depends: base-3.*<br />
<br />
is not backwards compatible with older versions of Cabal. Users will need to upgrade to the newer Cabal to build packages that start using this syntax.<br />
<br />
[[Category:Libraries]]</div>JudahJacobson