News aggregator

Different behaviour with -XAllowAmbiguousTypes in7.10.3b and 8.0.1

haskell-cafe - Wed, 07/20/2016 - 4:52pm
Hi, while porting a library to Haskell, which deals with persisting finite state automata to various stores, depending on the user's choice and the instances provided for types s(tate) e(vent) a(ction), I ran into different behaviour in ghc 7.10.3b and 8.0.1 related to ambiguity checks. This is a minimised and somewhat contrived example: With GHC 8.0.1 I get: However, when I remove the type signature for get: GHC inferred the exact same type I provided, but this time it compiles successfully. When going back to GHC 7.10.3b, without type signature: So my questions are: *) What's with the different behaviour depending on whether the type sig is inferred or provided? *) Is GHC 7.10.3b or 8.0.1 closer to the correct behaviour w.r.t. -XAllowAmbiguousTypes? -- Regards, Max Amanshauser. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via
Categories: Offsite Discussion

pattern match on forall'ed data

haskell-cafe - Wed, 07/20/2016 - 4:18pm
Hi all, I'm surprised this doesn't work: data SomeData = forall e. (Typeable e, Eq e) => SomeData e (===) :: (Typeable a, Typeable b, Eq a, Eq b) => a -> b -> Bool (===) x y = cast x == Just y test :: SomeData' -> Bool test (SomeData' e) | e === Nothing = True test _ = False It says Could not deduce (Eq a1) arising from a use of ‘===’ How can I achieve something of the same effect? Thanks Corentin _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
Categories: Offsite Discussion

RFC: New version of haskell-src-exts withoutsimplified AST

haskell-cafe - Wed, 07/20/2016 - 2:09pm
Dear all, For several months I have had a branch of haskell-src-exts which has been updated for all the new features in GHC 8. However, I have not yet released the changes as in this version I also removed the simplified AST. To those unfamiliar, HSE provides two ASTs, one which has source locations and one which doesn't. I have removed the one which doesn't. This simplifies maintenance and I think also makes the library easier to use. I have held back releasing this version as there are some people who use the simplified AST. The changes necessary for the new version are mechanical and easy to make. For example, David Fox updated haskell-names to use my branch [1] with few problems. The question is, are there any users of the library who object to this change? Matt [1]: https://github.com/haskell-suite/haskell-names/pull/73 _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinf
Categories: Offsite Discussion

Function to replace given element in list

General haskell list - Tue, 07/19/2016 - 9:08pm
Hi I'm trying to make a custom function to replace a given element in a list. Code: let i = elemIndex toReplace lst in case i of Just i -> let z = splitAt i lst x = fst z y = (snd z) in init x x ++ newNmr x ++ y Nothing -> [5] Error: I've tried a lot, but I always got an error. What am I doing wrong? Thanks! _______________________________________________ Haskell mailing list Haskell< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell
Categories: Incoming News

Local Haskell talk in Leipzig,27 July 2016 at 3:30pm in HTWK

haskell-cafe - Tue, 07/19/2016 - 6:11pm
Dear (filter (`livesInOrCloseTo` Leipzig_Germany) haskellers), we would like to invite you to a talk by Stephen Blackheath "They why and how of Functional Reactive Programming with Java/Sodium" on Wednesday, 27 July 2016, at 15:30 Uhr in Room Gu 102, Gutenberg-Bau, HTWK Leipzig Abstract: <https://portal.imn.htwk-leipzig.de/termine/vortrag-the-why-and-how-of-functional-reactive-programming-with-java-sodium? Geographical coordinates: <http://www.openstreetmap.org/?mlat=51.31248&mlon=12.37498#map=18/51.31248/12.37498> Afterwards (~ 17:00 Uhr) there will be a get-together in the Cafe Suedbrause <http://suedbrause.de>. Stop Listening! Johannes Waldmann and Heinrich Apfelmus _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
Categories: Offsite Discussion

Call for Participation: ICFP 2016

haskell-cafe - Tue, 07/19/2016 - 6:44am
[ Early registration ends 17 August. ] ===================================================================== Call for Participation ICFP 2016 21st ACM SIGPLAN International Conference on Functional Programming and affiliated events September 18 - September 24, 2016 Nara, Japan http://conf.researchr.org/home/icfp-2016 ===================================================================== ICFP provides a forum for researchers and developers to hear about the latest work on the design, implementations, principles, and uses of functional programming. The conference covers the entire spectrum of work, from practice to theory, including its peripheries. A full week dedicated to functional programming: 1 conference, 1 symposium, 10 workshops, tutorials, programming contest results, student research competition, and mentoring workshop * Overview and affiliated events: http://conf.researchr.org/home/icfp-2016 * Program: http://conf.researchr.org/program/icfp-2016/program-icfp-2016 * Accepted Papers:
Categories: Offsite Discussion

Call for Participation: ICFP 2016

General haskell list - Tue, 07/19/2016 - 6:44am
[ Early registration ends 17 August. ] ===================================================================== Call for Participation ICFP 2016 21st ACM SIGPLAN International Conference on Functional Programming and affiliated events September 18 - September 24, 2016 Nara, Japan http://conf.researchr.org/home/icfp-2016 ===================================================================== ICFP provides a forum for researchers and developers to hear about the latest work on the design, implementations, principles, and uses of functional programming. The conference covers the entire spectrum of work, from practice to theory, including its peripheries. A full week dedicated to functional programming: 1 conference, 1 symposium, 10 workshops, tutorials, programming contest results, student research competition, and mentoring workshop * Overview and affiliated events: http://conf.researchr.org/home/icfp-2016 * Program: http://conf.researchr.org/program/icfp-2016/program-icfp-2016 * Accepted Papers:
Categories: Incoming News

ANN: blockhash-0.1.0.0

General haskell list - Tue, 07/19/2016 - 5:07am
Hi all! I'm pleased to announce the first release of blockhash, a perceptual image hash calculation tool based on algorithm described in Block Mean Value Based Image Perceptual Hashing by Bian Yang, Fan Gu and Xiamu Niu. https://hackage.haskell.org/package/blockhash https://github.com/kseo/blockhash Program: Usage: blockhash [-q|--quick] [-b|--bits ARG] filenames blockhash Available options: -h,--help Show this help text -q,--quick Use quick hashing method -b,--bits ARG Create hash of size N^2 bits. Library: import qualified Codec.Picture as P import Data.Blockhash import qualified Data.Vector.Generic as VG import qualified Data.Vector.Unboxed as V printHash :: FilePath -> IO () printHash :: filename = do res <- P.readImage filename case res of Left err -> putStrLn ("Fail to read: " ++ filename) Right dynamicImage -> do let rgbaImage = P.convertRGBA8 dynamicImage pixels = VG.convert (P.imageData rgbaImage) image =
Categories: Incoming News

Linking to a DLL with relative path on Windows usingstack build

haskell-cafe - Mon, 07/18/2016 - 4:06pm
Hello all, I am writing a Haskell program that controls a scientific instrument (a very sensitive camera). The instrument vendor makes a Windows DLL available that exposes a C interface. I have already set up the FFI bindings. I am building the application using Stack on Windows 8. But I am not sure how I can get “stack build” to find the DLL at link time. My Google searches have not cleared things up. My questions: 1. What global directory should I place the DLL in so “stack build” will pick it up? I tried placing it in C:\Windows\SysWOW64 but that doesn’t work. I realize I could add an "extra-lib-dirs” argument in the .cabal file but I would like to know what the default linker search paths are. But in fact I prefer to not install the DLL in a hardcoded, global location. Since the instrument is attached to a specific measurement computer, there is no point in having it installed on the developer PCs. I would prefer to have it all self-contained into a single project. In my C++ development
Categories: Offsite Discussion

Announcing MuniHac 2016

General haskell list - Mon, 07/18/2016 - 3:45pm
Hi fellow Haskellers! Together with Alexander Lehmann from TNG Technology Consulting GmbH and Andres Löh from Well-Typed LLP, I am organizing a new Haskell Hackathon that will take place in Munich, from Friday September 2 - Sunday September 4. TNG is graciously offering to host the Hackathon at their premises. This Hackathon is in the tradition of other Haskell Hackathons such as ZuriHac, HacBerlin, UHac and others. We have capacity for 80-100 Haskellers to collaborate on any project they like. Hacking on Haskell projects will be the main focus of the event, but we will also have a couple of talks by renowned Haskellers. More details and a link to the registration platform can be found on www.munihac.de Hope to see you in Munich! Best regards, Michael
Categories: Incoming News

Announcing MuniHac 2016

haskell-cafe - Mon, 07/18/2016 - 3:39pm
Hi fellow Haskellers! Together with Alexander Lehmann from TNG Technology Consulting GmbH and Andres Löh from Well-Typed LLP, I am organizing a new Haskell Hackathon that will take place in Munich, from Friday September 2 - Sunday September 4. TNG is graciously offering to host the Hackathon at their premises. This Hackathon is in the tradition of other Haskell Hackathons such as ZuriHac, HacBerlin, UHac and others. We have capacity for 80-100 Haskellers to collaborate on any project they like. Hacking on Haskell projects will be the main focus of the event, but we will also have a couple of talks by renowned Haskellers. More details and a link to the registration platform can be found on www.munihac.de Hope to see you in Munich! Best regards, Michael
Categories: Offsite Discussion

parsec get line number of lexems

haskell-cafe - Sun, 07/17/2016 - 5:50pm
hello, I am experimenting with parsec. I am building a very simple language. I have a (almost) wholy funcrionning language : syntactic check, AST building and byte code génération. Now i want to improve error checking (type checking more precisely). this should be done on the AST basis. but in the ast i lose the line number information for precise error message. so my question is : is ther a way to get the line numbers at parsers level ? i would then store it in the ast for semantic check purpose thanks for your answers Olivier_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
Categories: Offsite Discussion

OCL 2016: ** Deadline Extension ** Submit Your Paper Until July 24, 2016

General haskell list - Sun, 07/17/2016 - 10:13am
(Apologies for duplicates) If you are working on the foundations, methods, or tools for OCL or textual modelling, you should now finalise your submission for the OCL workshop! *** The submission deadline has been extended to July 24th, 2016! *** CALL FOR PAPERS 16th International Workshop on OCL and Textual Modeling Co-located with ACM/IEEE 19th International Conference on Model Driven Engineering Languages and Systems (MODELS 2016) October 2, 2016, Saint-Malo, France http://oclworkshop.github.io Modeling started out with UML and its precursors as a graphical notation. Such visual representations enable direct intuitive capturing of reality, but some of their features are difficult to formalize and lack the level of precision required to create complete and unambiguous specifications. Limitations of the graphical notations encouraged the development of text-based modeling languages that either integrate with or replace graphical notations
Categories: Incoming News

OCL 2016: ** Deadline Extension ** Submit Your Paper Until July 24, 2016

haskell-cafe - Sun, 07/17/2016 - 10:13am
(Apologies for duplicates) If you are working on the foundations, methods, or tools for OCL or textual modelling, you should now finalise your submission for the OCL workshop! *** The submission deadline has been extended to July 24th, 2016! *** CALL FOR PAPERS 16th International Workshop on OCL and Textual Modeling Co-located with ACM/IEEE 19th International Conference on Model Driven Engineering Languages and Systems (MODELS 2016) October 2, 2016, Saint-Malo, France http://oclworkshop.github.io Modeling started out with UML and its precursors as a graphical notation. Such visual representations enable direct intuitive capturing of reality, but some of their features are difficult to formalize and lack the level of precision required to create complete and unambiguous specifications. Limitations of the graphical notations encouraged the development of text-based modeling languages that either integrate with or replace graphical notations
Categories: Offsite Discussion

Passing a cabal flag to stack

haskell-cafe - Sat, 07/16/2016 - 4:22am
I’ve been trying to compile hoodle following the instructions in the readme: https://github.com/wavewave/hoodle Went further than year or two earlier when attempt got mired in cabal-hell This time stack build went through (after a couple of deb packages needing installation) Now I get this error on trying to run GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported Asking on the hoodle mailing list I was told that one has to build poppler with option -fgtk3 Where/How to give that? Looking at https://github.com/commercialhaskell/stack/issues/191 I tried the following: 1. Delete every file/directory under .stack-work that has the word poppler 2. stack build poppler --flag gtk:gtk3 3. stack build Seems to have built Ok I get the same warning that stack seems to be generally giving — dozens of them — viz ============ No packages found in snapshot which provide a "gtk2hsC2hs" executable, which is a build-tool dependency of "glib" Missing build-tools may be caused
Categories: Offsite Discussion

Call For Participation: WADT 2016

General haskell list - Fri, 07/15/2016 - 1:58pm
Registration for WADT 2016 is now open. Early registration ends on: Monday, July 18, 2016. Note that we can offer a number of reduced rate places for students / young researchers to attend WADT'16, who are not registered as an author for a paper. These places are limited to early registration. Link: http://cs.swan.ac.uk/wadt16/ When Sep 21, 2016 - Sep 24, 2016 Where Gregynog, UK Submission Deadline June 17, 2016 (extended) Notification July 3, 2016 (extended) Final Version Due July 15, 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 informatio
Categories: Incoming News

another instance of MonadError

haskell-cafe - Thu, 07/14/2016 - 11:19pm
Hello, IO is an instance of MonadError IOException... However I also need to make it an instance of MonadError String... Is it possible? I'm trying to instanciate this class: class (Typeable n, Monad n, Applicative n, MonadError String n) => EvMgt n where ... instance EvMgt IO where... Any idea? _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
Categories: Offsite Discussion

14th ACM MobiWac 2016, MALTA

General haskell list - Thu, 07/14/2016 - 4:11pm
** We apologize if you receive multiple copies of this message ** ================================================================== The 14th ACM International Symposium on Mobility Management and Wireless Access (MobiWac 2016) November 13 - 17, 2016 - Malta http://mobiwac-symposium.org/ ================================================================== The MOBIWAC series of event is intended to provide an international forum for the discussion and presentation of original ideas, recent results and achievements by researchers, students, and systems developers on issues and challenges related to mobility management and wireless access protocols. To keep up with the technological developments, we also open up new areas such as mobile cloud computing starting from this year. Authors are encouraged to submit both theoretical and practical results of significance on all aspects of wire
Categories: Incoming News

efficient operations on immutable structures

haskell-cafe - Thu, 07/14/2016 - 7:07am
Hi again all. From some online research, I understand that operations on complex immutable structures (for example, a "setter" function a -> (Int, Int) -> Matrix -> Matrix which alters one element in the Matrix) is not necessarily inefficient in Haskell, because the (compiler? runtime?) has some means of sharing unchanged values between the input and output structure. What I am not clear on, however, is how this works, and how you ensure that this happens. Could someone perhaps elaborate, or point me to a really good read on the subject?
Categories: Offsite Discussion

Proposal: Add `restriction` to Data.Map and Data.IntMap

libraries list - Thu, 07/14/2016 - 5:45am
Cale Gibbard proposes the following: Data.IntMap.restriction :: IntSet -> IntMap a -> IntMap a Data.Map.restriction :: Ord k => Set k -> Map k a -> Map k a In each case, the map is filtered to contain only the keys that are also found in the set. This can be implemented efficiently using a slightly stripped-down version of Data.Map.intersection. David Feuer _______________________________________________ Libraries mailing list Libraries< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Categories: Offsite Discussion