News aggregator

haddock for all modules (exposed and other) in acabalized project?

haskell-cafe - Tue, 12/17/2013 - 2:09pm
I have a cabalized project with few "exposed-modules", and a lot of "other-modules". How can I invoke "cabal haddock --hyperlink-source" for *all* modules? - Thanks, J.W.
Categories: Offsite Discussion

Building applications with profiling

haskell-cafe - Tue, 12/17/2013 - 3:14am
Greetings, I want to profile the Yi text editor. A quick look on the Haskell wiki suggests that I need --enable-executable-profiling, however enabling that complains that the yi libraries weren't built with profiling. Additionally enabling --enable-library-profiling allows me to recompile the libs but at the very end I get an error about ‘mtl’ not having been built with profiling. I can't really recompile mtl with profiling considering that just about every single package on my system seems to depend on it and they would (probably?) all break. Does anyone have any suggestions on how to approach the problem? Am I doing it all wrong? Thanks
Categories: Offsite Discussion

Polymorphic updating with TC/TFs?

haskell-cafe - Tue, 12/17/2013 - 2:37am
Hello, I am working with a set of type classes of the following form (http://lpaste.net/97110). The idea is that every such class provide an associated type Foo, and a lens to the Foo in every instance. I.e. this class is used to provide view/set/modify for all types that contain a Foo somewhere deep in its structure. For "simple lenses", i.e. functions that does not modify the associated Foo, this is straightforward. However to support polymorphic updates it seems necessary to add another associated type NoFoo, which must be used to constraint the return type of set. What bothers me is the redundancy of the two set functions. I would intuitively expect set' to be implemented in terms of set (as it seems to be a restriction of that function), but this is not possible, as the compiler can not deduce that (NoFoo a (Foo a) ~ a). Is there a way to add this constraint to the type class? Hans
Categories: Offsite Discussion

Removing MonadFail from Monad

libraries list - Tue, 12/17/2013 - 12:26am
Hey everyone, I feel like there are a couple of elephants in the room that are sort of important but nobody really addresses them directly. One of them was what became the AMP, and `fail` is another one. I resurrected and refurbished this proposal from a 6 month old Gist because there seemed to be some interest/talk going on in the form of side remarks in other discussions here. The sun shines, let's make some hay! The proposal text can be found at the end of this text (for the mailman archives), or in pretty HTML here: https://github.com/quchen/articles/blob/master/monad_fail.md Although this will technically a language-level change, the impact will mainly be a library and fail-safety detail. For this reason I think this mailing list is more suitable than other more specialized lists. Greetings, David/quchen PS: I would have chosen Fail Removal Proposal so we have a new buzzword, but unfortunately it does not abbreviate well. Call it the "fail of Haskell issue"? ;-) Removing `fail` from `Mona
Categories: Offsite Discussion

[ANN] IHaskell Update -- Call for Help/Suggestions

haskell-cafe - Mon, 12/16/2013 - 10:40pm
Hey everyone! I'm excited to announce a significant update to IHaskell. I originally announced IHaskell a few months ago, but there's been a few exciting changes: Significantly more stable and less buggy. It's been updated to use the GHC API for parsing and evaluation, so behavior should be very similar to GHCi in most places. You can now defined modules in cells instead of just interactive code. These modules are compiled to object code and loaded and provide fast runtime compared to interactive code. Most important: IHaskell can now load additional packages in order to provide rich display capabilities for specific data types. This means that it can be augmented through separate packages. If you have interest in providing a rich display mechanism for a data type, please consider writing an IHaskell extension package to do so! (If there are any data types that you think would be particularly useful but don't have time to implement yourself, let me know, too!) The extensibility is provided through an IHask
Categories: Offsite Discussion

10 PhD studentships in Nottingham

haskell-cafe - Mon, 12/16/2013 - 11:38am
Dear all, The School of Computer Science in Nottingham is advertising 10 fully-funded PhD studentships. Applicants in the area of the Functional Programming lab (fp.cs.nott.ac.uk) are encouraged! If you are interested in applying, please contact a potential supervisor in the FP lab prior to submitting your application: Thorsten Altenkirch - constructive logic, proof assistants, type theory, category theory, lambda calculus, quantum computing. Venanzio Capretta - type theory, mathematical logic, corecursive structures, proof assistants, dependently-typed programming. Graham Hutton - program construction and verification, category theory, recursion operators, coinductive types. Henrik Nilsson - functional reactive programming, modelling and simulation languages, domain-specific languages. Best wishes, Graham +-----------------------------------------------------------+ 10 Fully-Funded PhD Studentships School of Computer Science Univ
Categories: Offsite Discussion

10 PhD studentships in Nottingham

General haskell list - Mon, 12/16/2013 - 11:36am
Dear all, The School of Computer Science in Nottingham is advertising 10 fully-funded PhD studentships. Applicants in the area of the Functional Programming lab (fp.cs.nott.ac.uk) are encouraged! If you are interested in applying, please contact a potential supervisor in the FP lab prior to submitting your application: Thorsten Altenkirch - constructive logic, proof assistants, type theory, category theory, lambda calculus, quantum computing. Venanzio Capretta - type theory, mathematical logic, corecursive structures, proof assistants, dependently-typed programming. Graham Hutton - program construction and verification, category theory, recursion operators, coinductive types. Henrik Nilsson - functional reactive programming, modelling and simulation languages, domain-specific languages. Best wishes, Graham +-----------------------------------------------------------+ 10 Fully-Funded PhD Studentships School of Computer Science Univ
Categories: Incoming News

Clearing up the status of GHCi on Raspberry Pi

haskell-cafe - Mon, 12/16/2013 - 9:09am
Hello, There seems to be a bit of confusing information out there regarding what is possible with regard to Haskell and Raspberry Pi. Specifically, availability of GHCi (and as such, the ability to compile certain thing such as Vector) in various versions of ghc. Debian Weezy came with GHC 7.4.1. It doesn't come with GHCi. This fact was reflected in what I've read online. So far so good. Now, we come to GHC 7.4.2.: http://www.haskell.org/haskellwiki/Raspberry_Pi#GHC_Status This currently says the following: "Note: GHCi does not currently work on ARM below version 7.4.2. See this post on haskell-cafe for information on this djhuk has been able to compile and install GHC-7.4.2 via QEMU to the Raspberry Pi but there still seems to be some work to do." This seems to imply that GHC 7.4.2. will include GHCi on arm. It implies that, though there were at the time of writing some unspecified problems, if one could get 7.4.2. working on their Rasperry Pi, one would get GHCi. Futher, I extrapolated this to mean
Categories: Offsite Discussion

Real world project with Cloud Haskell

haskell-cafe - Mon, 12/16/2013 - 8:37am
Hello, Has anybody heard about (or better, made) a real world project using Cloud Haskell? Thank you Regards J-C _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

[ANN] Canberra -- Introduction to FunctionalProgramming course (free)

haskell-cafe - Mon, 12/16/2013 - 5:43am
*Title: *Introduction to Functional Programming *Presenters:* Mark Hibberd and Tony Morris *When: * Tuesday 4th, Wednesday 5^th & Thursday 6^th February, 9.00am
Categories: Offsite Discussion

Mips64el Linux Build

glasgow-user - Mon, 12/16/2013 - 5:32am
Hello, I am new to the list, though I have been using GHC for a long time. Just say Hello. I would like to share my experience about building GHC (7.7.20131112) on/for mips64el linux, just in case anybody is interested, as it seems not documented (on Wiki pages of Platforms, CrossCompiling, or Porting). Ignore this email if it is not interesting or too trivial. It bootstrapped by cross compiling on x86_64 linux, with some tweaking on mk/build.mk and the build process. In particular, I needed to specify export CPP="mips64el-unknown-linux-gnu-gcc -E" otherwise the configure script just found to use the native "gcc -E" and it failed in preprocessing rts C files. Also in mk/build.mk I forced GhcThreaded = NO GhcWithInterpreter = YES # so, it can use TH and build happy The make process failed when trying to use ghc-stage2, but at that point the stage 2 compiler is already built, that's enough. With this cross-compiled ghc-stage2, the native build on mips64el machine was done without much interleaving. in
Categories: Offsite Discussion

Data.Vector with stride

haskell-cafe - Mon, 12/16/2013 - 4:13am
For low-level performance, especially when dealing with images, pixel buffers, camera devices etc, arrays can have a "stride" to align rows to word boundaries. http://en.wikipedia.org/wiki/Stride_of_an_array Data.Vector does not support strides (as mentioned in http://u.arboreus.com/2011/03/how-to-choose-haskell-array-library.html), but it would be nice to have them, especially for Storable vectors and interfacing with C imaging libraries. Is there a particular reason / difficulty that would go against an implementation of a Data.Vector.Storable.Stride and the corresponding generic vector instances?
Categories: Offsite Discussion

source from hayoo

haskell-cafe - Sun, 12/15/2013 - 11:56pm
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

getting source

haskell-cafe - Sun, 12/15/2013 - 11:28pm
It is a shame that when you look something up in Hayoo, you can immediately look at the source--but you can't
Categories: Offsite Discussion

Using unsafePerformIO and free with CString

haskell-cafe - Sun, 12/15/2013 - 10:32pm
I’m trying to write a wrapper for a C function. Here is an example of such code: {-# LANGUAGE ForeignFunctionInterface #-} import Foreign.C.String import Foreign.C.Types import System.IO.Unsafe import Foreign.Marshal.Alloc foreign import ccall "string.h strcmp" c_strcmp :: CString -> CString -> CInt strcmp :: String -> String -> Ordering strcmp s t = unsafePerformIO $ do s' <- newCString s t' <- newCString t let n = c_strcmp s' t' -- free s' -- free t' return $ case () of _ | n == 0 -> EQ | n < 0 -> LT | otherwise -> GT Two questions: 1. May I safely use unsafePerformIO in such cases? 2. What’s the proper way of using free here? If I uncomment the above, the function returns incorrect results. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

RFC: Top level mutable state in terms ofpure-function initialization?

haskell-cafe - Sun, 12/15/2013 - 1:39pm
A pure function (enumToIORef :: (Enum a, Defaultable b) => a -> IORef b). This function returns referentially transparently an IORef as a function of its "seed" with the guarantee that the IORef returned is identical if and only if the seed is. This function can be used to implement top level mutable state in a module. The module can specifically create an enumerated type for this and not export it, thereby removing any possibility of another module passing the seed type and conflicting. The Defaultable class is added in this case to implement only a single method (defaultValue :: Defaultable a => a -> a). This is conceptionally the 'simplest' value of the type, such as the empty list, the number 0, False, the null character &c. The IORef returned by enumToIORef would be initialized before being written to to this specific default value of its type. This approach is chosen because it is impossible to initialize it to user specified value because enumToIORef can be called twice with the same seed but a diffe
Categories: Offsite Discussion

Cabal sandbox status in your ZSH prompt

haskell-cafe - Sat, 12/14/2013 - 8:51pm
Hi everyone, I made a simple script for my zsh setup that allows me to see whether am I in a cabalized sandbox environment or not. On my machine it looks like this: <https://files.app.net/rjphjAG9.png> The script itself is here: <https://gist.github.com/co-dan/7963200> The result of checking for the sandbox is cached, which---as I've realized only moments ago---is probably unnecessary; it updates only when the user performs a `cabal` command or changes a directory.
Categories: Offsite Discussion

Proposal: move ansi-terminal to haskell-pkg-janitors

haskell-cafe - Sat, 12/14/2013 - 2:01pm
ansi-terminal is a useful and important package providing colorful console output. It has 50 direct reverse dependencies, and a huge number of indirect ones (through testing frameworks, for example). ansi-terminal was written and maintained by Max Bolingbroke, but he doesn't seem to be active in the Haskell community anymore. The package itself hasn't been updated for a year. Unless he (or someone else) objects, I propose to move ansi-terminal under maintainership of the haskell-pkg-janitors group. Is there any venue for haskell-pkg-janitors, such as a mailing list or IRC channel? Roman _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

Full Professorship (U Tübingen, Germany)

General haskell list - Sat, 12/14/2013 - 1:53pm
Dear colleagues, you may be interested in the following position of a Full Professor (tenure) at the University of Tübingen, Germany. Closing date: Jan 5, 2014. (Announcement, in German, below.) ----------------------------------------------------------------------- An der Mathematisch-Naturwissenschaftlichen Fakultät der Eberhard Karls Universität Tübingen ist im Fachbereich Informatik eine W3-Professur für Praktische Informatik zum 1. Oktober 2014 zu besetzen. Der/Die künftige Stelleninhaber/in sollte in Forschung und Lehre primär das Fach "Praktische Informatik" vertreten und sich im vollen Umfang an der Grundausbildung in Praktischer Informatik beteiligen. Der Forschungsschwerpunkt soll in dem Bereich Software Engineering, insbesondere moderne Programmierkonzepte (Deklarativität, Verteilung, Nebenläufigkeit und Parallelität) und deren Anwendungen, liegen. Einstellungsvoraussetzung ist die Habilitation oder eine gleichwertige Qualifikation sowie nachgewiesene didaktische Eignung.
Categories: Incoming News

Proposal: die to System.Exit (and/or Prelude)

libraries list - Sat, 12/14/2013 - 12:56pm
Hi! I propose to add die :: String -> IO () die err = hPutStrLn stderr err >> exitFailure to System.Exit. Reasoning: (1) It's a frequently required functionality. Almost every command-line program has code similar to this. (2) The definition is relatively short, but in addition to the definition, you need two import statements. (3) It's frequently done wrong (e.g. writing to stdout instead of stderr, or not using exitFailure, or both). I haven't done any extensive research on Hackage, but I quickly looked at Haddock. Here we have a definition of die [1], but we also print to stdout at a couple of place and then call exitFailure [2]. Personally, I think it should be re-exported from Prelude. But this may be controversial. So let's have two separate votes: Add System.Exit.die: +1 Re-export it from Prelude: +1 (discussion until December, 28th) Cheers, Simon [1] https://github.com/ghc/haddock/blob/8d4c94ca5a969a5ebbb791939fb0195dc672429e/src/Haddock/Utils.h
Categories: Offsite Discussion