Hi John,
for the Haskell source modification part I've written hsimport[1].
For finding a certain symbol in the moduls of the dependencies of
a project, there's the 'findsymbol' command of a more recent hdevtools[2].
There's also vim-hsimport[3] combining the two.
Greetings,
Daniel
[1]
Hi Wren,
Incidentally, if we really want to pursue the get rid of CPP by
building it into the GHC distro...
In recent years there've been a number of papers on variational
lambda-calculi[1] which essentially serve to embed flag-based
preprocessor conditionals directly into the language
Hi,
I'm getting the compile error:
Gamgine/Image/PNG/Internal/Parser.hs:14:10:
Functional dependencies conflict between instance declarations:
instance Monad m = Stream LB.ByteString m Word8
-- Defined at Gamgine/Image/PNG/Internal/Parser.hs:14:10
instance Monad m =
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 wrapper
for Data.ByteString.Lazy and then define
On Wed, Apr 01, 2015 at 02:30:49AM -0700, 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
That would be some kind of harsh april 1st joke, if everything compiled
at that day
Hi Tom,
+1
There's a little bit of bikeshedding that needs to happen (e.g. is hiding
(Foo
(..)) sufficient to hide the type Foo and not just its constructors), but are
people +1 on this? I've frequently wanted this behavior.
I would be surprised if 'Foo(..)' would mean in this case
Hi Erik,
But right now, we have a useful property that adding imports and code
to a module does not break or change other code in that module. With
this extension, that changes.
So your biggest concern is about silent breakage of code, that suddenly
a different function is used which has the
I am with my new Ubuntu Trusty box. I have installed ghc by apt-get. Then I
wanted to build ghc from git to upgrade to 7.8.3.
If you only want to install a newer ghc version on ubuntu or even
multiple ghc versions at once, then I can only recommend the excellent
PPA of Herbert Valerio Riedel:
On Tue, Jul 29, 2014 at 12:02:19PM +0200, Johan Tibell wrote:
What's the rationale to not require
{-# OVERLAPPING Show [Char] #-}
here? Perhaps it's too annoying to have to repeat the types?
This one might be written at the top of the file, so it would be easier
to overlook it, than
On Fri, May 30, 2014 at 02:00:38AM -0700, John Meacham wrote:
JHC has the feature that
Graphics.UI.GTK.Button can live in any of:
Graphics/UI/GTK/Button.hs
Graphics/UI/GTK.Button.hs
Graphics/UI.GTK.Button.hs
Graphics.UI.GTK.Button.hs
It lets you have deep module hiarchies without deep
Hi Simon,
I don't quite know what I should think about this addition. Currently
you can be sure that modules correspond to directories. After this
change you can't be sure anymore.
I don't navigate source trees that much by 'cd'-ing into single
directories, so deep hierarchies don't bother me
On Fri, Apr 25, 2014 at 07:16:03AM -0700, Eric Seidel wrote:
An alternative (and I think this has also been proposed before) is to simply
drop the Graphics.UI header from the module hierarchy. The main con here is
that there's an increased risk of module name-clashes, but GHC already solves
On Fri, Nov 08, 2013 at 12:01:13AM -0800, Evan Laforge wrote:
When I write my own typecheck msgs, I always write Function expected
X, but received Y. That's not too far off from expected / actual,
though at least it has an explicit subject.
That's perfectly fine, because 'Function +
Hello,
I don't know if I'm the only one struggeling with this GHC error message
on type mismatches or it's because I'm not a full time Haskeller, or
because I'm not a native english speaker.
Couldn't match type `A' with `B´
Expected type: B
Actual type: A
My problem is with
Hi Simon,
On Thu, Nov 07, 2013 at 02:02:06PM +, Simon Peyton-Jones wrote:
The motivation is this. Consider
f True
where f :: Int - Char
Then
f *expects* an argument of type Int
but the *actual* argument has type Bool
Does that help?
If you would switch the meaning
Hi Ranjit,
I should have added that you should call them after compiling the
particular target (or with the environment obtained after compiling
from a particular target) did you do that?
I don't compile anything in my context, but I'm just reading the
information of already compiled
Hi Ranjit,
unfortunately both versions don't seem to work.
parseName :: GhcMonad m = String - m [Name]
This version yields an exception - I can't remember the exact text - but
something like symbol not found.
hscParseIdentifier :: HscEnv - String - IO (Located RdrName)
tcRnLookupRdrName ::
Hi all,
I played around with a parallel algorithm and tried to get the GC time
down by specifying the RTS option '-A'.
But if I'm specifying '-A' than also the usage of the cpu-cores seems to
change. Without '-A' I'm getting a total cpu-core usage of '4.44s',
with '-A' I'm getting only '1.67s'.
Ok, I think I got it. The cpu-cores are spending most of their time
doing GC, by reducing the GC time the cpu-cores don't have anything
left to do.
Seems like a really great parallel algorithm ;).
Greetings,
Daniel
___
Glasgow-haskell-users mailing
On Fri, Aug 23, 2013 at 10:12:27AM +0200, Erik Hesselink wrote:
Note that the 'normal' hoogle indexes all (?) of hackage. But by
default it only searches the haskell platform. You can add a package
with '+' to search in that package. E.g. PublicKey +crypto-api.
If the idea behind this, that
Hi Tom,
See [1] for an explanation of free monads in general. For IO in particular,
define a functor
data IOF a = GetChar (Char - a) | PutChar Char a | ...
with constructors for all elementary IO operations.
But how should this work if the user adds an IO operation, e.g by wrapping
Hi John,
Alan - I do NOT want to generate Haskell code. I want only to generate AST
and compile it.
The question about generating the code was only to have a debugging tool
- to see if the generated AST is good - I wanted to generate the Haskell
code only to check if its correct, but
Hi Evan,
1 - Add an option to add a 'deriving (Lens)' to record declarations.
That makes the record declare lenses instead of functions.
Well, no, that's exactly the kind of magic programming language hackery,
that Haskell shouldn't be part of.
Deriving should only add something, but not
Hi Adrian,
What's an exception? I thought Haskell used Maybe.
Haskell also has exceptions:
dan@machine ~ ghci
Prelude head []
*** Exception: Prelude.head: empty list
I also consider them as quite problematic, especially if they're used in
libraries, but sometimes we're all a bit lazy and
Hi Mateusz,
I don't think my post was out of order at all and I don't understand
why it sparked such an... energetic response - that wasn't my intent
at all.
A friendly response might contain the things you told John, but it could
also be a bit more empathic, otherwise its easy to perceive
Hi Nathan,
DataAlt c | Right tag - genDataConTag c - return $ Cond tag
Are you sure, that genDataConTag always returns a 'Right'?
If it returns a 'Left', than the pattern won't match.
Greetings,
Daniel
___
Haskell-Cafe mailing list
Hi Roman,
One issue with it in Haskell is that it'd lead to inconsistent
semantics:
myEq x x = True
is not the same as
myEq x y =
case y of
x - True
I don't think that it's inconsistent, because the 'case' defines a new name
scope, like the function does for its
Hi Roman,
In fact, lots of Haskell newcomers are surprised that
f 10 = 42
is not the same as
n = 10
f n = 42
Well, yes, at the beginning I've been also surprised about this.
But allowing this seems to be even more error prone, because now you
could bind function arguments to
Hi Jan,
On Tue, Apr 09, 2013 at 01:32:33PM +0200, Jan Stolarek wrote:
Thanks for pointing me to earlier discussions on this subject - they are
enlightening :) One
particular argument against seems to be very convincing to me:
From a language design point of view, it should be noted that
Hi Steffen,
most of the time I'm just using these cpp macros:
#define __POS__(__FILE__ ++ : ++ show __LINE__)
#define ERROR error $ __POS__ ++ - ++
Instead of writing 'error blub' you would write 'ERROR blub'
and additionally get the file name and the line.
There's a bracktracing
Hi Corentin,
On Wed, Mar 27, 2013 at 09:13:41PM +0100, Corentin Dupont wrote:
I have a function that looks like this:
call :: SomeFunction - String - SomeState
The string is actually the representation of the function passed in
parameter. It is stored in the state for documentation.
So a
Hi Michael,
On Sun, Mar 24, 2013 at 05:13:35PM -0500, Michael Better wrote:
Isn't this similar to the problem Cloud Haskell had to solve to send code
to another process to run?
As much as I know, the sendable code of 'Cloud Haskell' is limited, you
can't just send any kind of function.
Hi Corentin,
I have a DSL like this:
data Exp where
OnEvent :: EventName - (Int - Exp) - Exp
(...)
The OnEvent element carries a function (the handler to be called when the
event happens), and that makes my DSL non showable/serializable.
How could I fix that? This is a real
Hi Peter,
-- smart constructor with serialNumber
date serialNumber
| serialNumber 0 = Date serialNumber
| otherwise = error (invalid serialNumber ++ show serialNumber)
Instead of raising an error it's more secure to return a Maybe value.
date :: Int - Maybe Date
date
Hi Michael,
On Mon, Feb 25, 2013 at 02:41:19PM +0200, Michael Snoyman wrote:
At that point, we've now made two changes to REWRITE rules:
1. They can takes a new ALWAYS parameters.
2. There's a new, special identifier currentLocation available.
What would be the advantage is of that
Hi Henk-Jan,
It seems to me that there is something missing from this e-mail.
What are you missing?
Greetings,
Daniel
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Tue, Feb 19, 2013 at 02:15:33PM +0100, Vo Minh Thu wrote:
Screenshots obviously ;)
Hurray!
attachment: layers.png___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi all,
also if there's not that much to see and only a few minutes of gameplay,
but after spending quite a few hours writing it, getting a feeling for
Haskell and it's usage, perhaps it's in some way useful for someone,
even if just for a few minutes of distraction.
Hi Alex,
On Fri, Jan 18, 2013 at 08:26:10PM +0100, Alexander Bernauer wrote:
I thought it would make sense to use these names for ease of
reference. Given this, would you still prefer them being grouped in
separate modules?
Yes, I still think that having separate modules can be beneficial,
Hi Alexander,
On Thu, Jan 17, 2013 at 10:17:33PM +0100, Alexander Bernauer wrote:
I am happy to announce the second release of hgdbmi, a Haskell
implementation of the GDB Machine Interface.
Nice project! :)
PS: This is my first serious Haskell package. If you see something
that you
Hi Christopher,
On Fri, Dec 21, 2012 at 04:36:04AM -0900, Christopher Howard wrote:
Using a simple type I gave earlier from my monadic type question...
code:
data Socket3 a b c = Socket3 a b c
deriving (Show)
Is it possible somehow to layer on record syntax onto a
Hi Jan,
On Thu, Dec 13, 2012 at 01:56:13PM +0100, Jan Stolarek wrote:
That's what I'm trying to figure out right now. GHC build system looks very
complicated and it
seems I'll be spending weeks on understanding it before I can get to the
compiler code itself.
I think it's easier to have
Hi Chris,
On Thu, Dec 13, 2012 at 02:52:37PM +, Chris Nicholls wrote:
I worked on my own, but the GHC folk were very helpful when I got stuck.
That was quite a slow tactic in retrospect, I reckon I could have got much
further if I'd had the bottle to ask more questions. One problem with
On Thu, Dec 13, 2012 at 08:40:09PM +0200, Michael Snoyman wrote:
If you have a commercial use for cpphs, and feel the terms of the (L)GPL
are too onerous, you have the option of distributing unmodified binaries
(only, not sources) under the terms of a different licence (see
Greetings,
Daniel
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi Joachim,
On Sun, Nov 11, 2012 at 02:10:34PM +0100, Joachim Breitner wrote:
dear package authors. If you define a useful class, please think twice
before you do not export the methods, otherwise something like this will
happen:
I like the way 'Common Lisp' deals with this issue. Exported
Hi all,
I'm currently struggling in the search for a nice abstraction for the
input handling of a game (it's a simple platformer with rectangular platforms).
One good example is the level editor of the game. When pressing the left
mouse button the creation of a new platform is started. As long
Hi Jon
On Wed, Oct 24, 2012 at 11:08:29AM +0100, Jon Fairbairn wrote:
for each field, which is tedious (and O(n)). Obviously Templates
would help, but is there an alternative I’ve missed?
perhaps something like:
data Type = Ta | Tb | Tc ...
data E= Ea A | Eb B | Ec C | ...
type D=
On Thu, Aug 16, 2012 at 11:33:17PM -0400, wren ng thornton wrote:
However, there are certainly cases where we have hard upper
bounds[1][2][3], and ignoring those is not fine. Circumventing hard
upper bounds should require altering the .cabal file, given as
getting things to compile will
On Wed, Aug 15, 2012 at 03:54:04PM -0700, Michael Sloan wrote:
Upper bounds are a bit of a catch-22 when it comes to library authors evolving
their APIs:
1) If library clients aren't encouraged to specify which version of the
exported API they target, then changing APIs can lead to
Hi Oleg,
On Sat, Aug 11, 2012 at 08:14:47AM -, o...@okmij.org wrote:
I'd like to point out that the only operation we can do on the first
argument of MkFoo is to show to it. This is all we can ever do:
we have no idea of its type but we know we can show it and get a
String. Why not to
Hi all,
it should be possible a call a function on all elements of the data
structure, to add and remove elements.
What I currently have:
the type class:
class Foo a where
hasId :: a - Int - Maybe a
a few instances:
data A = A deriving Show
instance Foo A where
hasId a 1 = Just a
Hi Joey,
On Tue, Aug 07, 2012 at 02:13:09PM -0400, Joey Adams wrote:
Are you looking for existential quantification [1]?
data SomeFoo = forall a. Foo a = a
[1]:
http://www.haskell.org/ghc/docs/latest/html/users_guide/data-type-extensions.html#existential-quantification
Thanks!
On Thu, Jul 12, 2012 at 03:13:42PM -0400, Cale Gibbard wrote:
There are of course already lots of ways to create functions which
don't involve \
Well, I think it should be clear that we're talking here about
anonymous functions.
We're not exactly talking about function definitions, so much
On Thu, Jul 12, 2012 at 01:38:56PM -0400, Cale Gibbard wrote:
Personally I don't see why everyone appears to prefer the syntax with
\ in it over just the obvious case section syntax which was originally
proposed.
I don't think that the 'case section syntax' is obvious, because I don't
see the
Hi Ivan,
thanks, but l have been able to build it by myself.
I just want to get the package updated and if the maintainer can't be
reached, than ask for maintainership.
Greetings,
Daniel
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hi,
Marko Lauronens email address from the package is invalid, so I'm trying
to reach him this way.
pngload doesn't compile with ghc = 7.2 because of it's dependency to base and
haskell98.
Greetings,
Daniel
___
Haskell-Cafe mailing list
57 matches
Mail list logo