Re: type error formatting

2015-10-24 Thread Roman Cheplyaka
I have the same issue with the current error messages. I think these are all good ideas. On 10/24/2015 05:48 AM, Evan Laforge wrote: > Here's a typical simple type error from GHC: > > Derive/Call/India/Pakhawaj.hs:142:62: > Couldn't match type ‘Text’ with ‘(a1, Syllable)’ > Expected

Re: [Haskell-cafe] Functional dependencies conflict

2015-04-05 Thread Roman Cheplyaka
On 05/04/15 15:54, Daniel Trstenjak wrote: On Sun, Apr 05, 2015 at 03:25:01PM +0300, Roman Cheplyaka wrote: Data.ByteString.Lazy.Char8 exports the same lazy bytestring type as Data.ByteString.Lazy. Only functions and instances differ. So my only option in this case is to define a newtype

Re: [Haskell-cafe] Functional dependencies conflict

2015-04-05 Thread Roman Cheplyaka
To be precise, the sets of instances differ. Eg. the Char8 module exports the IsString instance, which normal Data.ByteString.Lazy doesn't. On 05/04/15 15:25, Ivan Lazar Miljenovic wrote: On 5 April 2015 at 22:25, Roman Cheplyaka r...@ro-che.info wrote: Data.ByteString.Lazy.Char8 exports

Re: [Haskell-cafe] Functional dependencies conflict

2015-04-05 Thread Roman Cheplyaka
Data.ByteString.Lazy.Char8 exports the same lazy bytestring type as Data.ByteString.Lazy. Only functions and instances differ. On 05/04/15 15:19, Daniel Trstenjak wrote: Hi, I'm getting the compile error: Gamgine/Image/PNG/Internal/Parser.hs:14:10: Functional dependencies conflict

Re: Binary bloat in 7.10

2015-04-01 Thread Roman Cheplyaka
On 01/04/15 12:30, Jeremy wrote: Why do the 7.10 libraries take up so much more space than 7.8? For example, using the same build options and strip --strip-unneeded, 7.8 leaves me with 15M libHSCabal-1.18.1.5.a 17M HSCabal-1.18.1.5.o whereas 7.10 balloons to 23M

Re: Proposal: Turn on ScopedTypeVariables by default

2015-02-24 Thread Roman Cheplyaka
On 24/02/15 14:46, Herbert Valerio Riedel wrote: On 2015-02-23 at 18:45:20 +0100, David Feuer wrote: I know this will be controversial, because it can break (weird) code and because it's not Haskell 2010, but hey, you can't make brain salad without breaking a few heads. Are you suggesting

Re: Fwd: UNPACK Existential datatype

2015-01-23 Thread Roman Cheplyaka
was wrong. Thanks to Alan Zimmerman for pointing this out So it will fix is in 7.10. And I can't reproduce this anymore on ghc-HEAD. On 20 January 2015 at 17:35, Roman Cheplyaka r...@ro-che.info mailto:r...@ro-che.info wrote

Re: Fwd: UNPACK Existential datatype

2015-01-23 Thread Roman Cheplyaka
2015 at 17:35, Roman Cheplyaka r...@ro-che.info wrote: Interesting question. I managed to trace this to: compiler/basicTypes/MkId.hs:699 isUnpackableType fam_envs ty | Just (tc, _) - splitTyConApp_maybe ty , Just con - tyConSingleAlgDataCon_maybe tc , isVanillaDataCon con

Re: Fwd: UNPACK Existential datatype

2015-01-20 Thread Roman Cheplyaka
Interesting question. I managed to trace this to: compiler/basicTypes/MkId.hs:699 isUnpackableType fam_envs ty | Just (tc, _) - splitTyConApp_maybe ty , Just con - tyConSingleAlgDataCon_maybe tc , isVanillaDataCon con = ok_con_args (unitNameSet (getName tc)) con | otherwise = False

Re: Discovery of source dependencies without --make

2014-11-27 Thread Roman Cheplyaka
On 25/11/14 12:29, Joachim Breitner wrote: Dear Lars, Am Dienstag, den 25.11.2014, 10:36 +0100 schrieb Lars Hupel: The invocation is similar to this: ghc -c -outputdir $OUT -XTrustworthy Library.hs ghc -c -outputdir $OUT -i$OUT -XSafe $SUBMISSION ghc -c -outputdir $OUT -i$OUT

Re: RFC: changes to -i flag for finding source files

2014-04-28 Thread Roman Cheplyaka
* Simon Marlow marlo...@gmail.com [2014-04-28 09:26:23+0100] On 25/04/2014 17:57, Roman Cheplyaka wrote: * Edward Kmett ekm...@gmail.com [2014-04-25 11:22:46-0400] +1 from me. I have a lot of projects that suffer with 4 levels of vacuous subdirectories just for this. In theory cabal could

Re: RFC: changes to -i flag for finding source files

2014-04-25 Thread Roman Cheplyaka
* Felipe Lessa felipe.le...@gmail.com [2014-04-25 13:01:43-0300] Em 25-04-2014 12:22, Edward Kmett escreveu: +1 from me. I have a lot of projects that suffer with 4 levels of vacuous subdirectories just for this. In theory cabal could support this on older GHC versions by copying all of

Re: RFC: changes to -i flag for finding source files

2014-04-25 Thread Roman Cheplyaka
* Edward Kmett ekm...@gmail.com [2014-04-25 11:22:46-0400] +1 from me. I have a lot of projects that suffer with 4 levels of vacuous subdirectories just for this. In theory cabal could support this on older GHC versions by copying all of the files to a working dir in dist with the expected

Re: HSghc-prim-0.3.1.0.o: unknown symbol 'memcpy'

2014-04-19 Thread Roman Cheplyaka
* M Farkas-Dyck strake...@gmail.com [2014-04-19 12:18:31-0500] I just built stock ghc 7.8.1 against musl on Linux x86_64. I get this: $ ghci GHCi, version 7.8.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... ghc:

Re: HSghc-prim-0.3.1.0.o: unknown symbol 'memcpy'

2014-04-19 Thread Roman Cheplyaka
* M Farkas-Dyck strake...@gmail.com [2014-04-19 12:55:23-0500] On 19/04/2014, Roman Cheplyaka r...@ro-che.info wrote: Don't know if it helps, but I think ghci loads the dynamic library, not the static one. I straced both the broken ghci on aforesaid system and a working ghci on a glibc

Re: Proposal - Foreign enum support

2014-04-17 Thread Roman Cheplyaka
I am reluctant about adding a new syntactic feature for such a niche problem. Can't this be achieved with a quaiquoter? Roman signature.asc Description: Digital signature ___ Haskell-prime mailing list Haskell-prime@haskell.org

Re: [Solaris bindist] Re: ANNOUNCE: GHC 7.8.1 Release Candidate 1

2014-02-05 Thread Roman Cheplyaka
* Christian Maeder christian.mae...@dfki.de [2014-02-05 16:28:50+0100] This happens, because our /bin/sh is a real sh (and not a bash) that only allows to export LD_LIBRARY_PATH as a separate command. You mean it's a real sh and not a POSIX-compatible one.

Re: [Solaris bindist] Re: ANNOUNCE: GHC 7.8.1 Release Candidate 1

2014-02-05 Thread Roman Cheplyaka
* Brandon Allbery allber...@gmail.com [2014-02-05 11:06:04-0500] On Wed, Feb 5, 2014 at 11:02 AM, Christian Maeder christian.mae...@dfki.dewrote: Am 05.02.2014 16:45, schrieb Roman Cheplyaka: * Christian Maeder christian.mae...@dfki.de [2014-02-05 16:28:50+0100] This happens, because

Re: RFC: include a cabal-install executable in future GHC releases

2014-01-22 Thread Roman Cheplyaka
* Herbert Valerio Riedel h...@gnu.org [2014-01-22 12:55:53+0100] On 2014-01-22 at 10:08:02 +0100, Henning Thielemann wrote: Am 22.01.2014 09:57, schrieb Herbert Valerio Riedel: On 2014-01-21 at 20:22:48 +0100, Ganesh Sittampalam wrote: I feel this blurs the roles of GHC and the Platform.

Re: RFC: include a cabal-install executable in future GHC releases

2014-01-19 Thread Roman Cheplyaka
Agreed, this would improve usability of binary GHC releases a lot, and I don't see any downsides. +1 Roman * Carter Schonwald carter.schonw...@gmail.com [2014-01-19 19:02:27-0500] Hey everyone, I'd like to propose that GHC releases 7.8.1 onwards include a cabal-install (aka cabal)

Re: GADT records revisited

2014-01-16 Thread Roman Cheplyaka
I think this is intentional and conforms to the documentation. Your constructors clearly have *different* result types, even though they both can be instantiated from a single type scheme `FooBar x a`. I'll leave it to others to comment on whether the generalization you propose is reasonable and

Re: GHC error message on type mismatch

2013-11-07 Thread Roman Cheplyaka
* Daniel Trstenjak daniel.trsten...@gmail.com [2013-11-08 05:54:49+0100] Perhaps: Couldn't match type `A' with `B´ Real type: B Given type: A Or instead of 'Given', like others have suggested: 'Provided' or 'Supplied'. So far in this thread I haven't seen any suggestions

Re: [Haskell] repa not running in parallel?

2013-11-07 Thread Roman Cheplyaka
Try adding +RTS -N at the end of your ./Main command line. * Alexander Herz alexander.h...@mytum.de [2013-11-07 10:40:59+0100] Hi, I'm new to haskell and I tried to reproduce the perfomance values from the paper Regular, Shape-polymorphic, Parallel Arrays in Haskell. I modified the

Re: love for hpc?

2013-11-06 Thread Roman Cheplyaka
So Evan's prediction was accurate ;-) * Carter Schonwald carter.schonw...@gmail.com [2013-11-07 00:29:24-0500] Evan, if you want to get involved in working on HPC, go for it! theres many many pieces of ghc that need more proactive ownership. i should probably use HPC a bit as i start

Re: [Haskell-cafe] ordNub

2013-10-12 Thread Roman Cheplyaka
* Anthony Cowley acow...@seas.upenn.edu [2013-10-12 15:43:57-0400] On Oct 12, 2013, at 2:47 PM, Niklas Hambüchen m...@nh2.me wrote: I would like to come back to the original question: How can ordNub be added to base? I guess we agree that Data.List is the right module for a

Re: cabal upload -- error 404

2013-10-09 Thread Roman Cheplyaka
If you really want to upload the package, then do cabal upload dist/PrimitiveArray-0.5.2.0.tar.gz (without -c). I'd guess that the new hackage server doesn't yet support the API required for -c. You can report this at https://github.com/haskell/cabal/issues although it will /probably/ end

Re: [Haskell-cafe] Using lenses

2013-10-03 Thread Roman Cheplyaka
Hi Simon, An interesting use case is my time-lens library. http://hackage.haskell.org/package/time-lens-0.3/docs/Data-Time-Lens.html You can do things like modL minutes (+5) (TimeOfDay 16 57 13) 17:02:13 But one has to be somewhat lenient about the lens laws here. Roman * Simon

Re: [Haskell-cafe] [ANN] lvish 1.0 -- successor to monad-par

2013-10-03 Thread Roman Cheplyaka
Ryan, You can use standalone-haddock[1] so that the links to other packages are not broken. [1]: http://documentup.com/feuerbach/standalone-haddock Roman * Ryan Newton rrnew...@gmail.com [2013-10-03 10:50:47-0400] Hi Ben, We made a small update

Re: [Haskell-cafe] indentation with let and do

2013-10-03 Thread Roman Cheplyaka
On Thu, Oct 3, 2013 at 9:44 PM, Brandon Allbery allber...@gmail.com wrote: On Thu, Oct 3, 2013 at 2:31 PM, Corentin Dupont corentin.dup...@gmail.com wrote: test :: Bool - IO () test foo = do let bar = case foo of True - Foo; False - Bar return () while this one

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Roman Cheplyaka
* Heinrich Apfelmus apfel...@quantentunnel.de [2013-10-02 11:24:39+0200] In other words, equality of abstract data types is different from equality of algebraic data types (constructors). I don't think you'll ever be able to avoid this proof obligation that the public API of an abstract data

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Roman Cheplyaka
* Tillmann Rendel ren...@informatik.uni-marburg.de [2013-10-02 13:19:38+0200] Hi, Roman Cheplyaka wrote: It still seems to fit nicely into Safe Haskell. If you are the implementor of an abstract type, you can do whatever you want in the Eq instance, declare your module as Trustworthy

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Roman Cheplyaka
* Stijn van Drongelen rhym...@gmail.com [2013-10-02 15:46:42+0200] I do think something has to be done to have an Eq and Ord with more strict laws. * Operators in Eq and Ord diverge iff any of their parameters are bottom. This outlaws the Eq instances of lists, trees, and other (co)recursive

Re: [Haskell-cafe] Lifting IO actions into Applicatives

2013-10-01 Thread Roman Cheplyaka
* Tom Ellis tom-lists-haskell-cafe-2...@jaguarpaw.co.uk [2013-10-01 09:20:23+0100] On Tue, Oct 01, 2013 at 09:29:00AM +0200, Niklas Haas wrote: On Tue, 1 Oct 2013 02:21:13 -0500, John Lato jwl...@gmail.com wrote: It's not a solution per se, but it seems to me that there's no need for

[Haskell-cafe] Haskell.org design is broken

2013-10-01 Thread Roman Cheplyaka
There is now a big white stripe in the Haskell.org's header (see the screenshot). Roman attachment: haskellorg.png signature.asc Description: Digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Multi-param typeclass vs locally constrained typeclass methods

2013-09-18 Thread Roman Cheplyaka
* Jacques Carette care...@mcmaster.ca [2013-09-18 08:21:51-0400] Could someone please explain what the difference (if any!), in semantics is between class Foo f = Bar f g where method1 :: f a - g a and class Bar' g where method2 :: Foo f = f a - g a Bar is more flexible than

[Haskell-cafe] name lists

2013-09-17 Thread Roman Cheplyaka
* Ben Gamari bgamari.f...@gmail.com [2013-09-17 10:03:41-0400] Another approach might be to introduce some notion of a name list which can appear in the export list. These lists could be built up by either user declarations in the source module or in Template Haskell splices and would serve as

Re: [Haskell-cafe] name lists

2013-09-17 Thread Roman Cheplyaka
* Ben Gamari bgamari.f...@gmail.com [2013-09-17 12:41:05-0400] Roman Cheplyaka r...@ro-che.info writes: * Ben Gamari bgamari.f...@gmail.com [2013-09-17 10:03:41-0400] Another approach might be to introduce some notion of a name list which can appear in the export list. These lists could

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-10 Thread Roman Cheplyaka
* John Wiegley jo...@fpcomplete.com [2013-09-10 04:48:36-0500] Niklas Hambüchen m...@nh2.me writes: Code written in cucumber syntax is concise and easy to read concise |kənˈsīs|, adj. giving a lot of information clearly and in a few words; brief but comprehensive.

Re: [Haskell-cafe] GHC API + Cabal API + Cabal version checks: is there a way out?

2013-09-06 Thread Roman Cheplyaka
The right solution for Cabal would be not to know anything about the GHC's database format at all. GHC and cabal communicate via a command line interface (`ghc-pkg dump` in our direction; `ghc-pkg update` in the other). So it would suffice to have a library which implements parsing and printing

Re: [Haskell-cafe] a little parsec enhancement

2013-09-05 Thread Roman Cheplyaka
* Petr Pudlák petr@gmail.com [2013-09-05 11:18:25+0200] Unfortunately |ParsecT| constructor isn't exported so I'm not able to implement it outside /parsec/. No, but there's an 'mkPT' function which is equivalent to the ParsecT constructor. (Although I, too, wish the ParsecT constructor

Re: [Haskell-cafe] function arithmetic?

2013-09-01 Thread Roman Cheplyaka
* Christopher Howard christopher.how...@frigidcode.com [2013-08-31 21:01:38-0800] Hi. I was just curious about something. In one of my math textbooks I see expressions like this f + g or (f + g)(a) where f and g are functions. What is meant is f(a) + g(a) Is there a way in

Re: [Haskell-cafe] Tasty not compiling

2013-08-30 Thread Roman Cheplyaka
* Thiago Negri evoh...@gmail.com [2013-08-29 22:27:47-0300] I can't install tasty with cabal. Anyone with the same issue or a fix? $ cabal install tasty ... Test\Tasty\Core.hs:147:11: Not in scope: `witness' You probably have a too old version of 'tagged'. I'll add the lower version bound

Re: [Haskell-cafe] A question about laziness and performance in document serialization.

2013-08-22 Thread Roman Cheplyaka
* Kyle Hanson hanoo...@gmail.com [2013-08-20 18:23:48-0700] So I am not entirely clear on how to optimize for performance for lazy bytestrings. Currently I have a (Lazy) Map that contains large BSON values (more than 1mb when serialized each). I can serialize BSON documents to Lazy

Re: [Haskell-cafe] ANN: hspec-test-framework - Run test-framework tests with Hspec

2013-08-20 Thread Roman Cheplyaka
My answer to this and many similar questions regarding tasty is: - I am probably not going to work on this - but I would be happy to see someone doing it Note that hspec-test-framework is a separate package, and it didn't have to be written or even approved by Simon. Same here — please write

Re: [Haskell-cafe] Haddock multiple definitions

2013-08-16 Thread Roman Cheplyaka
* Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk [2013-08-16 08:16:35+0100] In the future, please try with more recent version of GHC. This is no longer a parse error with HEAD or 7.6.3. Uhm, actually there is, with 7.6.3. % cat haddock.hs -- Main -- | Blah blah blah (x, y, z) = (1,

Re: [Haskell-cafe] Haddock multiple definitions

2013-08-15 Thread Roman Cheplyaka
In any case, it shouldn't fail with a parse error, since this is valid Haskell. Please file a ticket at http://trac.haskell.org/haddock (but first see if it hasn't been reported before). Roman * jabolo...@google.com jabolo...@google.com [2013-08-15 15:24:23-0400] Hi, I am using GHC:

Re: Log exceptions to eventlog

2013-08-13 Thread Roman Cheplyaka
doesn't seem to be an option here (unless it is also used by the RTS?). [1]: https://github.com/feuerbach/tasty/issues/15 Roman * Simon Marlow marlo...@gmail.com [2013-08-13 15:53:46+0100] On 12/08/13 10:20, Roman Cheplyaka wrote: Hi, Is there any way to log asynchronous exceptions

Log exceptions to eventlog

2013-08-12 Thread Roman Cheplyaka
Hi, Is there any way to log asynchronous exceptions to the eventlog, including information on which thread sent the exception and to which thread it was sent? Or are there any other ways to get this information? Roman signature.asc Description: Digital signature

Re: [Haskell-cafe] Module names from a function name

2013-08-08 Thread Roman Cheplyaka
Hi, You can easily do this using the haskell-names library. See http://documentup.com/haskell-suite/haskell-names Roman * Jong-won Choi oz.jongwon.c...@gmail.com [2013-08-08 12:34:44+1000] Hi, I asked this question to beginner mailing list and no luck so far, so I'm trying here. How can

Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

2013-08-08 Thread Roman Cheplyaka
* Magnus Therning mag...@therning.org [2013-08-08 07:59:37+0200] On Mon, Aug 05, 2013 at 09:48:39PM +0300, Roman Cheplyaka wrote: I am pleased to announce the first release of tasty, a new testing framework for Haskell. It is meant to be a successor to test-framework (which is unmaintained

Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Roman Cheplyaka
* Eduardo Sato eduardo.s...@gmail.com [2013-08-07 14:46:02-0300] Hello, guys. Has anybody tried to install wxhaskell on Snow Leopard? I followed these instructions: http://www.haskell.org/haskellwiki/WxHaskell/Mac , but got an error:

Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

2013-08-07 Thread Roman Cheplyaka
, passed 100 tests (29% Short) Can tasty display this classification info? That was a thing I missed a lot in test-framework and would probably motivate me to switch to tasty. Janek - Oryginalna wiadomość - Od: Roman Cheplyaka r...@ro-che.info Do: haskell-cafe@haskell.org

Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

2013-08-06 Thread Roman Cheplyaka
to see an example .cabal file along with your example test cases. thanks, -tikhon On Tue, Aug 6, 2013 at 1:53 AM, Roman Cheplyaka r...@ro-che.info wrote: * Carter Schonwald carter.schonw...@gmail.com [2013-08-05 16:58:37-0400] fair enough. I take it that you're also (implicitly

Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

2013-08-06 Thread Roman Cheplyaka
* John Wiegley jo...@fpcomplete.com [2013-08-06 13:40:50-0500] Roman Cheplyaka r...@ro-che.info writes: I am pleased to announce the first release of tasty, a new testing framework for Haskell. It is meant to be a successor to test-framework (which is unmaintained). It would be nice

[Haskell-cafe] ANNOUNCE: tasty, a new testing framework

2013-08-05 Thread Roman Cheplyaka
I am pleased to announce the first release of tasty, a new testing framework for Haskell. It is meant to be a successor to test-framework (which is unmaintained). Tasty supports HUnit, SmallCheck, QuickCheck, and golden tests out of the box (through the standard packages), but it is very

Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

2013-08-05 Thread Roman Cheplyaka
* Andrey Chudnov achud...@gmail.com [2013-08-05 15:31:16-0400] On 08/05/2013 02:48 PM, Roman Cheplyaka wrote: (which is unmaintained). Has this been confirmed by the author/maintainer? I've sent a couple of emails to Max (one in January, one in April) and haven't heard anything from him. My

Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

2013-08-05 Thread Roman Cheplyaka
* Carter Schonwald carter.schonw...@gmail.com [2013-08-05 16:58:37-0400] fair enough. I take it that you're also (implicitly) committing to maintaining this for the next few years? :) That's correct. Roman ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Why GHC is written in Happy and not a monadic parser library?

2013-08-04 Thread Roman Cheplyaka
* Malcolm Wallace malcolm.wall...@me.com [2013-08-04 09:33:22+0100] On 3 Aug 2013, at 21:03, Jason Dagit wrote: Another con of using parsec that I forgot to mention in my previous email is that with Parsec you need to be explicit about backtracking (use of try). Reasoning about the

Re: [Haskell-cafe] Rank N Kinds

2013-07-31 Thread Roman Cheplyaka
That's because types that belong to most non-star kinds cannot have values. data Foo (a :: k) = Foo is okay, data Foo (a :: k) = Foo a is bad because there cannot be a field of type a :: k. So no, no useful examples exist, because you wouldn't be able to use such a data constructor even

Re: [Haskell-cafe] Haddock GSOC project progress

2013-07-30 Thread Roman Cheplyaka
Hi Mateusz, This looks great — I'm especially excited about List entries no longer have to be separated by empty lines! However, the decision to use Attoparsec (instead of Parsec, say) strikes me as a bit odd, as it wasn't intended for parsing source code. In particular, I'm concerned with error

Re: [Haskell-cafe] Is withAsync absolutely safe?

2013-07-29 Thread Roman Cheplyaka
* Bertram Felgenhauer bertram.felgenha...@googlemail.com [2013-07-28 18:11:54+0200] Roman Cheplyaka wrote: Can withAsync guarantee that its child will be terminated if the thread executing withAsync gets an exception? To remind, here's an implementation of withAsync

throwTo semantics

2013-07-28 Thread Roman Cheplyaka
The documentation for throwTo says: throwTo does not return until the exception has been raised in the target thread. The calling thread can thus be certain that the target thread has received the exception. This is a useful property to know when dealing with race conditions: eg. if there

Re: throwTo semantics

2013-07-28 Thread Roman Cheplyaka
* Bertram Felgenhauer bertram.felgenha...@googlemail.com [2013-07-28 17:57:04+0200] Roman Cheplyaka wrote: The documentation for throwTo says: throwTo does not return until the exception has been raised in the target thread. The calling thread can thus be certain that the target

[Haskell-cafe] Is withAsync absolutely safe?

2013-07-28 Thread Roman Cheplyaka
Can withAsync guarantee that its child will be terminated if the thread executing withAsync gets an exception? To remind, here's an implementation of withAsync: withAsyncUsing :: (IO () - IO ThreadId) - IO a - (Async a - IO b) - IO b -- The bracket version works, but is

Re: [Haskell-cafe] Parsec question

2013-07-24 Thread Roman Cheplyaka
Think about this: if you always take only the first element, why do you need lists at all? Roman * C K Kashyap ckkash...@gmail.com [2013-07-24 19:56:29+0530] Dear Cafe, I am trying to implement[1] parsec in go using the Monadic Parser Combinators paper [2] . I've been able to implement plus

Re: [Haskell-cafe] Parsec question

2013-07-24 Thread Roman Cheplyaka
the complete match. regards, Kashyap Sent from my Windows Phone From: Roman Cheplyaka Sent: 24/07/2013 8:19 PM To: C K Kashyap Cc: Haskell Cafe Subject: Re: [Haskell-cafe] Parsec question Think about this: if you always take only the first element, why do you need lists at all? Roman

Re: [Haskell-cafe] Deriving with generics without values

2013-07-14 Thread Roman Cheplyaka
Forgot to mention — a good explanation of GHC Generics is the paper A Generic Deriving Mechanism for Haskell. Roman * Roman Cheplyaka r...@ro-che.info [2013-07-14 18:21:58+0300] Hi, (Redirecting this back to cafe to keep it discoverable — hope you don't mind.) * JP Moresmau jpmores

Re: [Haskell-cafe] ordNub

2013-07-14 Thread Roman Cheplyaka
Something like that should definitely be included in Data.List. Thanks for working on it. Roman * Niklas Hambüchen m...@nh2.me [2013-07-14 19:20:52+0800] tldr: nub is abnormally slow, we shouldn't use it, but we do. As you might know, Data.List.nub is O(n²). (*) As you might not know,

Re: [Haskell-cafe] Deriving with generics without values

2013-07-14 Thread Roman Cheplyaka
On Fri, Jul 12, 2013 at 10:57 AM, Roman Cheplyaka r...@ro-che.info wrote: Well, in your case, you need not 'from', but 'to', in order to convert from a generic representation to yours. Take a look at how a similar task is done in SmallCheck: https://github.com/feuerbach/smallcheck

Re: [Haskell-cafe] Quick-check: how to generate arbitrary complex data?

2013-07-13 Thread Roman Cheplyaka
* martin martin.drautzb...@web.de [2013-07-13 10:10:39+0200] Am 07/12/2013 09:18 AM, schrieb Roman Cheplyaka: QuickCheck's Gen is a functor. So you can generate a list, and then use fmap to add a hash to it. instance Arbitrary HashedList where arbitrary = addHashToList

Re: [Haskell-cafe] getting haddock to cooperate with cpp

2013-07-13 Thread Roman Cheplyaka
This is not true either. Cabal preprocesses files that explicitly indicate (via an extension) that they need to be preprocessed. For example, a .cpphs file will be preprocessed to yield an .hs file. .hs files are never preprocessed by Cabal, as far as I can tell. If you have an .hs file with

Re: [Haskell-cafe] build failure on Hackage

2013-07-13 Thread Roman Cheplyaka
* Brian Lewis br...@lorf.org [2013-07-13 14:30:01-0500] I maintain a library that, on Linux, needs libXxf86vm to build. The server where Hackage runs doesn't have that library, so the build fails. I think this is reasonable -- that box can't possibly have all the libraries various packages

Re: [Haskell-cafe] build failure on Hackage

2013-07-13 Thread Roman Cheplyaka
* Brian Lewis br...@lorf.org [2013-07-13 15:44:58-0500] On 2013.07.13, at 23:15, Roman Cheplyaka wrote: 1. Why exactly does haddock fail? I think it never actually tries to build the Haddock docs for the actual package of interest because its dependencies failed to build. Here's the GLFW

Re: [Haskell-cafe] Quick-check: how to generate arbitrary complex data?

2013-07-12 Thread Roman Cheplyaka
* martin martin.drautzb...@web.de [2013-07-12 08:33:54+0200] Hello all, I have a type (Mail) which consists of hash and a list, where the hash keeps some redundant data of the list for faster access. I can add and remove elements to values of this type using custom functions, called push

Re: [Haskell-cafe] Deriving with generics without values

2013-07-12 Thread Roman Cheplyaka
Well, in your case, you need not 'from', but 'to', in order to convert from a generic representation to yours. Take a look at how a similar task is done in SmallCheck: https://github.com/feuerbach/smallcheck/blob/master/Test/SmallCheck/Series.hs#L180

Re: [Haskell-cafe] getting haddock to cooperate with cpp

2013-07-12 Thread Roman Cheplyaka
* Evan Laforge qdun...@gmail.com [2013-07-12 14:25:00-0400] So haddock ignores {-# LANGUAGE CPP #-}, which makes it crash on any file that uses it. I'm pretty sure it's not true in general. If you click on the Source link at this haddock page:

Re: [Haskell-cafe] Comparing functions

2013-07-11 Thread Roman Cheplyaka
* Vlatko Basic vlatko.ba...@gmail.com [2013-07-11 19:33:38+0200] Hello Cafe, I have data CmpFunction a = CF (a - a - Bool) that contains comparing functions, like ==, , ..., and I'm trying to declare the Show instance for it like this instance Show (CmpFunction a) where

Re: [Haskell-cafe] Parsec error message not making any sense

2013-07-09 Thread Roman Cheplyaka
:08 AM, Roman Cheplyaka r...@ro-che.info wrote: Hi Fredrik, First, do you use the latest parsec version (3.1.3)? If not, can you try the same with 3.1.3? Second, please upload your code to hpaste.org or a similar service and give us the link. It's not much fun to extract code from

Re: [Haskell-cafe] Understanding version differences

2013-07-09 Thread Roman Cheplyaka
The compiler defaults the kind of 'quality' (i.e. the first argument of QUALITIES) to *, not being able to infer it from the class definition itself (and other definitions that it references). Since you want it to have kind * - *, you should enable KindSignatures and add an annotation, or

Re: [Haskell-cafe] GHC bug? Let with guards loops

2013-07-09 Thread Roman Cheplyaka
As Dan said, this behaviour is correct. The confusing thing here is that in case expressions guards are attached to the patterns (i.e. to the lhs), while in let expressions they are attached to the rhs. So, despite the common Just x | x 0 part, your examples mean rather different things.

Re: [Haskell-cafe] Parsec error message not making any sense

2013-07-08 Thread Roman Cheplyaka
Hi Fredrik, First, do you use the latest parsec version (3.1.3)? If not, can you try the same with 3.1.3? Second, please upload your code to hpaste.org or a similar service and give us the link. It's not much fun to extract code from an html email. Roman * Fredrik Karlsson dargo...@gmail.com

Re: [Haskell-cafe] Catch multiple exceptions using 'Control.Exception'

2013-07-06 Thread Roman Cheplyaka
* Nikita Karetnikov nik...@karetnikov.org [2013-07-06 20:12:58+0400] Here you go: import Control.Exception import Data.Typeable syncExceptions :: SomeException - Maybe SomeException syncExceptions e | Just _ - cast e :: Maybe AsyncException = Nothing | otherwise =

Re: [Haskell-cafe] Catch multiple exceptions using 'Control.Exception'

2013-07-03 Thread Roman Cheplyaka
* Nikita Karetnikov nik...@karetnikov.org [2013-07-03 15:50:16+0400] Perhaps you can use `catches` [0]? Maybe, but my idea is to replace 'syncExceptions' with a similar function. Otherwise, it'll be necessary to change (at least) all functions that use 'syncExceptions'. I'd like to avoid

Re: A possible alternative to dot notation for record access

2013-06-30 Thread Roman Cheplyaka
* Carter Schonwald carter.schonw...@gmail.com [2013-06-30 03:26:22-0400] Otoh, would there be any ambiguity wrt applying functions to blocks? eg f = (+ 1) h= f {let x = 7 in 3*x}, would that trip up the syntax? This is not valid Haskell anyway (there's no such thing as applying functions

Re: Overloaded record fields

2013-06-24 Thread Roman Cheplyaka
* Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk [2013-06-24 10:47:09+0100] Restricting function composition to have spaces around it will require changing a large amount of existing code if one is willing to use it. I assume this semantics will be triggered only by an extension, so there'd be no

Re: [Haskell-cafe] ANNOUNCE: haskell-names-0.1

2013-06-21 Thread Roman Cheplyaka
* Andrew Cowie and...@operationaldynamics.com [2013-06-21 16:12:55+1000] On Thu, 2013-06-20 at 18:13 +0300, Roman Cheplyaka wrote: Namely, it can do the following: * for a module, compute its interface, i.e. the set of entities exported by the module, together with their original

[Haskell-cafe] ANNOUNCE: haskell-names-0.1

2013-06-20 Thread Roman Cheplyaka
I am pleased to announce the first public release of haskell-names, a name resolution library for haskell-src-exts AST. Namely, it can do the following: * for a module, compute its interface, i.e. the set of entities exported by the module, together with their original names. * for each

Re: ConstraintKinds feature suggestion and question about type family peculiarity

2013-06-16 Thread Roman Cheplyaka
* Merijn Verstraaten mer...@inconsistent.nl [2013-06-15 22:05:52+0100] 2) for some reason the type families syntax always requires a full argument list, which I find rather ugly. I would much prefer to use KindSignatures and write type family Restrict :: * - [*] - Constraint, but GHC

Re: [Haskell-cafe] Testing invasive proposals with Hackager

2013-06-14 Thread Roman Cheplyaka
+0200] Roman Cheplyaka has written a tool called HasFix for updating source based on new versions of libraries. The presentation on it is here http://ro-che.info/docs/ and the code is at https://github.com/feuerbach/hasfix Perhaps it could be pressed into use for automatic update

Re: [Haskell-cafe] Haskell Platform 2013.2.0.0 64bit.pkg

2013-06-12 Thread Roman Cheplyaka
* Richard A. O'Keefe o...@cs.otago.ac.nz [2013-06-13 17:37:57+1200] Today I cleared out everything, using uninstall-hs and rm -rf ~/.cabal ~/Library/Haskell I downloaded Haskell Platform 2013.2.0.0 64bit.pkg and installed it. I was unsuccessful in installing the packages I wanted using

Re: Remove Enum from Float and Double

2013-06-11 Thread Roman Cheplyaka
Does such thing as a deprecation pragma for an instance exist? What triggers it? Roman * Johan Tibell johan.tib...@gmail.com [2013-06-11 14:18:41-0700] If we truly believe that the instance is dangerous for users (and not merely for people who don't understand floating point arithmetic on

Re: Remove Enum from Float and Double

2013-06-11 Thread Roman Cheplyaka
* Johan Tibell johan.tib...@gmail.com [2013-06-11 15:03:10-0700] On Tue, Jun 11, 2013 at 3:00 PM, Roman Cheplyaka r...@ro-che.info wrote: Does such thing as a deprecation pragma for an instance exist? What triggers it? I don't know. We'll need one if we're going to deprecating core

Re: [Haskell-cafe] ANNOUNCE: standalone-haddock-1.0

2013-06-08 Thread Roman Cheplyaka
* Johannes Waldmann waldm...@imn.htwk-leipzig.de [2013-06-08 12:45:17+] Roman Cheplyaka roma at ro-che.info writes: http://feuerbach.github.io/standalone-haddock/ yes, awesome! I took me a while to figure out I need to add --package-db $HOME/.ghc/x86_64-linux-7.6.3/package.conf.d

Re: [Haskell-cafe] ANNOUNCE: standalone-haddock-1.0

2013-06-08 Thread Roman Cheplyaka
* Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk [2013-06-08 16:16:54+0100] On 07/06/13 13:15, Roman Cheplyaka wrote: I am happy to announce the first release of standalone-haddock. http://feuerbach.github.io/standalone-haddock/ standalone-haddock generates standalone haddock Haskell

[Haskell-cafe] ANNOUNCE: standalone-haddock-1.1

2013-06-08 Thread Roman Cheplyaka
* Roman Cheplyaka r...@ro-che.info [2013-06-08 19:25:12+0300] There's also a known issue that preprocessing doesn't happen (e.g. for alex and happy files) — I hope to fix that soon. I've just released standalone-haddock-1.1 which fixes the above issue and also adds --hyperlink-source

[Haskell-cafe] ANNOUNCE: standalone-haddock-1.0

2013-06-07 Thread Roman Cheplyaka
I am happy to announce the first release of standalone-haddock. http://feuerbach.github.io/standalone-haddock/ standalone-haddock generates standalone haddock Haskell documentation. When you simply run `cabal haddock`, the resulting HTML documentation contains hyperlinks to other packages on

Re: [Haskell-cafe] Question about Newtype op() function arguments.

2013-06-07 Thread Roman Cheplyaka
* David Banas capn.fre...@gmail.com [2013-06-07 07:08:19-0700] Hi All, Referring to the following, which is taken from the *Control.Newtype *documentation page: op :: Newtypehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/Control-Newtype.html#t:Newtype n o = (o - n) -

Re: [Haskell-cafe] Why isn't hsc2hs functionality provided by ghc?

2013-06-05 Thread Roman Cheplyaka
* Jason Dagit dag...@gmail.com [2013-06-04 21:00:25-0700] My preferred solution would be to have ghc/ghci automatically run hsc2hs (support c2hs also?) when necessary. But so long as it's handled automatically, I wouldn't be particularly bothered by the implementation. How about having a

Re: [Haskell-cafe] Typeable typeclass and type-level naturals

2013-06-05 Thread Roman Cheplyaka
* TP paratribulati...@free.fr [2013-06-05 00:37:36+0200] Roman Cheplyaka wrote: Try adding deriving instance Typeable 'Zero deriving instance Typeable a = Typeable ('Succ a) to your module. (I haven't tested it — you might need to tweak it a bit.) Thanks Roman

Re: [Haskell-cafe] Why isn't hsc2hs functionality provided by ghc?

2013-06-05 Thread Roman Cheplyaka
* Ivan Lazar Miljenovic ivan.miljeno...@gmail.com [2013-06-05 17:47:40+1000] On 5 June 2013 17:34, Roman Cheplyaka r...@ro-che.info wrote: * Jason Dagit dag...@gmail.com [2013-06-04 21:00:25-0700] My preferred solution would be to have ghc/ghci automatically run hsc2hs (support c2hs also

  1   2   3   4   5   6   >