Re: [Haskell-cafe] [ANNOUNCE] GHC 9.2.1 now available

2021-11-17 Thread Evan Laforge
It seems the OS X distribution is missing profiling libs, details at https://gitlab.haskell.org/ghc/ghc/-/issues/20707 but that's basically the whole story :) ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

is cabal-install buildable?

2020-03-28 Thread Evan Laforge
I recently upgraded to ghc 8.8.3, thinking that since it's been around 8 months and 8.10 is already out, maybe things have stabilized enough. But I immediately ran into confusing trouble with cabal-install. It seems like it's just not buildable since 8.8 came out. Can this really be true? The

Re: [ANNOUNCE] GHC 8.6.1 released

2018-10-20 Thread Evan Laforge
On Thu, Oct 18, 2018 at 12:23 AM Kazu Yamamoto wrote: > > I met the same problem. > > See https://ghc.haskell.org/trac/ghc/ticket/15769 for workaround. Thanks for the note, this helped me find a solution. I updated the ticket with my experience. ___

Re: [ANNOUNCE] GHC 8.6.1 released

2018-09-22 Thread Evan Laforge
Has anyone installed the OS X binary distribution? I get: "utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist" copy libraries/ghc-prim dist-install "strip" '' '/usr/local' '/usr/local/lib/ghc-8.6.1' '/usr/local/share/doc/ghc-8.6.1/html/libraries' 'v p dyn' dyld: Library not loaded:

.ghci runs after flag parsing?

2018-04-04 Thread Evan Laforge
I just noticed that it appears flag parsing happens before executing .ghci. And sure enough, looking at the source, GHCi.UI.runGHCi executes the dot files, which is definitely after all the dynflags parsing stuff in Main. This means that if your .ghci has a -Wall, you can't turn off warnings

8.4.1 ghci findings

2018-03-22 Thread Evan Laforge
I just filed this bug: #14963: ghci -fdefer-type-errors can't run IO action from another module https://ghc.haskell.org/trac/ghc/ticket/14963 It seems like -fdefer-type-errors and ghci just don't get along at all now. But on the good news side, ghci reloading a changed module in 8.4.1 is much

ghc 8.0.2 vs 8.4.1 compilation time and performance

2018-03-21 Thread Evan Laforge
I just upgraded from 8.0.2 to 8.4.1, and I took the opportunity to do a few informal compile time and run time tests. There's been a lot of talk about compile time regressions, so maybe these will be of interest, informal as they are. I wound up skipping 8.2.1 due to

Re: [Haskell-cafe] uninstalling libraries

2017-11-13 Thread Evan Laforge
hence the pervasive assumption that sandboxing will be > involved. > > > On Nov 13, 2017 14:45, "Evan Laforge" <qdun...@gmail.com> wrote: > > On Mon, Nov 13, 2017 at 12:27 PM, Dan Burton <danburton.em...@gmail.com> > wrote: >> I also lean towards the "you

Re: [Haskell-cafe] uninstalling libraries

2017-11-13 Thread Evan Laforge
On Mon, Nov 13, 2017 at 12:27 PM, Dan Burton wrote: > I also lean towards the "you shouldn't be trying to uninstall" mentality. > But it's worth discussing. > > What is the motive for uninstalling? Is it to upgrade to a new version? To > narrow hoogle search results?

Re: uninstalling libraries

2017-11-12 Thread Evan Laforge
On Sun, Nov 12, 2017 at 8:14 PM, Brandon Allbery wrote: > This is something of a nasty problem, considering that storing uninstall > information separately is not particularly robust. Perhaps ghc-pkg should, > if it doesn't already, support extension fields that e.g. cabal

uninstalling libraries

2017-11-12 Thread Evan Laforge
For a very long time, I've used a local script to uninstall libraries. Initially it was very simple: use ghc-pkg field to find and remove library-dirs, import-dirs, and haddock-html, and call ghc-pkg unregister. It served well for a long time, but eventually I got tired of copy paste games and

Re: [ANNOUNCE] GHC 8.2.2 release candidate 2

2017-11-05 Thread Evan Laforge
On Sun, Nov 5, 2017 at 4:56 AM, Sven Panne wrote: > This is not an issue about 8.2.2 per se, but 8.2 changes in general: Recent > discussions on Haskell Cafe showed serious problems with Emacs' haskell-mode > due to some ad hoc changes like

Re: 8.2.1 changes to iface/FlagChecker.hs

2017-08-03 Thread Evan Laforge
Thanks, I added my two cents to the ticket. On Thu, Aug 3, 2017 at 12:37 PM, George Colpitts <george.colpi...@gmail.com> wrote: > I reported this in https://ghc.haskell.org/trac/ghc/ticket/13604 > > On Thu, Aug 3, 2017 at 4:32 PM Evan Laforge <qdun...@gmail.com> wrote:

8.2.1 changes to iface/FlagChecker.hs

2017-08-03 Thread Evan Laforge
My program uses the GHC API to provide a REPL, and upgrading to 8.2.1 broke that... well, just made it really slow. Where it used to quickly load the compiled files, it now wants to recompile everything as bytecode which makes 1s startup time go to 1m. The reason was it now thinks flags have

Re: [ANNOUNCE] GHC 8.2.1 available

2017-07-26 Thread Evan Laforge
This seems like a silly question, but how can we install cabal-install now? The latest hackage version 1.24.0.2 has Cabal (>=1.24.2 && <1.25), but it looks like ghc Cabal is now at 2.*. I ran into this because if I get: % cabal install --only-dependencies Resolving dependencies... cabal:

warn-identities from newtype deriving

2017-03-14 Thread Evan Laforge
I just noticed that if you derive Real for a Ratio.Rational newtype, you get a warning: {-# LANGUAGE GeneralizedNewtypeDeriving #-} import qualified Data.Ratio as Ratio newtype X = X Ratio.Rational deriving (Eq, Ord, Num, Real) You get a warning: : Warning: Call of toRational :: Rational ->

Re: GHC API: memory usage of loaded modules

2016-12-14 Thread Evan Laforge
On Wed, Dec 14, 2016 at 8:21 AM, Reid Barton <rwbar...@gmail.com> wrote: > On Tue, Dec 13, 2016 at 1:21 PM, Evan Laforge <qdun...@gmail.com> wrote: > GHCi definitely needs to load some .hi files of your dependencies. > Your .hi files contain the types of your functions, n

GHC API: memory usage of loaded modules

2016-11-28 Thread Evan Laforge
I have a program that uses the GHC API to provide a REPL. It winds up taking up 200mb in RAM, as measured by GHC.Stats.currentBytesUsed, but without the GHC API it's 5mb. If I turn on verbose, I can see that GHC is loading 255 modules, all loaded binary ("skipping M ( M.hs, M.hs.o )") except the

Re: Proposal: ArgumentDo

2016-07-06 Thread Evan Laforge
On Wed, Jul 6, 2016 at 10:39 AM, Bardur Arantsson wrote: > On 07/04/2016 12:31 PM, Akio Takano wrote: >> Hi glasgow-haskell-users, >> >> I have written a wiki page about a proposed extension called >> ArgumentDo. It's a small syntactic extension that allows "do" >>

Re: TDNR without new operators or syntax changes

2016-05-28 Thread Evan Laforge
On Sat, May 28, 2016 at 3:13 AM, AntC <anthony_clay...@clear.net.nz> wrote: >> Evan Laforge gmail.com> writes: > >> ... what would happen if you tried to do records >> just like C structs? So e.g. a•b requires 'a' to be a record with a >> 'b' field, and

Re: TDNR without new operators or syntax changes

2016-05-28 Thread Evan Laforge
As long as were back on this topic again (sort of), and just to satisfy my curiousity, what would happen if you tried to do records just like C structs? So e.g. a•b requires 'a' to be a record with a 'b' field, and is just one identifier, no functions involved, and 'b' is not a separate value. I

Re: RFC: Removing the `-hb` profiling option

2016-05-06 Thread Evan Laforge
I've used this a lot when looking for leaks. Especially combined with other things like -hbdrag -hc, so I'd be sad to see it go. Without it, how do you find lag and drag? On the other hand, the entire profiling system has been hard to use because of crashes (perhaps due to that thread-unsafety

Re: idea: tool to suggest adding imports

2016-03-19 Thread Evan Laforge
On Sat, Mar 19, 2016 at 8:12 AM, Alexander Berntsen <alexan...@plaimi.net> wrote: > On 18/03/16 23:51, Evan Laforge wrote: >> I did this about 5 or 6 years ago for vim, and I'm so used to it I >> wouldn't want to live without it. > Is your plug-in free software? Do you have

Re: idea: tool to suggest adding imports

2016-03-18 Thread Evan Laforge
I did this about 5 or 6 years ago for vim, and I'm so used to it I wouldn't want to live without it. So I definitely recommend just doing it. It was surprisingly easy to implement, it only took a few hours, and then a day or so to refine the details. I used haskell-src-exts for parsing and

Re: LANGUAGE ConstraintKinds not needed to use ConstraintKinds?

2016-02-14 Thread Evan Laforge
On Mon, Feb 15, 2016 at 12:57 PM, Eric Seidel wrote: > It looks like it is. According to [1], the context must have the form `C > a` unless FlexibleContexts is enabled. Works for me, thanks! ___ Glasgow-haskell-users mailing list

Re: LANGUAGE ConstraintKinds not needed to use ConstraintKinds?

2016-02-14 Thread Evan Laforge
it-parameters. > > Eric > > > On Sun, Feb 14, 2016, at 16:32, Evan Laforge wrote: >> I recently upgraded to ghc 8 and started using stacks via >> ImplicitParams. For that I wind up using 'type Stack = (?stack :: >> CallStack)' and so ContraintKinds (I see that in th

LANGUAGE ConstraintKinds not needed to use ConstraintKinds?

2016-02-14 Thread Evan Laforge
I recently upgraded to ghc 8 and started using stacks via ImplicitParams. For that I wind up using 'type Stack = (?stack :: CallStack)' and so ContraintKinds (I see that in the future GHC will do this by default). So now I can have a file like: module T where import qualified Log as Log f ::

Re: record field names vs. -fwarn-unused-binds

2015-11-04 Thread Evan Laforge
On Tue, Nov 3, 2015 at 10:42 AM, Thomas Miedema wrote: > Through a patch by Oleg Grenrus (phadej), GHC 8 will have the following new > flags: > -fwarn-unused-top-binds > -fwarn-unused-local-binds > -fwarn-unused-pattern-binds > > So you'll be able to pick and choose.

record field names vs. -fwarn-unused-binds

2015-11-03 Thread Evan Laforge
[ ccing haskell-cafe since while it's a ghc flag, I'll bet most compilers have an equivalent ] I really like -fwarn-unused-binds because it frequently finds bugs where I forgot to call something or use some value. If I put an export list on, it can find dead functions I forgot to delete.

Re: type error formatting

2015-11-03 Thread Evan Laforge
A diff is up at https://phabricator.haskell.org/D1427 On Sat, Oct 24, 2015 at 1:14 PM, Evan Laforge <qdun...@gmail.com> wrote: > Ok, ticket created. I'll go see how much I can figure out on my own. > > https://ghc.haskell.org/trac/ghc/ticket/11014 > > WRT the "b

Re: type error formatting

2015-10-24 Thread Evan Laforge
t; *From:* Glasgow-haskell-users [mailto: > glasgow-haskell-users-boun...@haskell.org] *On Behalf Of *Evan Laforge > *Sent:* 24 October 2015 03:48 > *To:* GHC users > *Subject:* type error formatting > > > > Here's a typical simple type error from GHC: > > > > Derive

type error formatting

2015-10-23 Thread Evan Laforge
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 type: [([(a1, Syllable)], [Sequence Bol])] Actual type: [([Syllable], [Sequence Bol])] Relevant bindings include syllables :: [(a1,

using nmitchell's space leak detection technique

2015-10-01 Thread Evan Laforge
Neil Mitchell wrote an article about finding space leaks by limiting the stack size: http://neilmitchell.blogspot.fr/2015/09/detecting-space-leaks.html I'm giving it a try, but the results don't make any sense to me. My understanding is that the too-deep stack indicates that someone created too

simultaneous ghc versions

2015-07-31 Thread Evan Laforge
The recent release of ghc 7.10.2 reminded me of something I meant to ask about a long time ago. Most of the binaries ghc installs are versioned (x linked to x-7.10.2), with some exceptions (hpc and hsc2hs). Shouldn't they all be versioned? Also, 'haddock' is inconsistent with all the rest, in

Re: simultaneous ghc versions

2015-07-31 Thread Evan Laforge
On Fri, Jul 31, 2015 at 11:26 AM, Herbert Valerio Riedel hvrie...@gmail.com wrote: Btw, I simply prepend to the $PATH env variable, or pass the appropriate executable name to `cabal`'s -w --with-compiler=PATHgive the path to a particular compiler I don't understand, aren't they

Re: simultaneous ghc versions

2015-07-31 Thread Evan Laforge
On Fri, Jul 31, 2015 at 11:42 AM, Herbert Valerio Riedel hvrie...@gmail.com wrote: Sorry, I assumed this w/o saying; I maintain and use myself https://github.com/hvr/multi-ghc-travis Ah, I see. I agree your approach is more principled in that it's local rather than modifying global state.

Re: ghc 7.10.1 hard lock on exit with shake, OS X 10.10

2015-06-23 Thread Evan Laforge
a day would see this a lot, so unless it's somehow specific to my configuration, eventually more reports should come in. On Tue, Jun 16, 2015 at 11:19 PM, Evan Laforge qdun...@gmail.com wrote: I've been trying the 7.10.2 testing release for the last few days, and so far no lock-ups. Maybe

Re: ghc 7.10.1 hard lock on exit with shake, OS X 10.10

2015-06-17 Thread Evan Laforge
with the latest ghc-7.10 branch. On Wed, Jun 3, 2015 at 12:27 AM, Evan Laforge qdun...@gmail.com wrote: On Tue, Jun 2, 2015 at 7:20 PM, Carter Schonwald carter.schonw...@gmail.com wrote: could you share a minimal program that reproduces the problem? That's the thing, it's a thousand line shakefile

ghc 7.10.1 hard lock on exit with shake, OS X 10.10

2015-06-02 Thread Evan Laforge
After I upgraded to 7.10.1 I started noticing that my shakefile would lock up on exit. It's after the 'main' function exits, and none of the shake tests have a problem, so presumably it's a GHC thing, that shake somehow causes to happen. Only kill -9 gets it to quit. Here's a stack trace from

Re: ghc 7.10.1 hard lock on exit with shake, OS X 10.10

2015-06-02 Thread Evan Laforge
On Tue, Jun 2, 2015 at 7:20 PM, Carter Schonwald carter.schonw...@gmail.com wrote: could you share a minimal program that reproduces the problem? That's the thing, it's a thousand line shakefile that builds a 100k line program, and it's happening only rarely now. Since it happens so rarely it

documentation links broken in 7.10.1

2015-05-21 Thread Evan Laforge
It seems like haddock's index.html generation is broken in 7.10.1. Namely, it creates links to e.g. Codec-Binary-UTF8-Generic.html when it should be to utf8-string-1/html/Codec-Binary-UTF8-Generic.html This is haddock 2.16.0, which comes with the binary distribution for 7.10.1. I looked at

Re: documentation links broken in 7.10.1

2015-05-21 Thread Evan Laforge
and will be part of 7.10.2. On Thu, May 21, 2015 at 12:49 PM, Evan Laforge qdun...@gmail.com wrote: It seems like haddock's index.html generation is broken in 7.10.1. Namely, it creates links to e.g. Codec-Binary-UTF8-Generic.html when it should be to utf8-string-1/html/Codec-Binary-UTF8

Re: Proposal: ValidateMonoLiterals - Initial bikeshed discussion

2015-02-06 Thread Evan Laforge
Would it be feasible to make a lighter-weight mode for quasiquotes that doesn't require the whole load the module in ghci runaround? If it didn't need to do that, there wouldn't be much downside to turning it on everywhere. And it would enable lots of QQ conveniences that at least I don't think

Re: template haskell vs. -prof

2015-01-23 Thread Evan Laforge
On Sat, Jan 24, 2015 at 1:29 PM, John Lato jwl...@gmail.com wrote: I mean to use a ghc that's been built without dynamic support. Oh, so if the whole compiler is not dynamic then TH no longer requires .dyn_o files? Interesting. I know they've put a lot of work into this and staging is hard, so

Re: template haskell vs. -prof

2015-01-23 Thread Evan Laforge
On Sat, Jan 24, 2015 at 2:38 AM, John Lato jwl...@gmail.com wrote: I agree that mixing template haskell with -prof can be tricky. It's easier if you turn off dynamic linking entirely. But that's the thing, I do turn of dynamic linking because I have to for -prof, but TH seems to require it.

template haskell vs. -prof

2015-01-23 Thread Evan Laforge
I ran into trouble compiling template haskell with -prof, and came across the ghc manual 7.9.4. Using Template Haskell with Profiling. Unfortunately I can't use its advice directly since I put profiling and non-profiling .o files into different directories. But in principle it seems it should

Re: How to remove a cabal package from the local system?

2015-01-21 Thread Evan Laforge
I use a shell script. It's really useful, surely there's some official way to do this? #!/bin/zsh package=$1 if ! ghc-pkg describe $package /dev/null; then echo no such package: $package exit 1 fi ghcdir=$(ghc --print-libdir) function field() { ghc-pkg field $package $1 | cut -d'

confusing type error

2014-12-04 Thread Evan Laforge
I recently got a confusing error msg, and reduced it to a small case: f1 :: Monad m = m Bool f1 = f2 0 0 'a' f2 :: Monad m = Int - Float - m Bool f2 = undefined From this, it's clear that f2 is being given an extra Char argument it didn't ask for. However, the error msg (ghc 7.8.3) is:

Re: confusing type error

2014-12-04 Thread Evan Laforge
On Thu, Dec 4, 2014 at 12:59 PM, migmit mig...@gmail.com wrote: It tries to get `m Bool` by applying f1 to three arguments: 0, 0, and 'a'. Now, since `f2` has the type `Int - Float - n Bool`, where `n` is of kind `* - *` (and an instance of `Monad` class, but it's not yet the time to look

Re: Discovery of source dependencies without --make

2014-11-28 Thread Evan Laforge
Here's what I use: http://ofb.net/~elaforge/shake/Shake/HsDeps.hs It's a very dumb but fast parser that figures out dependencies. I use it for my shake build system. Not sure if it's useful, but there it is if it helps. If you have a complicated build setup and you're not using shake, maybe

Re: ghci balkiness on OS X?

2014-10-24 Thread Evan Laforge
On Fri, Oct 24, 2014 at 7:23 AM, Thomas Hallgren hallg...@chalmers.se wrote: Foruntately, the idle time GC can be turned off by running ghci +RTS -I0, and when I do that the problem goes away. Alternatively, using a longer timeout (e.g. -I2) is enough to prevent the major GCs from happening

ghci balkiness on OS X?

2014-10-21 Thread Evan Laforge
On my OS X, if I load a couple hundred modules into ghci as bytecode, text entry gets balky and laggy. So e.g. if I hold down a key, the letters will stream in but have frequent hiccups. This seems to adversely affect haskeline as well, such that, using vi mode, sometimes ^[ to move to command

Re: extra ambiguous type variable errors after a couldn't match error?

2014-07-17 Thread Evan Laforge
On Thu, Jul 17, 2014 at 2:02 AM, Simon Peyton Jones simo...@microsoft.com wrote: Good point! See https://ghc.haskell.org/trac/ghc/ticket/9323 Ah, fixed in the next release. Ok, that's good enough for me, it's only a minor annoyance. ___

extra ambiguous type variable errors after a couldn't match error?

2014-07-16 Thread Evan Laforge
7.8.3 has a new behaviour where a plain type error will cause ambiguous type variable errors, e.g.: module M where broken :: [Int] broken = () ambiguous :: a - [String] ambiguous _ = map show [1..] When imported in ghci, I get: M.hs:4:10: Couldn't match expected type ‘[Int]’ with actual

Fwd: how to get ghci to load compiled modules in 7.8?

2014-07-14 Thread Evan Laforge
I sent this to haskell-cafe, but there was no response. On stackoverflow there was no response either. I'm trying one last time, but adding ghc-users (which I should have done at the beginning!). Surely it can't be that no one knows how to load modules in ghci? I know a lot of work was done to

Re: how to get ghci to load compiled modules in 7.8?

2014-07-14 Thread Evan Laforge
On Mon, Jul 14, 2014 at 10:36 AM, Reid Barton rwbar...@gmail.com wrote: See https://ghc.haskell.org/trac/ghc/ticket/8736. The current workaround for GHC 7.8 is to compile with -dynamic, not -dynamic-too. That was it! Thanks so much. As an aside, I was kind of expecting a faster link time due

Re: how to get ghci to load compiled modules in 7.8?

2014-07-14 Thread Evan Laforge
On Mon, Jul 14, 2014 at 11:13 AM, Evan Laforge qdun...@gmail.com wrote: As an aside, I was kind of expecting a faster link time due to -dynamic, but apparently not. Oh well, I'm happy enough ghci is back. Aha, I needed to pass -dynamic when linking too. Sorry for the noise

Re: how to get ghci to load compiled modules in 7.8?

2014-07-14 Thread Evan Laforge
On Mon, Jul 14, 2014 at 11:13 AM, Evan Laforge qdun...@gmail.com wrote: On Mon, Jul 14, 2014 at 10:36 AM, Reid Barton rwbar...@gmail.com wrote: See https://ghc.haskell.org/trac/ghc/ticket/8736. The current workaround for GHC 7.8 is to compile with -dynamic, not -dynamic-too

Re: how to get ghci to load compiled modules in 7.8?

2014-07-14 Thread Evan Laforge
On Mon, Jul 14, 2014 at 12:35 PM, Evan Laforge qdun...@gmail.com wrote: Actually... not quite. -dynamic seems let ghci load, but when I load with the GHCI API, I get this: compile error: interactive session: cannot find normal object file ‘build/debug/obj/Util/Contro.o’ while

Re: love for hpc?

2013-11-09 Thread Evan Laforge
On Wed, Nov 6, 2013 at 11:55 PM, Roman Cheplyaka r...@ro-che.info wrote: So Evan's prediction was accurate ;-) There was always the chance someone would say I'm in the process of making version 2 which is 10x better, just be patient! :) Ok, I've got a few more things on my TODO list then...

Re: GHC error message on type mismatch

2013-11-08 Thread Evan Laforge
On Thu, Nov 7, 2013 at 4:22 AM, David Luposchainsky dluposchain...@googlemail.com wrote: On 2013-11-07 12:52, Daniel Trstenjak wrote: My problem is with 'Expected' and 'Actual', that I'm often unsure if the compiler is expecting something or if I'm the expecting one and the same goes for

Re: match_co: needs more cases

2013-11-07 Thread Evan Laforge
On Thu, Nov 7, 2013 at 11:11 AM, crockeea ecrocke...@gmail.com wrote: I got this error with a small example, so I thought I'd post it for you. I could only get it to work when split over two files. Mine is similar, sorry I've been lazy about getting a small reproduction, I assumed it wasn't too

Re: match_co: needs more cases

2013-11-07 Thread Evan Laforge
On Thu, Nov 7, 2013 at 4:20 PM, Carter Schonwald carter.schonw...@gmail.com wrote: specialize only fires on functions that have type class constraints / are part of a type class. Furthermore, the function needs to be marked INLINEABLE or INLINE for specialization to work (unless the specialize

Re: [Haskell-cafe] Music update

2013-10-06 Thread Evan Laforge
I saw the the video on g+, it's especially nice with live instruments. I noticed the code had a fair amount of stuff dealing with limitations of the auto-bass, I assume you had to be careful not to gum up its works. Is there a robotic drumset back there somewhere too? Also change ringing is new

Re: [Haskell-cafe] Proposal: Pragma EXPORT

2013-09-17 Thread Evan Laforge
It also makes actual definitions cleaner/shorter rather than cluttering them with extra annotations (either PRAGMAs or public/private markers), though this is not that big of a deal. It's true, though you could get it pretty short, e.g. default private and leading ! for public. Go uses

Re: [Haskell-cafe] reifying typeclasses

2013-09-17 Thread Evan Laforge
Thanks to everyone who replied, indeed it looks like GADTs do what I claimed I wanted. That's neat because I've never been able to think of a use for them. However: On Sun, Sep 15, 2013 at 2:16 AM, o...@okmij.org wrote: Why not to introduce several type classes, even a type class for each

Re: [Haskell-cafe] Proposal: Pragma EXPORT

2013-09-16 Thread Evan Laforge
On Mon, Sep 16, 2013 at 4:09 PM, Wvv vite...@rambler.ru wrote: I suggest to add instead of (or with) export section Pragma EXPORT: I doubt this has much chance, since haskell already made its choice here a long time ago (and even if it were still up for discussion, PRAGMA isn't right for it),

reifying typeclasses (resend)

2013-09-15 Thread Evan Laforge
[ This is the second time I sent this, the first time it said it was awaiting moderation because I'm not subscribed to haskell-cafe, which is weird because I thought I was. Did a bunch of people get unsubscribed? ] I'm sure this is old-hat to typeclass wizards, but I've managed to get pretty far

Re: [Haskell-cafe] abs minBound (0 :: Int) negate minBound == (minBound :: Int)

2013-08-21 Thread Evan Laforge
but Integer is actually (if you're using GMP with your ghc): Yes, that's tolerably well known. You only pay the space overhead when you need it (like Lisp or Smalltalk). But you always pay the time overhead. I thought Integers can't be unboxed, regardless of their magnitude?

ScopedTypeVariables

2013-08-06 Thread Evan Laforge
Occasionally I have to explicitly add a type annotation, either for clarity or to help choose a typeclass instance. Usually top-level type annotations take care of this, but sometimes it's convenient to only annotate a certain value, e.g. one argument of a lambda. I've noticed that while vanilla

Re: cascading type errors in ghc

2013-08-06 Thread Evan Laforge
On Sun, Jul 28, 2013 at 9:01 AM, Simon Peyton-Jones simo...@microsoft.com wrote: Giving good type error messages is tricky! Indeed, and I'm fully aware this is a Hard Problem. You get different behaviour for literals because 0 has type (forall a. Num a = a), whereas you declared x1 to have

[Haskell-cafe] ScopedTypeVariables

2013-08-06 Thread Evan Laforge
Occasionally I have to explicitly add a type annotation, either for clarity or to help choose a typeclass instance. Usually top-level type annotations take care of this, but sometimes it's convenient to only annotate a certain value, e.g. one argument of a lambda. I've noticed that while vanilla

cascading type errors in ghc

2013-07-27 Thread Evan Laforge
I frequently see one logical mistake turn into many type errors in ghc. Of course in general one logical mistake to a human and a type checker can be completely different things, so that's not surprising. The thing is, I feel like I started seeing more with the upgrade to ghc 7.6 (or was it 7.4?)

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-20 Thread Evan Laforge
On Tue, Jul 16, 2013 at 5:20 PM, Richard A. O'Keefe o...@cs.otago.ac.nz wrote: Brian Marick sent me a couple of his stickers. The one I have on my door reads to be less wrong than yesterday. The other one I keep free to bring out and wave around: An example would be handy about now.

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

2013-07-13 Thread Evan Laforge
If you have an .hs file with {-# LANGUAGE CPP #-}, it is a compiler's job to detect it and run the preprocessor. But haddock uses the GHC API (which knows how to do the above), so there shouldn't be issues with that. Hey, you're right! Haddock *does* understand LANGUAGE CPP. Ok, that makes

[Haskell-cafe] getting haddock to cooperate with cpp

2013-07-12 Thread Evan Laforge
So haddock ignores {-# LANGUAGE CPP #-}, which makes it crash on any file that uses it. But if you pass --optghc=-cpp, it runs CPP on everything, which makes it crash on any file that uses string gaps, or happens to contain a /*. /* is rare and easily fixed, but not string gaps. It looks like a

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

2013-07-12 Thread Evan Laforge
` or calling haddock manually? Cheers, On Fri, Jul 12, 2013 at 3:25 PM, Evan Laforge qdun...@gmail.com wrote: So haddock ignores {-# LANGUAGE CPP #-}, which makes it crash on any file that uses it. But if you pass --optghc=-cpp, it runs CPP on everything, which makes it crash on any file that uses

Re: Overloaded record fields

2013-06-27 Thread Evan Laforge
I'm reluctant to add yet another opinion, but, oh what the heck: For me, lenses basically already solve the record problem. The only missing thing is to integrate them better with record declaration syntax. Having to rely on TH and then write a makeLenses splice is just too much friction to

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

2013-06-25 Thread Evan Laforge
/haskell-suite/halberd On Tue, Jun 25, 2013 at 6:30 AM, Evan Laforge qdun...@gmail.com wrote: This is neat, it sounds like I could use this with fix-imports to find only modules that export the right function name, or even to add non-qualified imports. But since it's already 95% good enough for my

Re: [Haskell-cafe] tangential request...

2013-06-24 Thread Evan Laforge
Inconsolata and Consolas? My bet: - Bitstream Vera Sans Mono - DejaVu Sans Mono - Inconsolata - Whatever the default terminal font is on OS X A bit of a tangent, but a while back I tried a bunch of those recommended programmer fonts, and I didn't like any of them better than the default

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

2013-06-24 Thread Evan Laforge
This is neat, it sounds like I could use this with fix-imports to find only modules that export the right function name, or even to add non-qualified imports. But since it's already 95% good enough for my use case, I probably won't get around to it any time soon. On Thu, Jun 20, 2013 at 8:13 AM,

Re: [Haskell-cafe] tangential request...

2013-06-22 Thread Evan Laforge
You're overthinking it. I just sent a whole screen. On Sat, Jun 22, 2013 at 7:25 PM, Brandon Allbery allber...@gmail.com wrote: On Sat, Jun 22, 2013 at 9:49 PM, Michael Orlitzky mich...@orlitzky.com wrote: On 06/22/2013 01:28 PM, Mark Lentczner wrote: 3) Do not resize the terminal window

Re: Remove Enum from Float and Double

2013-06-11 Thread Evan Laforge
I don't see much gain. It will break previously working code and the workaround to the breakage will likely be manually reimplementing enumFromTo in each instance. As an aside, many years ago I did exactly that after being bit by Enum infelicities, and while you could say it's a

Re: Remove Enum from Float and Double

2013-06-11 Thread Evan Laforge
On Tue, Jun 11, 2013 at 2:18 PM, Johan Tibell johan.tib...@gmail.com wrote: If we truly believe that the instance is dangerous for users (and not merely for people who don't understand floating point arithmetic on computers), then we should add a deprecation pragma to the instance and

match_co: needs more cases

2013-05-27 Thread Evan Laforge
I made some strictifying changes and started getting this msg from ghc: match_co: needs more cases vector-0.10.0.1:Data.Vector.Generic.Mutable.MVector{tc r46} (Sym (vector-0.10.0.1:Data.Vector.TFCo:R:MutableVector{tc r45})) main:Util.TimeVectorStorable.Sample{tc r4e} y{tv a4lK}

[Haskell-cafe] hackage update brigade (was Re: ANNOUNCE: new bridge! (prelude-prime))

2013-05-27 Thread Evan Laforge
Yes, it would break code. Probably a lot of code. So of course I volunteer to fix my code, but that's not much help, since it's a small minority of the code on hackage. So that made me think, maybe we should organize a kind of hackage community service brigade, which, when the time is right,

Re: [Haskell-cafe] Parallel ghc --make

2013-05-13 Thread Evan Laforge
I wrote a ghc-server that starts a persistent process for each cpu. Then a 'ghc' frontend wrapper sticks each job in a queue. It seemed to be working, but timing tests didn't reveal any speed-up. Then I got a faster computer and lost motivation. I didn't investigate very deeply why it didn't

Re: [Haskell-cafe] createProcess interferes with sockets?

2013-04-22 Thread Evan Laforge
On Sun, Apr 21, 2013 at 9:25 PM, Donn Cave d...@avvanta.com wrote: Quoth Evan Laforge qdun...@gmail.com, sleep = Process.createProcess (Process.proc sleep [5]) sleep = Process.createProcess ((Process.proc sleep [5]) {Process.close_fds = True}) - Because the client uses buffered I

Re: [Haskell-cafe] createProcess interferes with sockets?

2013-04-22 Thread Evan Laforge
On Mon, Apr 22, 2013 at 7:39 PM, Donn Cave d...@avvanta.com wrote: quoth Evan Laforge qdun...@gmail.com, ... Oh I see, because the subprocess inherits the socket connection. That makes sense, though it's tricky. Tricky tricky unix. Why does fork() have to be so complicated? Well, it's

[Haskell-cafe] createProcess interferes with sockets?

2013-04-21 Thread Evan Laforge
I've had a strange bug that's baffled me for a long time. I finally got serious about tracking it down, and managed to reduce it to a small program that exhibits the unexpected behaviour, namely that a createProcess seems to block writing to and closing a socket. Here's the example program: ---

[Haskell-cafe] customizing haskeline?

2013-04-14 Thread Evan Laforge
I tried to colorize a haskeline prompt by putting control characters in it, but line editing was hopelessly confused, presumably because haskeline doesn't understand control characters and thought the prompt was longer than it really was. From looking at Haskeline.promptedInput, it seems like

Re: [Haskell-cafe] GSoC Project Proposal: Markdown support for Haddock

2013-04-08 Thread Evan Laforge
Can't we just add some features to haddock? There are a lot of ways to improve haddock a lot, and no one is doing them, so my impression is that haddock doesn't really have active maintainers. Adding a whole new backend seems risky, unless it results in new maintainers joining. For my personal

Re: [Haskell-cafe] GSoC Project Proposal: Markdown support for Haddock

2013-04-08 Thread Evan Laforge
On Mon, Apr 8, 2013 at 3:49 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 9 April 2013 05:08, MigMit miguelim...@yandex.ru wrote: Отправлено с iPad 08.04.2013, в 21:44, Evan Laforge qdun...@gmail.com написал(а): Can't we just add some features to haddock? No, we can't

Re: [Haskell-cafe] A question about data declaration

2013-03-23 Thread Evan Laforge
Brent, my use case is not particularly complicated. I am trying to model the pdf spec - which says that pdf contains Objects that could of of types Number, String, Name, Array and Dictionary - while array is list of objects, the Disctionary is a list of tuples (Name, Object) not (Object,

Re: [Haskell-cafe] attoparsec and backtracking

2013-03-16 Thread Evan Laforge
I think the mistake here is to parse something and then decide if its it valid. It should be the parser which decides whether its valid. So rather than: suffix - A.option ((:) $ A.letter_ascii) try: typ - A.choice [ {- list or valid suffix parsers -} ] return $

Re: [Haskell-cafe] attoparsec and backtracking

2013-03-16 Thread Evan Laforge
On Fri, Mar 15, 2013 at 8:49 PM, Niklas Hambüchen m...@nh2.me wrote: Is it not possible to add an alternative (no pun intended) to | that supports the semantics Evan wants? I assume it's the performance thing. Presumably it would need to pass an extra flag with to the failure continuation to

[Haskell-cafe] attoparsec and backtracking

2013-03-15 Thread Evan Laforge
I have a couple of problems with attoparsec which I think are related to its always backtrack nature, but maybe there's some other way to solve the same problems. The first is that it's hard to get the right error msg out. For instance, I have a parser that tries to parse a number with an

Re: [Haskell-cafe] Text.PrettyPrint.HughesPJ is sloooow (and wl-pprint-text is fast)

2013-02-04 Thread Evan Laforge
I also get stack overflows from HughesPJ if I format something too big. LW is more efficient by construction than HughesPJ. The only reason I switched to HPJ from LW is that I could never get LW to behave as I wanted, but I'll probably wind up writing my own simpler formatter due to the HPJ

Re: [Haskell-cafe] Type classes, collections, sum types, closures, and a massive headache

2013-01-29 Thread Evan Laforge
Today I thought it was about time to simplify how new 'things' of a certain kind are added to the system. These things are some a cross between an event and an assertion of a fact in a rule based system. There are many different kinds of these things. I already have more than a dozen

Re: Newtype wrappers

2013-01-14 Thread Evan Laforge
On Mon, Jan 14, 2013 at 3:11 PM, Johan Tibell johan.tib...@gmail.com wrote: On Mon, Jan 14, 2013 at 2:57 PM, Roman Cheplyaka r...@ro-che.info wrote: It's described here: http://hackage.haskell.org/trac/ghc/wiki/NewtypeWrappers We seem to be talking past each other. There's a specific problem

  1   2   3   4   5   6   >