News aggregator

SPLASH 2016: Call for Sponsorships

General haskell list - Tue, 05/10/2016 - 11:54pm
The ACM SIGPLAN conference on Systems, Programming, Languages and Applications: Software for Humanity (SPLASH) embraces all aspects of software construction and delivery to make it the premier conference at the intersection of programming, languages, and software engineering. SPLASH 2016 will take place from Sunday, October 30 to Friday, November 4, 2016 in Amsterdam, The Netherlands. Web version of this call for sponsorships: SPLASH is where the best of the best in software innovation, programming and programming languages convene, learn from and inspire each other, and share their passion for software. Supporting SPLASH is an opportunity to put your corporate name in front of this community — a superb investment for your organization. # Sponsorship Packages ## Diamond: $US 15 000 Benefits: - Recognition as a supporter in print and on the web. Recognized as a Diamond supporter on registration brochures and conference program - Two company-provided i
Categories: Incoming News

OAuth2 and OpenID Connect in Haskell

haskell-cafe - Tue, 05/10/2016 - 10:49pm
Hello all, I've written a blog article as an introduction to the Haskell project I've been working on, which may be of interest to some people here. It's an OpenID Connect identity provider. I'd really welcome any feedback on other/better ways of doing some of things it talks about. Cheers, Luke.
Categories: Offsite Discussion

Jasper Van der Jeugt: On Ad-hoc Datatypes

Planet Haskell - Tue, 05/10/2016 - 6:00pm

In Haskell, it is extremely easy for the programmer to add a quick datatype. It does not have to take more than a few lines. This is useful to add auxiliary, ad-hoc datatypes.

I don’t think this is used enough. Most libraries and code I see use “heavier” datatypes: canonical and very well-thought-out datatypes, followed by dozens of instances and related functions. These are of course great to work with, but it doesn’t have to be a restriction: adding quick datatypes – without all these instances and auxiliary functions – often makes code easier to read.

The key idea is that, in order to make code as simple as possible, you want to represent your data as simply as possible. However, the definition of “simple” is not the same in every context. Sometimes, looking at your data from another perspective makes specific tasks easier. In those cases, introducing “quick-and-dirty” datatypes often makes code cleaner.

This blogpost is written in literate Haskell so you should be able to just load it up in GHCi and play around with it. You can find the raw .lhs file here.

> import Control.Monad (forM_)

Let’s look at a quick example. Here, we have a definition of a shopping cart in a fruit store.

> data Fruit = Banana | Apple | Orange > deriving (Show, Eq) > > type Cart = [(Fruit, Int)]

And we have a few functions to inspect it.

> cartIsHomogeneous :: Cart -> Bool > cartIsHomogeneous [] = True > cartIsHomogeneous ((fruit, _) : xs) = all ((== fruit) . fst) xs > cartTotalItems :: Cart -> Int > cartTotalItems = sum . map snd

This is very much like code you typically see in Haskell codebases (of course, with more complex datatypes than this simple example).

The last function we want to add is printing a cart. The exact way we format it depends on what is in the cart. There are four possible scenarios.

  1. The cart is empty.
  2. There is a single item in the customers cart and we have some sort of simplified checkout.
  3. The customer buys three or more of the same fruit (and nothing else). In that case we give out a bonus.
  4. None of the above.

This is clearly a good candidate for Haskell’s case statement and guards. Let’s try that.

> printCart :: Cart -> IO () > printCart cart = case cart of > [] -> putStrLn $ "Your cart is empty" > [(fruit, 1)] -> putStrLn $ "You are buying one " ++ show fruit > _ | cartIsHomogeneous cart && cartTotalItems cart >= 3 -> do > putStrLn $ > show (cartTotalItems cart) ++ > " " ++ show (fst $ head cart) ++ "s" ++ > " for you!" > putStrLn "BONUS GET!" > | otherwise -> do > putStrLn $ "Your cart: " > forM_ cart $ \(fruit, num) -> > putStrLn $ "- " ++ show num ++ " " ++ show fruit

This is not very nice. The business logic is interspersed with the printing code. We could clean it up by adding additional predicates such as cartIsBonus, but having too many of these predicates leads to a certain kind of Boolean Blindness.

Instead, it seems much nicer to introduce a temporary type:

> data CartView > = EmptyCart > | SingleCart Fruit > | BonusCart Fruit Int > | GeneralCart Cart

This allows us to decompose our printCart into two clean parts: classifying the cart, and printing it.

> cartView :: Cart -> CartView > cartView [] = EmptyCart > cartView [(fruit, 1)] = SingleCart fruit > cartView cart > | cartIsHomogeneous cart && cartTotalItems cart >= 3 = > BonusCart (fst $ head cart) (cartTotalItems cart) > | otherwise = GeneralCart cart

Note that we now have a single location where we classify the cart. This is useful if we need this information in multiple places. If we chose to solve the problem by adding additional predicates such has cartIsBonus instead, we would still have to watch out that we check these predicates in the same order everywhere. Furthermore, if we need to add a case, we can simply add a constructor to this datatype, and the compiler will tell us where we need to update our code 1.

Our printCart becomes very simple now:

> printCart2 :: Cart -> IO () > printCart2 cart = case cartView cart of > EmptyCart -> putStrLn $ "Your cart is empty" > SingleCart fruit -> putStrLn $ "You are buying one " ++ show fruit > BonusCart fruit n -> do > putStrLn $ show n ++ " " ++ show fruit ++ "s for you!" > putStrLn "BONUS GET!" > GeneralCart items -> do > putStrLn $ "Your cart: " > forM_ items $ \(fruit, num) -> > putStrLn $ "- " ++ show num ++ " " ++ show fruit

Of course, it goes without saying that ad-hoc datatypes that are only used locally should not be exported from the module – otherwise you end up with a mess again.

  1. If you are compiling with -Wall, which is what you really, really should be doing.

Categories: Offsite Blogs

Using parallels for fibonacci

haskell-cafe - Tue, 05/10/2016 - 5:39pm
I am trying to efficiently use multicores for my fizzbuzz <> project. My fizzbuzz uses a Fibonacci generator as input, and this is where it can get computationally heavy. I believe I have picked the best algorithm for my project (please correct this if wrong), and now I am trying to use the parallel package <>. I am not getting any better performance in the sense that if I try to compute the 100th Fibonacci number, it is still computing , using 4 cores, several minutes later. Here is my attempt. Please show me how to use this library right. from src/FizzBuzz.hs fizzBuzzFib :: Integer -> [Text] fizzBuzzFib ub = parMap rdeepseq fizzbuzz $! fibSeq ub from src/FizzFub.hs fibSeq :: Integer -> [Integer] fibSeq ub = withStrategy (parBuffer buffer rdeepseq) $ genericTake ub fibbwhere buffer = 100 fibb :: [Integer] fibb = 0 : 1 : zipWith (+) fibb (tail fibb) _______________________________________________ Haskell-Cafe ma
Categories: Offsite Discussion

Trustworthy Refactoring project: Research AssociatePositions in Refactoring Functional Programs and FormalVerification (for CakeML)

General haskell list - Tue, 05/10/2016 - 4:33pm
Trustworthy Refactoring project: Research Associate Positions in Refactoring Functional Programs and Formal Verification (for CakeML) The Trustworthy Refactoring project at the University of Kent is seeking to recruit postdoc research associates for two 3.5 year positions, to start in September this year. The overall goal of this project is to make a step change in the practice of refactoring by designing and constructing of trustworthy refactoring tools. By this we mean that when refactorings are performed, the tools will provide strong evidence that the refactoring has not changed the behaviour of the code, built on a solid theoretical understanding of the semantics of the language. Our approach will provide different levels of assurance from the (strongest) case of a fully formal proof that a refactoring can be trusted to work on all programs, given some pre-conditions, to other, more generally applicable guarantees, that a refactoring applied to a particular program does not change the behaviour of t
Categories: Incoming News

A Farewell to FRP in Elm

Lambda the Ultimate - Tue, 05/10/2016 - 9:24am

Making signals unnecessary with The Elm Architecture

...the big benefit is that Elm is now significantly easier to learn and use. As the design of subscriptions emerged, we saw that all the toughest concepts in Elm (signals, addresses, and ports) could collapse into simpler concepts in this new world. Elm is designed for ease-of-use, so I was delighted to stumble upon a path that would take us farther with fewer concepts. To put this in more alarmist terms, everything related to signals has been replaced with something simpler and nicer.

Categories: Offsite Discussion

Summer of Haskell Mentors

General haskell list - Tue, 05/10/2016 - 3:31am
If you are interesting in helping out as a possible mentor for this year's Summer of Haskell, please email me, and include MENTOR in the title. Thank you! -Edward
Categories: Incoming News

origin of my fibonacci test

haskell-cafe - Tue, 05/10/2016 - 12:59am
I have some code that checks to see if a number is a fibonacci number. It's not mine, I got it from somewhere and I need to credit it. I am pretty sure I got it from Stack Exchange but my search for it went nowhere. If this looks familiar to you, or you can tell me better ways to search, please let me know. isFib :: Integer -> Bool isFib n = n == a where (_, a, _) = unFib (1, 1) n unFib :: (Integer, Integer) -> Integer -> (Integer,Integer,Integer) unFib (a, b) n | n < a = (0, 0, 1) | n < e = (2*k, c, d) | otherwise = (2*k + 1, e, f) where (k, c, d) = unFib (fibPlus (a, b) (a, b)) n (e, f) = fibPlus (a, b) (c, d) fibPlus :: (Integer, Integer) -> (Integer, Integer) -> (Integer,Integer) fibPlus (a, b) (c, d) = (bd - (b - a)*(d - c), a*c + bd) where bd = b*d _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

Myrtle Software is looking for Haskell developers for exciting graphics/compilers/hardware work

haskell-cafe - Mon, 05/09/2016 - 6:08pm We're a small software company in Cambridge, UK. We are working on some cool tech for lowering image processing algorithms to efficient hardware designs with a focus on putting these in autonomous vehicles. Our compiler is written completely in Haskell as well as some other tools we've written in house. We are looking to hire some more Haskell talent to help drive things forward. Please ask if you have any questions!
Categories: Offsite Discussion

WST 2016 - First Call for Papers

haskell-cafe - Mon, 05/09/2016 - 3:41pm
========================================================================== WST 2016 - 1st Call for Papers 15th International Workshop on Termination September 5-7, 2016, Obergurgl, Austria ========================================================================== The Workshop on Termination (WST) traditionally brings together, in an informal setting, researchers interested in all aspects of termination, whether this interest be practical or theoretical, primary or derived. The workshop also provides a ground for cross-fertilization of ideas from term rewriting and from the different programming language communities. The friendly atmosphere enables fruitful exchanges leading to joint research and subsequent publications. The event is held as part of CLA 2016 IMPORTANT DATES: * submission June 22, 2016 * n
Categories: Offsite Discussion

suboptimal ghc code generation in IO vs equivalent pure code case

glasgow-user - Mon, 05/09/2016 - 3:23pm
I have a loop which runs millions of times. For some reason I have to run it in the IO monad. I noticed that when I convert the code from pure to IO monad the generated assembly code in essence is almost identical except one difference where it puts a piece of code in a separate block which is making a huge difference in performance (4-6x slower). I want to understand what makes GHC to generate code in this way and if there is anything that can be done at source level (or ghc option) to control that. The pure code looks like this: decomposeChars :: [Char] -> [Char] decomposeChars [] = [] decomposeChars [x] = case NFD.isDecomposable x of True -> decomposeChars (NFD.decomposeChar x) False -> [x] decomposeChars (x : xs) = decomposeChars [x] ++ decomposeChars xs The equivalent IO code is this: decomposeStrIO :: [Char] -> IO [Char] decomposeStrPtr !p = decomposeStrIO where decomposeStrIO
Categories: Offsite Discussion

Problems with function recursion in Haskell

haskell-cafe - Mon, 05/09/2016 - 2:30pm
Hi, I'm new in Haskell and I need help in recursion. That function below is returning "*** Exception: Prelude.head: empty list" and I need resolve that: execNTimes 0 [] = return() execNTimes n xs = if n<=0 || null xs then return() else do si <- getLine let s = words si l = read (s !! 1) :: Int r = read (s !! 2) :: Int if head s=="Q" then do let z = slice l r xs m = foldl lcm 1 z print (m `mod` (toInteger 1000000007)) else do let s1 = update l r xs execNTimes (n-1) s1 execNTimes (n-1) xs Anybody can me help? Thank you, Josenildo Silva
Categories: Offsite Discussion

LPTI'16 Call for Papers

General haskell list - Mon, 05/09/2016 - 11:30am
Call for Papers Workshop on Logic Programming for Type Inference 16-17 October 2016, New York, USA Objectives and scope ------------------- Two facts are universally acknowledged: critical software must be subject to formal verification and modern verification tools need to scale and become more user-friendly in order to make more impact in industry. There are two major styles of verification: algorithmic : verification problems are specified in an automated prover, e.g. (constraint) logic programming or SMT solver, and properties of interest are verified by the prover automatically. Such provers can be fast, but their trustworthiness is hard to establish without producing and checking proofs. An alternative is a typeful approach to verification: instead of verifying programs in an external prover, a programmer may record all properties of interest as types of functions in his programs. Thanks to Curry-Howard isomorphism, type inhabitants also play the rol
Categories: Incoming News

CFP: WADT 2016

General haskell list - Mon, 05/09/2016 - 11:13am
CFP: WADT 2016 - 23rd International Workshop on Algebraic Development Techniques Link: When Sep 21, 2016 - Sep 24, 2016 Where Gregynog, UK Submission Deadline June 3, 2016 Notification June 17, 2016 Final Version Due July 1, 2016 AIMS AND SCOPE The algebraic approach to system specification encompasses many aspects of the formal design of software systems. Originally born as formal method for reasoning about abstract data types, it now covers new specification frameworks and programming paradigms (such as object-oriented, aspect-oriented, agent-oriented, logic and higher-order functional programming) as well as a wide range of application areas (including information systems, concurrent, distributed and mobile systems). The workshop will provide an opportunity to present recent and ongoing work, to meet colleagues, and to discuss new ideas and future trends. TOPICS OF INTEREST Typical, but not exclusive topics of interest are
Categories: Incoming News

CRV 2016 - The 3rd International Competition on RuntimeVerification

General haskell list - Mon, 05/09/2016 - 10:56am
CRV 2016 The 3rd International Competition on Runtime Verification In Association with COST Action “Runtime Verification beyond Monitoring” held with RV 2016, September 23-30 2016, Madrid, Spain CRV 2016 is the 3rd International Competition on Runtime Verification and will be held as part of the 16th International Conference on Runtime Verification. The event will be held in September 2016, in Madrid, Spain. CRV-2016 will draw attention to the invaluable effort of software developers and researchers who contribute in this field by providing the community with new or updated tools, libraries and frameworks for the instrumentation and runtime verification of software. The competition is a product of COST Action “Runtime Verification beyond Monitoring”, see <> for more information. Runtime Verification is a verification technique for the analysis of software at execution-time based on extracting information from a
Categories: Incoming News

[RV 2016] RV 2016, Deadlines Extended - Abstract: May 20,Paper/Tutorial: May 27

General haskell list - Mon, 05/09/2016 - 8:26am
Following several requests, the deadlines have been extended as follows: - Abstract deadline: Friday May 20 (AoE). - Paper and tutorial deadline: Friday May 27 (AoE). =============================================== RV 2016 16th International Conference on Runtime Verification September 23-30, Madrid, Spain <> Scope Runtime verification is concerned with monitoring and analysis of software and hardware system executions. Runtime verification techniques are crucial for system correctness, reliability, and robustness; they are significantly more powerful and versatile than conventional testing, and more practical than exhaustive formal verification. Runtime verification can be used prior to deployment, for testing, verification, and debugging purposes
Categories: Incoming News

Joachim Breitner: Doctoral Thesis Published

Planet Haskell - Mon, 05/09/2016 - 2:48am

I have officially published my doctoral thesis “ Lazy Evaluation: From natural semantics to a machine-checked compiler transformation” (DOI: 10.5445/IR/1000054251). The abstract of the 226 page long document that earned me a “summa cum laude” reads

In order to solve a long-standing problem with list fusion, a new compiler transformation, 'Call Arity' is developed and implemented in the Haskell compiler GHC. It is formally proven to not degrade program performance; the proof is machine-checked using the interactive theorem prover Isabelle. To that end, a formalization of Launchbury`s Natural Semantics for Lazy Evaluation is modelled in Isabelle, including a correctness and adequacy proof.

and I assembled all relevant artefacts (the thesis itself, its LaTeX-sources, the Isabelle theories, various patches against GHC, raw benchmark results, errata etc.) at

Other, less retrospective news: My paper on the Incredible Proof Machine got accepted at ITP in Nancy, and I was invited to give a keynote demo about the proof machine at LFMTP in Porto. Exciting!

Categories: Offsite Blogs

Automatic differentiation (AD) with respect to listof matrices in Haskell

haskell-cafe - Sun, 05/08/2016 - 5:04pm
I am trying to understand how can I use Numeric.AD (automatic differentiation) in Haskell. I defined a simple matrix type and a scalar function taking an array and two matrices as arguments. I want to use AD to get the gradient of the scoring function with respect to both matrices, but I'm running into compilation problems. Here is the code: ------------------------------- {-# LANGUAGE DeriveTraversable, DeriveFunctor, DeriveFoldable #-}import Numeric.AD.Mode.Reverse as Rimport Data.Traversable as Timport Data.Foldable as F --- Non-linear function on "vectors" logistic x = 1.0 / (1.0 + exp(-x) ) phi v = map logistic v phi' (x:xs) = x : (phi xs) --- dot product dot u v = foldr (+) 0 $ zipWith (*) u v --- simple matrix typedata Matrix a = M [[a]] deriving (Eq,Show,Functor,F.Foldable,T.Traversable) --- action of a matrix on a vector mv _ [] = [] mv (M []) _ = [] mv ( M m ) v = ( dot (head m) v ) : (mv (M (tail m)) v ) --- two matrices mbW1 = M $ [[1,0,0],[-1,5,1],[1,2,-3]] mbW2 = M $ [[0,0,0],[1,3,-1],[-2,
Categories: Offsite Discussion

The Gentoo Haskell Team: How to deal with portage blockers

Planet Haskell - Sun, 05/08/2016 - 3:27pm
  • use --autounmask=n
  • use --backtrack=1000 (or more)
  • package.mask all outdated packages that cause conflicts (usually requires more iterations)
  • run world update
The problem

Occasionally (more frequently on haskel packages) portage starts taking long time to only tell you it was not able to figure out the upgrade path.

Some people suggest "wipe-blockers-and-reinstall" solution. This post will try to explain how to actually upgrade (or find out why it’s not possible) without actually destroying your system.

Real-world example

I’ll take a real-world example in Gentoo’s bugzilla: bug 579520 where original upgrade error looked like that:

!!! Multiple package instances within a single package slot have been pulled !!! into the dependency graph, resulting in a slot conflict: x11-libs/gtk+:3 (x11-libs/gtk+-3.18.7:3/3::gentoo, ebuild scheduled for merge) pulled in by (no parents that aren't satisfied by other packages in this slot) (x11-libs/gtk+-3.20.0:3/3::gnome, installed) pulled in by >=x11-libs/gtk+-3.19.12:3[introspection?] required by (gnome-base/nautilus-3.20.0:0/0::gnome, installed) ^^ ^^^^^^^^^ >=x11-libs/gtk+-3.20.0:3[cups?] required by (gnome-base/gnome-core-libs-3.20.0:3.0/3.0::gnome, installed) ^^ ^^^^^^^^ >=x11-libs/gtk+-3.19.4:3[introspection?] required by (media-video/totem-3.20.0:0/0::gnome, ebuild scheduled for merge) ^^ ^^^^^^^^ >=x11-libs/gtk+-3.19.0:3[introspection?] required by (app-editors/gedit-3.20.0:0/0::gnome, ebuild scheduled for merge) ^^ ^^^^^^^^ >=x11-libs/gtk+-3.19.5:3 required by (gnome-base/dconf-editor-3.20.0:0/0::gnome, ebuild scheduled for merge) ^^ ^^^^^^^^ >=x11-libs/gtk+-3.19.6:3[introspection?] required by (x11-libs/gtksourceview-3.20.0:3.0/3::gnome, ebuild scheduled for merge) ^^ ^^^^^^^^ >=x11-libs/gtk+-3.19.3:3[introspection,X] required by (media-gfx/eog-3.20.0:1/1::gnome, ebuild scheduled for merge) ^^ ^^^^^^^^ >=x11-libs/gtk+-3.19.8:3[X,introspection?] required by (x11-wm/mutter-3.20.0:0/0::gnome, installed) ^^ ^^^^^^^^ >=x11-libs/gtk+-3.19.12:3[X,wayland?] required by (gnome-base/gnome-control-center-3.20.0:2/2::gnome, installed) ^^ ^^^^^^^^^ >=x11-libs/gtk+-3.19.11:3[introspection?] required by (app-text/gspell-1.0.0:0/0::gnome, ebuild scheduled for merge) ^^ ^^^^^^^^^ x11-base/xorg-server:0 (x11-base/xorg-server-1.18.3:0/1.18.3::gentoo, installed) pulled in by x11-base/xorg-server:0/1.18.3= required by (x11-drivers/xf86-video-nouveau-1.0.12:0/0::gentoo, installed) ^^^^^^^^^^ x11-base/xorg-server:0/1.18.3= required by (x11-drivers/xf86-video-fbdev-0.4.4:0/0::gentoo, installed) ^^^^^^^^^^ x11-base/xorg-server:0/1.18.3= required by (x11-drivers/xf86-input-evdev-2.10.1:0/0::gentoo, installed) ^^^^^^^^^^ (x11-base/xorg-server-1.18.2:0/1.18.2::gentoo, ebuild scheduled for merge) pulled in by x11-base/xorg-server:0/1.18.2= required by (x11-drivers/xf86-video-vesa-2.3.4:0/0::gentoo, installed) ^^^^^^^^^^ x11-base/xorg-server:0/1.18.2= required by (x11-drivers/xf86-input-synaptics-1.8.2:0/0::gentoo, installed) ^^^^^^^^^^ x11-base/xorg-server:0/1.18.2= required by (x11-drivers/xf86-input-mouse-1.9.1:0/0::gentoo, installed) ^^^^^^^^^^ app-text/poppler:0 (app-text/poppler-0.32.0:0/51::gentoo, ebuild scheduled for merge) pulled in by >=app-text/poppler-0.32:0/51=[cxx,jpeg,lcms,tiff,xpdf-headers(+)] required by (net-print/cups-filters-1.5.0:0/0::gentoo, installed) ^^^^^^ >=app-text/poppler-0.16:0/51=[cxx] required by (app-office/libreoffice-, installed) ^^^^^^ >=app-text/poppler-0.12.3-r3:0/51= required by (app-text/texlive-core-2014-r4:0/0::gentoo, installed) ^^^^^^ (app-text/poppler-0.42.0:0/59::gentoo, ebuild scheduled for merge) pulled in by >=app-text/poppler-0.33[cairo] required by (app-text/evince-3.20.0:0/evd3.4-evv3.3::gnome, ebuild scheduled for merge) ^^ ^^^^ net-fs/samba:0 (net-fs/samba-4.2.9:0/0::gentoo, installed) pulled in by (no parents that aren't satisfied by other packages in this slot) (net-fs/samba-3.6.25:0/0::gentoo, ebuild scheduled for merge) pulled in by net-fs/samba[smbclient] required by (media-sound/xmms2-0.8-r2:0/0::gentoo, ebuild scheduled for merge) ^^^^^^^^^ It may be possible to solve this problem by using package.mask to prevent one of those packages from being selected. However, it is also possible that conflicting dependencies exist such that they are impossible to satisfy simultaneously. If such a conflict exists in the dependencies of two different packages, then those packages can not be installed simultaneously. For more information, see MASKED PACKAGES section in the emerge man page or refer to the Gentoo Handbook. emerge: there are no ebuilds to satisfy ">=dev-libs/boost-1.55:0/1.57.0=". (dependency required by "app-office/libreoffice-" [installed]) (dependency required by "@selected" [set]) (dependency required by "@world" [argument])

A lot of text! Let’s trim it down to essential detail first (AKA how to actually read it). I’ve dropped the "cause" of conflcts from previous listing and left only problematic packages:

!!! Multiple package instances within a single package slot have been pulled !!! into the dependency graph, resulting in a slot conflict: x11-libs/gtk+:3 (x11-libs/gtk+-3.18.7:3/3::gentoo, ebuild scheduled for merge) pulled in by (x11-libs/gtk+-3.20.0:3/3::gnome, installed) pulled in by x11-base/xorg-server:0 (x11-base/xorg-server-1.18.3:0/1.18.3::gentoo, installed) pulled in by (x11-base/xorg-server-1.18.2:0/1.18.2::gentoo, ebuild scheduled for merge) pulled in by app-text/poppler:0 (app-text/poppler-0.32.0:0/51::gentoo, ebuild scheduled for merge) pulled in by (app-text/poppler-0.42.0:0/59::gentoo, ebuild scheduled for merge) pulled in by net-fs/samba:0 (net-fs/samba-4.2.9:0/0::gentoo, installed) pulled in by (net-fs/samba-3.6.25:0/0::gentoo, ebuild scheduled for merge) pulled in by emerge: there are no ebuilds to satisfy ">=dev-libs/boost-1.55:0/1.57.0=".

That is more manageable. We have 4 "conflicts" here and one "missing" package.

Note: all the listed requirements under "conflicts" (the previous listing) suggest these are >= depends. Thus the dependencies themselves can’t block upgrade path and error message is misleading.

For us it means that portage leaves old versions of gtk+ (and others) for some unknown reason.

To get an idea on how to explore that situation we need to somehow hide outdated packages from portage and retry an update. It will be the same as uninstalling and reinstalling a package but not actually doing it

package.mask does exactly that. To make package hidden for real we will also need to disable autounmask: --autounmask=n (default is y).

Let’s hide outdated x11-libs/gtk+-3.18.7 package from portage:

# /etc/portage/package.mask <x11-libs/gtk+-3.20.0:3

Blocker list became shorter but still does not make sense:

x11-base/xorg-server:0 (x11-base/xorg-server-1.18.2:0/1.18.2::gentoo, ebuild scheduled for merge) pulled in by (x11-base/xorg-server-1.18.3:0/1.18.3::gentoo, installed) pulled in by ^^^^^^^^^^ app-text/poppler:0 (app-text/poppler-0.32.0:0/51::gentoo, ebuild scheduled for merge) pulled in by (app-text/poppler-0.42.0:0/59::gentoo, ebuild scheduled for merge) pulled in by

Blocking more old stuff:

# /etc/portage/package.mask <x11-libs/gtk+-3.20.0:3 <x11-base/xorg-server-1.18.3 <app-text/poppler-0.42.0

The output is:

[blocks B ] <dev-util/gdbus-codegen-2.48.0 ("<dev-util/gdbus-codegen-2.48.0" is blocking dev-libs/glib-2.48.0) * Error: The above package list contains packages which cannot be * installed at the same time on the same system. (dev-libs/glib-2.48.0:2/2::gentoo, ebuild scheduled for merge) pulled in by (dev-util/gdbus-codegen-2.46.2:0/0::gentoo, ebuild scheduled for merge) pulled in by

That’s our blocker! Stable <dev-util/gdbus-codegen-2.48.0 blocks unstable blocking dev-libs/glib-2.48.0.

The solution is to ~arch keyword dev-util/gdbus-codegen-2.48.0:

# /etc/portage/package.accept_keywords dev-util/gdbus-codegen

And run world update.


Categories: Offsite Blogs

Applying a Constraint to a Proxy'd type

haskell-cafe - Sun, 05/08/2016 - 1:15pm
I'm not sure if it's possible (and I have an alternate method of doing this so it isn't strictly speaking _necessary_, but would make the code cleaner if I can), but I would like to convert a "value" of kind (k -> Constraint) into one of kind (Proxy k -> Constraint). I can achieve this using a type family (note: I've also made this polymorphic in terms of the Proxy type used, but that isn't necessary): which has the problem that it can't be partially applied (which I also need). This can be wrapped up in a typeclass: The problem with this is that if I try and use it somewhere that - having already a type of kind (c :: * -> Constraint) from the environment - that expects a function of type (forall a. (c a) => a -> b) with a fixed "b" value, then trying to use something like this function prevents it from working (for the purposes of argument, assume the old specification of Num that had an Eq superclass; this is the way I can produce the smallest example): The resulting error message is: "Could not de
Categories: Offsite Discussion