On Fri, Nov 14, 2014 at 03:53:13PM +0800, Simon Hengel wrote:
Can you explain why this would not solve your usecase? i.e., why would
README.lhs.md not suffice?
I haven't tried, but my assumption was that this is not picked up by
GitHub.
I just verified, GitHub dose not pick up
to indicated that:
* the proposal as it stands does not solve my use case
* there are other ways to solve this (namely: using symlinks)
Cheers,
Simon Hengel
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org
Thanks for all the feedback. Clearly opinion is divided on this one,
so I'll sit on it and think it through some more.
My assumption was that with what Felipe Lessa suggested, this proposal
is pretty much obsolete. As I understand it, it provides the same
benefits, the major difference being
I want to propose something really simple that would avoid this
problem with minimal additional complexity:
ghc -iGraphics.UI.Gtk=src
the meaning of this flag is that when searching for modules, ghc
will look for the module Graphics.UI.Gtk.Button in src/Button.hs,
rather than
Hi,
On Mon, Oct 14, 2013 at 01:28:17PM +0200, Vlatko Basic wrote:
I have 7.6.3 already, but I was wondering why the repository packages are not
maintained.
12.04 is an LTS for 5 years, so I suppose many would stick to it for a longer
time.
I added PPAs for GHC 7.6.3 recently. Feel free to
Hi,
I just released hspec-test-framework[1] and hspec-test-framework-th[2]
to Hackage.
They can be used to run test-framework tests with Hspec unmodified.
This can also be used to work around test-framework's incompatibility
with QuickCheck-2.6 and base-4.7.0 ;)
Have a look at the README for
Hi,
Due to the recent announcement of Roman's tasty library, are there
plans to basically release something similar to hspec-test-framework
and hspec-test-framework-th but targeting tasty instead?
I care about Hspec[1] and want to provide an upgrade path for
test-framework users, but I'm
Hi,
I'm glad to announce SmallCheck support [1] for the Hspec testing
framework.
A tiny example on how to use it is here:
https://github.com/hspec/hspec-smallcheck/blob/master/example/Spec.hs
More documentation for Hspec is here:
http://hspec.github.io/
Cheers,
Simon
[1]
Hi Roman,
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 messages this parser
would produce.
In addition to what Mateusz already said, I want to briefly summarize
On Wed, Jul 31, 2013 at 08:29:18PM +0300, kudah wrote:
On Wed, 31 Jul 2013 15:18:32 +0200 Jose A. Lopes
jabolo...@google.com wrote:
Is there a way to access docstrings through Template Haskell ?
For example, access the docstring of a function declaration ?
No, but I believe you can
Hi,
For whatever reason, your Haddock documentation is not visible on Hackage.
Haddock documentation is created by a batch job and will show up
eventually ;).
Cheers,
Simon
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Personally I think we need something akin to Ruby's `Gemfile.lock`
mechanism (ideally directly integrated into Cabal).
Cheers,
Simon
On Sat, May 11, 2013 at 11:10:45AM +0200, Alberto G. Corona wrote:
Hi Café:
I created just now an issue in cabal-dev:
Hi Niklas,
I haven't read the whole proposal as I'm short of time. But Alan
Zimmerman is doing a lot of work on integrating HaRe with the GHC API
[1]. He is alanz on freenode and a regular in #hspec.
I haven't looked at the code, but maybe it's of interest to you.
Cheers,
Simon
[1]
On Mon, Feb 25, 2013 at 09:57:04AM +0100, Joachim Breitner wrote:
Hi,
Am Montag, den 25.02.2013, 08:06 +0200 schrieb Michael Snoyman:
Quite a while back, Simon Hengel and I put together a proposal[1] for
a new feature in GHC. The basic idea is pretty simple: provide a new
pragma
On Mon, Feb 25, 2013 at 10:40:29AM +0100, Twan van Laarhoven wrote:
I think there is no need to have a separate REWRITE_WITH_LOCATION
rule. What if the compiler instead rewrites 'currentLocation' to the
current location? Then you'd just define the rule:
{-# REWRITE errorLoc error = errorLoc
Hi Ozgur,
I'm missing some context here, but I'll release an updated version of
hspec ASAP ;)
Cheers,
Simon
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Tue, Dec 18, 2012 at 05:25:41PM +, gra...@fatlazycat.com wrote:
Are there any libraries that define various common generators ?
What would be the cleanest way to define two positive integers below
1000 that are different ? Seems relatively easy with conditionals.
You can still use
On Mon, Dec 17, 2012 at 03:50:32PM +, gra...@fatlazycat.com wrote:
Getting test failures, I believe, due to using conditional properties
within quickckeck etc
[TEST] RecFunSpec:map (test/RecFunSpec.hs:48)
Gave up! Passed only 20 tests.
*** Failed! (2ms)
Is there a way for
On Mon, Dec 17, 2012 at 06:04:15PM +0200, Roman Cheplyaka wrote:
Unfortunately, I don't know the answer to your question.
However, if you don't find a solution, I suggest using SmallCheck
instead of QuickCheck — it works better when you have many unsuitable
cases.
Hi Joachim,
On Wed, Dec 12, 2012 at 12:20:35AM +0100, Joachim Breitner wrote:
there really a change to the on-disk format of the .haddock files?
Yes, the on-disk format changed, hence the interface version was bumped
from 21 to 22. But Haddock can still read files with interface version
21
On Wed, Dec 12, 2012 at 12:30:10PM +0100, Joachim Breitner wrote:
Hi Simon,
Am Mittwoch, den 12.12.2012, 12:15 +0100 schrieb Simon Hengel:
On Wed, Dec 12, 2012 at 12:20:35AM +0100, Joachim Breitner wrote:
there really a change to the on-disk format of the .haddock files?
Yes
On Mon, Dec 03, 2012 at 08:13:42AM -0800, Johan Tibell wrote:
On Mon, Dec 3, 2012 at 1:04 AM, Simon Hengel s...@typeful.net wrote:
I think the right thing to do is:
install:
- cabal install --only-dependencies --enable-tests
script:
- cabal configure --enable
Now I'm wondering whether the approaches I have in mind are sensible or if
anyone can think of a better way to achieve my goals? Is there a way to extend
GHCi without copying some of its source code? Is there a chance of having
these
features flow back into mainline GHCi once they are
Hi,
currently the default to test Haskell projects on Travis CI [1] is:
install:
- cabal install --enable-tests
script:
- cabal test
The issue with this is that it runs the test-suite twice, which is a
waste of resources and delays build reports. This was an oversight on
my
Hi,
I just released the first version of a package that provide new
additions to base for older versions of base [2]. So far the following
is covered:
readMaybe
readEither
lookupEnv
getExecutablePath
Source is on GitHub [2]; patches welcome ;)
Cheers,
Simon
[1]
On Fri, Nov 30, 2012 at 02:32:12PM +0100, dag.odenh...@gmail.com wrote:
Adding could be useful.
Yes, patch is welcome ;)
Cheers,
Simon
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Sounds like a bug, -fpedantic-bottoms should work here. Please open a
ticket.
done [1].
[1] http://hackage.haskell.org/trac/ghc/ticket/7411
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
Nice! Thanks! I'll have a go with it today or tomorrow.
There is not much yet. Have a look at the specs [1] to see what
currently works.
Cheers,
Simon
[1] https://github.com/sol/v8/tree/master/test/Foreign/JavaScript
___
Haskell-Cafe mailing list
Did you try -fpedantic-bottoms?
I just tried. The exception (or seq?) is still optimized away.
Here is what I tried:
-- file Foo.hs
import Control.Exception
import Control.DeepSeq
main = evaluate (('a' : undefined) `deepseq` return () :: IO ())
$ ghc -fforce-recomp
On Mon, Nov 12, 2012 at 07:21:06PM +, gra...@fatlazycat.com wrote:
Hi,
Trying to find some good docs on QuickCheck, if anyone has one ?
Been scanning what I can find, but a question.
What would be the best way to generate two different/distinct integers ?
I would use Quickcheck's
Out of curiosity: wouldn't it make more sense to focus on the
other direction (calling Haskell from V8)? Roughly like:
I guess it really depends what you are after. If you want to cabalize
existing JS libs, then I think bindings to V8 make perfect sense ;)
Cheers,
Simon
Hi,
I've looked around with no success… this surprises me actually. Has
anyone embedded SpiderMonkey, V8, or any other relatively decent
JavaScript interpreters in GHC (using the FFI)?
I just started something [1].
Cheers,
Simon
[1] https://github.com/sol/v8
Hi Edward,
thanks a lot for your reply.
rnf can be thought of a function which produces a thunk (for unit)
which, when forced, fully evaluates the function. With this in hand,
it's pretty clear how to use evaluate to enforce ordering:
evaluate (rnf ('a': throw exceptionA))
So if I
Hi,
I'm puzzled whether it is feasible to use existing NFData instances for
exception ordering.
Here is some code that won't work:
return $!! 'a' : throw exceptionA
throwIO exceptionB
Here GHC makes a non-deterministic choice between exceptionA and
exceptionB. The reason is that the
The Changelog says:
ghc 7.0.4 - 7.4.2
I think this should be:
ghc 7.4.1 - 7.4.2
Cheers,
Simon
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
The Changelog says:
ghc 7.0.4 - 7.4.2
I think this should be:
ghc 7.4.1 - 7.4.2
Cheers,
Simon
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Sun, Oct 07, 2012 at 09:09:07PM +0300, Roman Cheplyaka wrote:
* Simon Hengel s...@typeful.net [2012-10-07 15:45:21+0200]
On Fri, Oct 05, 2012 at 05:17:18PM +0300, Roman Cheplyaka wrote:
I can do that indeed, and I guess I could reimplement everything I have
at the moment on top
On Fri, Oct 05, 2012 at 05:17:18PM +0300, Roman Cheplyaka wrote:
I can do that indeed, and I guess I could reimplement everything I have
at the moment on top of HUnit.
However, an important part of functionality isn't there at the moment —
golden file management. You should be able to say,
Hi,
I am glad to announce the first public release of
test-framework-golden — a golden testing library.
Nice!
The library is integrated with test-framework, so you can use golden
tests in addition to SmallCheck/QuickCheck/HUnit tests.
I would suggest to rename the modules to
My justification (which you may or may not buy) is that, unlike, say,
Test.Framework.Providers.HUnit, this is not an adaptation of an existing
testing library to test-framework, but is a new library that just
happens to use test-framework. So it's more like Test.HUnit, although it
already
1. It's hard to guess at the moment how a good interface to the pure
golden part should look like.
Maybe just produce HUnit assertions, e.g.:
goldenVsFile :: FilePath - FilePath - IO () - Assertion
That way it works with plain HUnit
main = runTestTT $ TestLabel someAction produce
Hi,
Is there any better solution to organize tests in Haskell?
(Disclaimer: I'm the maintainer of Hspec ;)
If you use Hspec[1] for testing, you do not have to assemble your
individual tests manually into a test suit; hspec-discover[2] takes care
of that.
There is no comprehensive user's guide
Of course others are still able to import your Internal modules
That is not necessarily true. For libraries, you can list internal
modules as other-modules (in contrast to exposed-modules) in you Cabal
file. That way they are not part of the public interface of your
library.
However, that
On Sun, Sep 23, 2012 at 06:11:59PM +0200, Heinrich Apfelmus wrote:
Simon Hengel wrote:
Of course others are still able to import your Internal modules
That is not necessarily true. For libraries, you can list internal
modules as other-modules (in contrast to exposed-modules) in you Cabal
On Sun, Sep 23, 2012 at 04:10:56PM +0200, Jan Stolarek wrote:
I don't mind sacrificing encapsulation within the package itself. If
it works for project as big as Yesod it should work for me.
Yesod uses the CPP solution, too (e.g. [1]).
Cheers,
Simon
[1]
On Sat, Sep 08, 2012 at 09:19:08AM +1000, Ivan Lazar Miljenovic wrote:
More seriously, it seems there's an error building even 2.12.0 with
GHC 7.6; is that correct?
A functional version of Haddock 2.12.0 comes with GHC 7.6.1. This build
error only affects you, if you want to use the Haddock
On Wed, Sep 05, 2012 at 08:40:37PM +0100, Niklas Hambüchen wrote:
Is it possible to use inlined monospaced font in Haddock that does *not*
replace and to links and does *not* link to Haskell functions (like
@ and ' and and ` do)?
Have you tried to escape stuff within @. e.g.:
@\foo\@
On Wed, Sep 05, 2012 at 08:53:26PM +0100, Niklas Hambüchen wrote:
OK, but how to prevent it from linking to foo if I have a function foo
in my module?
Hmm, I'm not sure if I understand the problem. Can you give a minimal
example?
Cheers,
Simon
___
On Wed, Sep 05, 2012 at 09:11:47PM +0100, Niklas Hambüchen wrote:
When you write:
-- | This function returns the string @hello@
and you have a function called hello in scope, haddock will hyperlink
the the above hello to that function, which is confusing if your
monospace string has
On Mon, Aug 13, 2012 at 03:20:53PM +, Philip Holzenspies wrote:
I see some value in your proposal to replace GHC's unlit, mainly in
terms of setting a common standard. Personally, I'd still feel more
comfortable if that proposed standard would be developed as a Hackage
package, so
On Tue, Aug 14, 2012 at 03:47:18PM +0200, Christian Maeder wrote:
Am 12.08.2012 21:57, schrieb Ian Lynagh:
We are pleased to announce the first release candidate for GHC 7.6.1:
http://www.haskell.org/ghc/dist/7.6.1-rc1/
This includes the source tarball, installers for 32bit and
On Mon, Aug 13, 2012 at 08:45:51AM +, Philip Holzenspies wrote:
However, it's a bit of an overspec'd package to link into the
compiler, don't you think?
I did not mean to modify the Compiler. Unliting is done by an
external program. This already allows you to customize unliting
On Mon, Aug 13, 2012 at 11:02:59AM +, Philip Holzenspies wrote:
My proposal, however, is to replace the external unlit
..
by code *inside* GHC.
What is the benefit of doing so?
Cheers,
Simon
___
Glasgow-haskell-users mailing list
Hi Philip,
On Mon, Aug 13, 2012 at 12:57:44PM +, Philip Holzenspies wrote:
What is the benefit of doing so?
- Simpler build environment
- Easier to understand interaction and bugs resulting from them (viz.
[1], [2]), because the interactions happen in the same domain
- (as
Hi,
On Thu, Aug 09, 2012 at 12:00:44PM +, Philip Holzenspies wrote:
Dear GHC-ers,
A little while ago, I submitted a new feature request on the Trac. I'm
more than happy to build this myself, but I would like to get it right
the first time, so I'm looking for comments from developers and
On Thu, Aug 09, 2012 at 01:07:10PM +, Philip Holzenspies wrote:
I have looked at pandoc and I use it for quite a few things.
Just to clarify, I was not talking about pandoc, but pandoc-unlit (which
uses pandoc to unlit Markdown, see the README [1]).
However, it's a bit of an overspec'd
I guess both items could be improved upon by extending GHCi to provide
an additional `:def` facility tailored to Haskell symbols allowing to
pass more meta-information (such as package and module information) into
the resulting command string... would something like that have any
chance of
On Wed, Aug 08, 2012 at 12:22:39PM -0400, David Feuer wrote:
Changing scoping rules based on whether things are right next to each
other? No thanks.
Would expanding each let-less binding to a separate let feel more
sound to you?
Cheers,
Simon
___
I've been wondering if there have been attempts to provide some
library/API or similiar facility (other than pointing your web-browser
to the static Haddock HTML report) for looking up Haddock comments
associated with Haskell symbols?
As an obvious application: When coding in dynamic
On Fri, Jul 20, 2012 at 10:02:18AM +0100, Ross Paterson wrote:
On Fri, Jul 20, 2012 at 09:34:16AM +0100, Simon Hengel wrote:
Hi Ross,
can you fix this on Hackage? My suggested solution is to again just
remove the test-suite sections from the cabal file, if that is fine with
Richard
On Mon, Jul 23, 2012 at 12:51:32PM -0500, Stephen Paul Weber wrote:
Currently you would have to do the upgrade manually, as `cabal-install
cabal-install` won't work (or alternatively edit your local
~/.cabl/packages/hackage.haskell.org/00-index.tar).
Pending a fix on hackage (hopefully)
I have an outstanding question - What's the second parameter of the
parse function really for?
It's used to refer to the source file on parse errors.
Cheers,
Simon
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hi Ross,
can you fix this on Hackage? My suggested solution is to again just
remove the test-suite sections from the cabal file, if that is fine with
Richard.
The current situation is unfortunate, as it breaks almost all installs
from Hackage with cabal-install 0.10.2 / Cabal 1.10.1.0, e.g. you
Upgrading to Cabal-1.10.2.0 (or cabal-install-0.14.0 with
Cabal-1.14.0) should fix the problem.
Currently you would have to do the upgrade manually, as `cabal-install
cabal-install` won't work (or alternatively edit your local
~/.cabl/packages/hackage.haskell.org/00-index.tar).
See my other
On Wed, Jul 18, 2012 at 05:51:51PM -0600, Richard G. wrote:
What's the best way to fix this? I can see two options:
- Move the test stanzas to a different Cabal file, allowing users to
perform the tests with a little fiddling.
- Remove the conditional statements from the test stanzas, which
On Thu, Jul 19, 2012 at 06:45:05PM +0530, Sai Hemanth K wrote:
gettext = (many1 $ noneOf ) = (return . Body)
You can simplify this to:
import Control.Applicative hiding ((|))
gettext = Body $ many1 (noneOf )
And some of your other parsers can be simplified as well:
innerXML =
gettext = Body $ many1 (noneOf )
Note that this is the same as:
gettext = Body `fmap` many1 (noneOf )
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Thu, Jul 19, 2012 at 03:34:47PM +0200, Simon Hengel wrote:
openTag :: Parser String
openTag = char '' * many (noneOf ) * char ''
endTag :: String - Parser String
endTag str = string / * string str * char ''
Well yes, modified to what Christian Maeder just suggested
CCing: Ross Paterson and Richard G.
On Wed, Jul 18, 2012 at 05:54:44PM +0200, Martijn Schrage wrote:
On 18-07-12 17:37, Erik Hesselink wrote:
Hi Martijn,
Yes, upgrading will obviously fix things (we do use 0.14 on our
development machines)
Well, to me it wasn't entirely obvious that
Hi,
hspec-1.3.0 is out [1].
This release comes with two major new features:
- BDD-style combinators to make assertions [2]
- Automatic test discovery [3]
Test.Hspec now exports parts of the monadic API and the new BDD-style
combinators. You can use Test.Hspec.Core as a drop-in replacement
First: the web page I cite above describes the interface that the test
binary must support to work with cabal, specifically w.r.t. the binary's
exit code. Your test suites likely already fit this model. However, if
you are using an old version of QuickCheck or HUnit, your executable may
not
Hi Jonathan,
I'm seeing crazy amounts of slowdown in a ghci session after just a few
executions of :r (reload). Using :set +r (revert top-level bindings)
doesn't seem to help.
What version of ghc are you using?
Cheers,
Simon
___
Haskell-Cafe
After glancing through the haddock documentation and some googling, I
can't tell if there's a supported
way to link to a section heading in haddock documentation. Is there?
There are several things that could be of interest.
- There is support for named anchors [1]. I guess this is your
ghci 3^40 `mod` 3 :: Int
2
Cheers,
Simon
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi,
I'm experimenting with a preprocessor to automatically generate test
drivers[1]. The result depends on the existence of other files on the
disk. When files are added or removed, the test driver has to be
regenerated.
Ideally ghc would just always recompile that single file (akin to make's
Hi Etienne,
thanks for your reply.
You can use Template Haskell's addDependentFile to register a
dependency on external files.
http://hackage.haskell.org/packages/archive/template-haskell/2.7.0.0/doc/html/Language-Haskell-TH-Syntax.html#v:addDependentFile
That's interesting. But from what
Hi,
I'm glad to announce a new release of hspec[1]. Detailed release notes
are at [2]. Introductory documentation is at [3].
Cheers,
Simon
[1] http://hackage.haskell.org/package/hspec-1.1.0
[2] https://github.com/hspec/hspec/blob/master/CHANGES.markdown
[3] http://hspec.github.com/
Hi Heinrich,
the Munich Haskell Meeting is glad to announce a local one day
Hackathon in Munich. It will take place the 12th of May 2012 from
10am to 6pm. Please checkout the details at:
I'll join.
BTW: Any reason why we would not want to put this on the wiki? And can
we create an IRC
Hi Graham,
Or is there a better way just to invoke specific functions prefixed
with case_ prop_ etc in the entire src/test directory of the cabal
build ?
I think this would be possible if we had GHC ticket #1475 implemented.
I just added a comment [1].
Cheers,
Simon
[1]
Hi,
I provide a relation between /package name/ and /latest version/ on
Hackage as both JSON and JSONP.
http://www.typeful.net/~tbot/hackage/
This are static files, and they are regenerated whenever new packages
are uploaded (with a delay of about one minute).
Two simple usage examples are
ghc --interactive now behaves different in regards to line numbers in
error messages than previous versions.
They are now incremented with each evaluated expression.
$ ghc --interactive -ignore-dot-ghci
Prelude foo
interactive:2:1: Not in scope: `foo'
Prelude bar
Hi,
I just uploaded a new version of Doctest that adds support for ghc-7.4.
http://hackage.haskell.org/package/doctest
Doctest now comes with it's own parser and does not depend on Haddock
anymore. This is a quite involved change, and it may still have issues.
So pleases test, and do not be
If you want a simple framework, you can just use WAI directly.
If you want to give that a try, make sure to have a look at the README.
https://github.com/yesodweb/wai/blob/master/wai/README.md
Cheers,
Simon
___
Haskell-Cafe mailing list
Hi Joachim,
Regarding information about Debian sid, I'd like to understand the exact
use case. Can you elaborate on that?
one use case is developers who use distro packages and want to tell
others against what version of the platform they develop their code
against.
I'll not add that
Hi,
ghc --interactive now behaves different in regards to line numbers in
error messages than previous versions.
They are now incremented with each evaluated expression.
$ ghc --interactive -ignore-dot-ghci
Prelude foo
interactive:2:1: Not in scope: `foo'
Prelude bar
Do you see a way that you could incorporate distribution information?
I thought it would be nice to have a second table that correlates
Platform versions with distro releases, because I think this is relevant
to package authors.
Regarding information about Debian sid, I'd like to understand the
This includes both, packages that come with ghc and platform packages.
Source is on GitHub[1].
Nice. Any chance you could get the packages sorted alphabetically so
that it's easier to look things up directly?
Sure, now they are sorted alphabetically (case-insensitive).
Before it was more
Hi,
I compiled a chart that gives a side-by-side comparison of package
versions in various Haskell Platform releases.
http://sol.github.com/haskell-platform-versions-comparison-chart/
This includes both, packages that come with ghc and platform packages.
Source is on GitHub[1].
Cheers,
That's great! I think, it would be useful to include the version of the
shipped gcc (where applicable).
I think this only applies to windows**; and I'd tend to put it into a
separate table.
But yes, open a ticket or send me a pull request (preferred!).
Cheers,
Simon
** Not really suer
** Not really suer about Mac OS X, but I think it requires Xcode, can
someone confirm this.
Yes, the platform on Mac OS X requires Xcode, which includes gcc.
Thanks.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hi!
When writing library code that should work with both String and Text I
find my self repeatedly introducing classes like:
class ToString a where
toString :: a - String
class ToText a where
toText :: a - Text
(I use this with newtype wrapped value types backed by Text or
On Thu, Mar 08, 2012 at 11:00:34AM +0100, Christopher Done wrote:
On 8 March 2012 10:53, Simon Hengel s...@typeful.net wrote:
When writing library code that should work with both String and Text I
find my self repeatedly introducing classes like:
class ToString a where
toString
On Thu, Mar 08, 2012 at 12:18:56PM +0200, Roman Cheplyaka wrote:
If it's fine to depend on FunDeps, you can use ListLike.
http://hackage.haskell.org/package/ListLike
How would that help with toText?
Cheers,
Simon
___
Haskell-Cafe mailing list
On Thu, Mar 08, 2012 at 12:37:31PM +0100, Yves Parès wrote:
If you just need to go back and forth from String to Text, why do you need
to be generic? pack and unpack from Data.Text do the job.
Always going through String or Text may (depending on what your
underlying representation is) be less
On Thu, Mar 08, 2012 at 12:54:13PM +0200, Roman Cheplyaka wrote:
* Simon Hengel s...@typeful.net [2012-03-08 11:48:41+0100]
On Thu, Mar 08, 2012 at 12:18:56PM +0200, Roman Cheplyaka wrote:
If it's fine to depend on FunDeps, you can use ListLike.
http://hackage.haskell.org/package/ListLike
Is there any book on Java that approaches the language in a way
that doesn't make programmers impervious to FP and Haskell?
Two standard books are Effective Java (EJ) and Java Concurrency in
Practice (JCIP). They aren't introductory; but I think they are a good
idea if you want to use Java on
I just type runghc on everything and it seems like a lot of those
don't have the executable bit set, so I hadn't thought of that reason.
I think this is most eminent with Darcs repos. Darcs can't revision
file permissions (--set-scripts-executable tries to remedy that).
Cheers,
Simon
headMaybe :: [a] - Maybe a
Is this the same as Data.Maybe.maybeToList?
readMaybe :: Read a = String - Maybe a
This has been added to base recently [1].
Cheers,
Simon
[1]
https://github.com/ghc/packages-base/commit/0e1a02b96cfd03b8488e3ff4ce232466d6d5ca77
For testing I want to stub handles, performing all reads and writes in
memory (and in process, so no mmap). From looking at the documentation
of mkFileHandle[1], I think this should be possible. But it requires
some work. Is there already something out there?
Cheers,
Simon
[1]
There might still be some things in GHC.IO.Handle that assume FD
handles - I haven't tried it in a while.
For now I'm only using putStr and putStrLn on the handle, and that seems
to work. Thanks!
___
Haskell-Cafe mailing list
1 - 100 of 132 matches
Mail list logo