the ground up
On Mon, Sep 16, 2013 at 2:49 AM, Petr Pudlák petr@gmail.com
mailto:petr@gmail.com wrote:
Hi,
I'm playing with “plugins”, trying to evaluate a simple expression:
|import Control.Monad
import System.Eval.Haskell
main =do
let fExpr =1 + 2 :: Int
Hi,
I'm playing with plugins, trying to evaluate a simple expression:
|import Control.Monad
import System.Eval.Haskell
main =do
let fExpr =1 + 2 :: Int
r - eval_ fExpr [Prelude] [] [] []
::IO (Either [String] (Maybe Int))
case rof
Right (Just f) -do
alias for the new 'ParsecT'
constructor from 3.1.x.
On Fri, Sep 6, 2013 at 2:21 PM, Petr Pudlák petr@gmail.com
mailto:petr@gmail.com wrote:
Dne 09/05/2013 01:38 PM, Roman Cheplyaka napsal(a):
* Petr Pudlák petr@gmail.com mailto:petr@gmail.com
[2013-09-05 11
Dne 09/05/2013 01:38 PM, Roman Cheplyaka napsal(a):
* 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
Hi,
when thinking about this SO question
http://stackoverflow.com/q/18583416/1333025, I couldn't find a
combinator that allows a parser to /optionally/ fail without consuming
input, or consume input and return its value. So I'm suggesting such a
function:
|-- | @emptyIf p@ parses @p@ and
Dne 09/01/2013 09:13 PM, Harald Bögeholz napsal(a):
Am 31.08.13 14:35, schrieb Petr Pudlák:
One solution would be to fold over a specific semigroup instead of a
recursive function:
|import Data.Semigroup
import Data.Foldable(foldMap)
import Data.Maybe(maybeToList)
data Darle a =Darle
One solution would be to fold over a specific semigroup instead of a
recursive function:
|import Data.Semigroup
import Data.Foldable(foldMap)
import Data.Maybe(maybeToList)
data Darle a =Darle {getInit :: [a],getLast ::a }
deriving Show
instance Semigroup (Darle a)where
Or, if there are no such definitions, where would be a good place to add
them?
Petr
Dne 08/20/2013 06:55 PM, Petr Pudlák napsal(a):
Dear Haskellers,
are these monoids defined somewhere?
|import Control.Applicative
import Data.Monoid
newtype AppMonoid m a =AppMonoid (m a)
instance
Dear Haskellers,
are these monoids defined somewhere?
import Control.Applicativeimport Data.Monoid
newtype AppMonoid m a = AppMonoid (m a)instance (Monoid a, Applicative
m) = Monoid (AppMonoid m a) where
mempty = AppMonoid $ pure mempty
mappend (AppMonoid x) (AppMonoid y) = AppMonoid $
Dear Haskellers,
I wanted to write a small TLS application (connecting to IMAP over TLS)
and it seemed natural to use conduit for that. I found the
network-conduit-tls package, but then I realized it's meant only for
server applications. Is there something similar for client applications?
In Control.Arrow we have:
|leftApp ::ArrowApply a = a b c - a (Either b d) (Either c d)|
Any instance of |ArrowApply| can be made into an instance of
|ArrowChoice| by defining |left = leftApp|.
So why isn't |ArrowChoice| a parent of |ArrowApply|?
Best regards,
Petr
Dne 28.5.2013 10:54, Dominique Devriese napsal(a):
Hi all,
I often find myself needing the following definitions:
mapPair :: (a - b) - (c - d) - (a,c) - (b,d)
mapPair f g (x,y) = (f x, g y)
mapFst :: (a - b) - (a,c) - (b,c)
mapFst f = mapPair f id
mapSnd :: (b - c) - (a,b) -
Dne 28.5.2013 12:32, Johannes Waldmann napsal(a):
Jose A. Lopes jose.lopes at ist.utl.pt writes:
unionWith :: Ord k = (a - b - c) - Map k a - Map
k b - Map k c
what should be the result of
unionWith undefined (M.singleton False 42) (M.singleton True bar) ?
Perhaps the generalized
On 04/12/2013 12:49 PM, o...@okmij.org wrote:
One problem with such monad implementations is efficiency. Let's define
step :: (MonadPlus m) = Int - m Int
step i = choose [i, i + 1]
-- repeated application of step on 0:
stepN :: (Monad m) = Int - m (S.Set Int)
stepN
Some further ideas:
- Make the periodic maintainership reminders optional. Every developer
would be able to choose if (s)he wishes to receive them or not. I believe
many would choose to receive them.
- Maintain the last date the maintainership has been verified - either by
an upload of a new
2013/5/6 Tillmann Rendel ren...@informatik.uni-marburg.de
Petr Pudlák wrote:
-- Forwarded message --
From: *Niklas Hambüchen* m...@nh2.me mailto:m...@nh2.me
Date: 2013/5/4
...
I would even be happy with newhackage sending every package
maintainer
Hi,
on another thread there was a suggestion which perhaps went unnoticed by
most:
-- Forwarded message --
From: Niklas Hambüchen m...@nh2.me
Date: 2013/5/4
...
I would even be happy with newhackage sending every package maintainer a
quarterly question Would you still call
Doug Burke dburke...@gmail.com
On May 5, 2013 7:25 AM, Petr Pudlák petr@gmail.com wrote:
Hi,
on another thread there was a suggestion which perhaps went unnoticed by
most:
-- Forwarded message --
From: Niklas Hambüchen m...@nh2.me
Date: 2013/5/4
...
I
Hi,
It seems that during the recent suggestions about what markup to choose
(Markdown, Creole, Asciidoc, etc.), we've forgotten about one of the goals
that seem very important to me for Haskell: the ability to write *math
formulas*. I have experienced on StackExchange that just adding MathJAX to
Hi Adam,
very nice idea. As the others, I'm curious why you chose to implement SORF
in favor of the other ideas?
I just read the SORF proposal, and I'm a bit concerned about what error
messages would GHC issue when someone would type incorrect code involving
such records. Currently Haskell's
I tested it on GHC 6.12.1, which wasn't affected by the recent ackermann
bug, but still it leaks memory.
Petr Pudlak
2013/4/22 Clark Gaebel cgae...@uwaterloo.ca
I don't have a copy of GHC HEAD handy, and don't have the time to set up
the ecosystem myself to test this one bug.
Would someone
Hi,
is there a Haskell library for defining and working with algebraic
structures such as groups, rings, fields, finite fields, vector spaces or
modules? I found only several vector-related libraries, but they were all
only over the field of real numbers (Double) and defined only vector
spaces,
Hi tom,
I had problems installing version 0.1.2.1 on GHC 7.4.1:
Resolving dependencies...
Downloading rematch-0.1.2.1...
Configuring rematch-0.1.2.1...
Building rematch-0.1.2.1...
Preprocessing library rematch-0.1.2.1...
[1 of 4] Compiling Control.Rematch.Formatting (
2013/4/16 Ross Paterson r.pater...@city.ac.uk
On Tue, Apr 16, 2013 at 10:17:48AM +0100, Tom Crayford wrote:
The core API is very simple:
data Matcher a = Matcher {
match :: a - Bool
-- ^ A function that returns True if the matcher should pass, False if
it
should fail
,
One problem with such monad implementations is efficiency. Let's define
step :: (MonadPlus m) = Int - m Int
step i = choose [i, i + 1]
-- repeated application of step on 0:
stepN :: (Monad m) = Int - m (S.Set Int)
stepN = runSet . f
where
f 0 = return 0
Hi,
I also support the idea of having Markdown for Haddock. Using some well
established markup language would make Haddock much easier to adopt and use.
While I like the idea of allowing any markup language (let's say supported
by Pandoc) and freedom it gives to developers, it also has also
Hi Kashyap,
you could also use iteratees or conduits for a task like that. The beauty
of such libraries is that they can ensure that a resource is always
properly disposed of. See this simple example:
https://gist.github.com/anonymous/5183107
It prints the first line of each file given as an
Dear Haskellers,
b) A related suggestion would be the addition of an
irrefutable swap, (swap'?), defined as
swap ~(a,b) = (b,a), and its addition to Prelude for
the same reasons.
If I define a function that matches on a single-constructor data type, such
as (,), is
2013/2/25 Michael Snoyman mich...@snoyman.com
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 approach versus introducing a
single
Dear Haskellers,
while playing with folds and trying to implement `!!` by folding, I came to
the conclusion that:
- `foldr` is unsuitable because it counts the elements from the end, while
`!!` needs counting from the start (and it's not tail recursive).
- `foldl` is also unsuitable, because it
Dear Haskellers,
while playing with folds and trying to implement `!!` by folding, I came to
the conclusion that:
- `foldr` is unsuitable because it counts the elements from the end, while
`!!` needs counting from the start (and it's not tail recursive).
- `foldl` is also unsuitable, because it
Thanks Roman and Andres for the tip. I knew the trick with accumulating a
function, but I had never imagined it could work so efficiently. I thought
the problem with using foldr would be that the function would be neither
tail recursive nor efficient and so I hadn't even tried. Apparently that
was
2013/2/11 Ertugrul Söylemez e...@ertes.de
Petr Pudlák petr@gmail.com wrote:
class Arrow a = ArrowDelay a where
delay :: a b c - a () (b - c)
force :: Arrow a = a () (b - c) - a b c
Perhaps it would be convenient to have ArrowDelay and the
corresponding
2013/2/11 Ertugrul Söylemez e...@ertes.de
...
## Applicative
One of the main bottlenecks of arrows is the heavy tuple handling, but
most (if not all) arrows form a family of applicative functors. I
noticed a huge speedup by moving from arrow style to applicative style
where possible:
2013/2/9 Conal Elliott co...@conal.net
On Thu, Feb 7, 2013 at 5:41 PM, Ross Paterson r...@soi.city.ac.uk wrote:
It's hard to imagine arrow notation without arr (or at least
contravariance in the first argument of the arrow) because forming
expressions using the local environment is so
Dear Haskellers,
Looking at Control.Monad:
http://hackage.haskell.org/packages/archive/base/4.6.0.0/doc/html/Control-Monad.html
I see: Stability provisional. I checked some older versions and it's the
same. This feel somewhat unsettling - if Control.Monad is provisional, do
we have any stable
Dear haskellers,
over the time I've read many funny or inspiring quotes related to Haskell,
but I forgot them later. For example I vaguely remember:
- What I really like about Haskell: It's completely unlike PHP.
- To learn Haskell your brain will have to get seriously rewired.
Does anybody
37 matches
Mail list logo