(.)/compose is consistent with (+)/sum, (*)/product, ()/and, etc.
(to) compose is a verb. composition would be consistent with sum
and product. and doesn't fit, though.
Sebastian
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
tag. This avoids the infinite recursion and will work the way you
want without needing stopRecursion.
On Thu, Sep 20, 2012 at 3:00 PM, Sebastian Fischer m...@sebfisch.de wrote:
Hello,
the following program demonstrates that arguments in Heist templates
are sometimes not substituted
Hello,
the following program demonstrates that arguments in Heist templates
are sometimes not substituted in presence of splices:
{-# LANGUAGE OverloadedStrings #-}
import Blaze.ByteString.Builder (toByteString)
import qualified Data.ByteString.Char8as BS
import
On Mon, Feb 20, 2012 at 7:42 PM, Roman Cheplyaka r...@ro-che.info wrote:
Is there any other interpretation in which the Reader monad obeys the
laws?
If selective strictness (the seq combinator) would exclude function
types, the difference between undefined and \_ - undefined could not
On Sun, Jan 22, 2012 at 5:25 PM, David Barbour dmbarb...@gmail.com wrote:
The laws for monads only apply to actual values and combinators of the monad
algebra
You seem to argue that, even in a lazy language like Haskell,
equational laws should be considered only for values, as if they where
On Sat, Jan 21, 2012 at 8:09 PM, David Barbour dmbarb...@gmail.com wrote:
In any case, I think the monad identity concept messed up. The property:
return x = f = f x
Logically only has meaning when `=` applies to values in the domain.
`undefined` is not a value in the domain.
We can
On Sat, Dec 31, 2011 at 4:09 PM, Kevin Quick qu...@sparq.org wrote:
onVarElem :: forall a . (Show a) = (Maybe a - String) - Var - String
onVarElem f (V1 x) = f x
onVarElem f (V2 x) = f x
main = putStrLn . onVarElem elemStr $ test
This is probably a better design, but still fails for the
Hello Heinrich,
On Tue, Dec 27, 2011 at 1:09 PM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Sebastian Fischer wrote:
all functions defined in terms of `ListTo` and `interpret`
are spine strict - they return a result only after consuming all input
list
constructors.
Indeed
On Tue, Dec 27, 2011 at 5:35 AM, Eugene Kirpichov ekirpic...@gmail.comwrote:
I wonder if now this datatype of yours is isomorphic to StreamSummary b
r - StreamSummary a r.
Not sure what you mean here. StreamSummary seems to be the same as
ListConsumer but I don't see how functions from
On Sun, Dec 25, 2011 at 11:25 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Your StreamSummary type has a really nice interpretation: it's a
reification of case expressions [on lists].
nice observation!
For instance, consider the following simple function from lists to
2011/12/26 Eugene Kirpichov ekirpic...@gmail.com
Whoa. Sebastian, you're my hero — I've been struggling with defining Arrow
for ListTransformer for a substantial time without success, and here you
got it, dramatically simpler than I thought it could be done (I was using
explicit queues).
On Thu, Dec 15, 2011 at 9:13 AM, Gregory Crosswhite
gcrosswh...@gmail.comwrote:
To quote Ross Paterson's proposals:
instance Alternative [] where
...
some [] = []
some (x:xs) = repeat (repeat x)
many [] = [[]]
many (x:xs) = repeat (repeat x)
Isn't this instance
Hi Simon,
On Tue, Sep 13, 2011 at 12:13 AM, Simon Michael si...@joyful.com wrote:
Is that because of = auto ?
I'm not sure. The feature was added in version 0.2 and is described in
issue 333:
http://code.google.com/p/ndmitchell/issues/detail?id=333
The description does not mention = auto.
Hi Simon,
while it is not possible to reuse the definitions of common fields
themselves, their *descriptions* need to be given only once. Not sure
if you are already sharing descriptions or if it helps you saving a
few more lines. See
Hi Max,
thanks for you proposal!
Using the Applicative methods to optimise do desugaring is still
possible, it's just not that easy to have that weaken the generated
constraint from Monad to Applicative since only degenerate programs
like this one won't use a Monad method:
Is this still
, 2011 at 5:37 PM, Sebastian Fischer fisc...@nii.ac.jp wrote:
Hi Max,
thanks for you proposal!
Using the Applicative methods to optimise do desugaring is still
possible, it's just not that easy to have that weaken the generated
constraint from Monad to Applicative since only degenerate programs
On Mon, Sep 5, 2011 at 10:19 PM, Thomas Schilling
nomin...@googlemail.comwrote:
a = \p - f $ b -- 'free p' and 'free b' disjoint
--
((\p - f) $ a) * b
Will there also be an optimisation for some sort of simple patterns? I.e.,
where we could rewrite this to:
liftA2 (\pa pb - f ...) a
On Sun, Sep 4, 2011 at 11:34 AM, Daniel Peebles pumpkin...@gmail.com wrote:
I was wondering what people thought of a smarter do notation.
I'd support it (for both do notation and monad comprehensions) once
Applicative is a superclass of Monad.
To me it looks light a slight complication for an
These are important questions. I think there is a trade-off between
supporting many cases and having a simple desugaring. We should find a
sweet-spot where the desugaring is reasonably simple and covers most
idiomatic cases.
So I guess it's possible to detect the pattern:
do x1 - foo1; ...;
On Wed, Aug 31, 2011 at 4:21 PM, Simon Peyton-Jones
simo...@microsoft.com wrote:
There seems to be a lot of support for Option 3... but what about Option 2
(ie pre-empt but give a warning)?
I notice that the idea to only issue a warning if the explicit and
implicit instances are in different
On Wed, Aug 31, 2011 at 6:13 AM, Ryan Ingram ryani.s...@gmail.com wrote:
technically it violates 'fmap id' == 'id' [...]
If you add this FList law, though, you're OK:
runFList fl as = runFList fl [] ++ as
I think the idea of functional lists is that the monoids of 'lists'
and 'functions on
toFList [] = id
toFList (xs++ys) = toFList xs . toFList ys
toList id = []
toList (f . g) = toList f ++ toList g
These laws do not *define* the isomorphisms because their behavior on
singletons is not fixed. Combining them with laws using a 'point'
function for functional lists
On Mon, Aug 29, 2011 at 6:21 AM, Bas van Dijk v.dijk@gmail.com wrote:
Won't option 1 Reject this as a duplicate instance declaration, which
indeed it is. conflict with design goal 1: a class C can be
re-factored into a class C with a superclass S, without disturbing any
clients?
If yes,
On Sun, Aug 28, 2011 at 12:41 AM, Sönke Hahn sh...@cs.tu-berlin.de wrote:
I was wondering which
type could be an instance of Pointed, but not of Applicative. But I can't
think of one. Any ideas?
Functional lists:
type FList a = [a] - [a]
they have a Monoid instance for empty and append,
On Mon, Aug 29, 2011 at 12:24 PM, Maciej Marcin Piechotka
uzytkown...@gmail.com wrote:
instance Functor FList where
f `fmap` FList g = ...?
Yes, Functor is also one of the classes that can only be implemented
by converting to ordinary lists (I think).
So FList could only be made an
This is interesting.
I think using a slightly different notation would avoid confusion with
matching on tuples. Why not just write
docase a,b,c of
instead of
docase (a,b,c) of
?
Sebastian
On Thu, Aug 25, 2011 at 9:48 PM, Tomas Petricek
tomas.petri...@gmail.com wrote:
Hello,!
at
On Wed, Aug 24, 2011 at 3:47 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
I was just trying to remember some of the tricks Daniel Peebles (aka
{co}pumpkin) used to do in #haskell with Data.List.genericLength.
I've never really used ListLike, but was just trying to guess why the
On Wed, Aug 24, 2011 at 10:47 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
On 24 August 2011 11:10, bob zhang bobzhang1...@gmail.com wrote:
Hi, John, there is a space leak problem in ListLike typeclass,
in the method genericLength
calclen !accum cl =
calclen accum cl =
I
I'm glad to announce the alpha release of TKYProf.
This looks useful, thanks! I'll try it out and let you know if I have
problems.
Installing with GHC 7.2, I needed to relax some upper bounds in cabal files
of dependencies (maintainers CC'ed).
- email-validate and ranges specify base 4.4
Hello Alexey,
sorry for my slow response.
On Thu, Aug 4, 2011 at 7:10 AM, Alexey Khudyakov
alexey.sklad...@gmail.comwrote:
On 02.08.2011 08:16, Sebastian Fischer wrote:
Data.Foldable also provides the monoidal fold function foldMap. It is
left unspecified whether the elements
I can easily understand how + can be built but am having trouble with
building ? (zero or one).
If there is a regular expression e for the empty word, one can define ? as
a? = e | a
If there is a regular expression o that never matches one can define e as
e = o*
If there are
[switched to Cafe]
On Wed, Aug 10, 2011 at 11:46 PM, Henning Thielemann
lemm...@henning-thielemann.de wrote:
On Wed, 10 Aug 2011, Paterson, Ross wrote:
Yet another restructuring of the Prelude numeric classes on algebraic
lines, proposed for a revision of the Haskell Prelude:
here is a reduced program that still segfaults:
{-# LANGUAGE Arrows #-}
import Control.Arrow
main :: IO ()
main = print segfault
segfault :: [()]
segfault = anythingYouWant ()
anythingYouWant :: a
anythingYouWant = testB False (const ()) ()
testB :: ArrowChoice arrow
= bool - arrow ()
I created a ticket with a slightly further simplified program:
http://hackage.haskell.org/trac/ghc/ticket/5380
On Fri, Aug 5, 2011 at 10:10 AM, Sebastian Fischer fisc...@nii.ac.jpwrote:
here is a reduced program that still segfaults:
{-# LANGUAGE Arrows #-}
import Control.Arrow
main :: IO
Hello Cafe,
left- and rightwards folds come in strict and lazy variants foldl/fold' and
foldr/foldr' which makes sense because strict versions sometimes use less
stack space while lazy versions support infinite data. For example,
head (foldr (:) [] [1..])
returns in an instant while
http://www.cs.ox.ac.uk/jeremy.gibbons/publications/iterator.pdf
Interesting. However I don't understand why the instance in Section
5.5 is not already forbidden by the purity law
traverse pure = pure
and a 'no duplication' constraint would be necessary. For example:
traverse Id
What am I missing?
I suspect you missed the use of const
Doh! I completely overlooked that it's about duplication of *effects*.
Thanks,
Sebastian
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
because list is a (the?) free monoid.
Yes, all free monoids are isomorphic (to lists).
Sebastian
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
http://www.shirky.com/writings/ontology_overrated.html
On Sat, Jun 4, 2011 at 10:02 AM, Tillmann Vogt
tillmann.v...@rwth-aachen.de wrote:
Hi,
There are some categories on Hackage that have become so large that it is
hard to find something, i.e. Data(414 packages) and Graphics (191). Thats
As part of my research fellowship at the National Institute of
Informatics in Tokyo, I announce the availability of student
internships for up to three months between July and September 2011.
Qualified applicants are enrolled in a Masters or Phd program, have a
firm grasp of the Haskell
As part of my research fellowship at the National Institute of
Informatics in Tokyo, I announce the availability of student
internships for up to three months between July and September 2011.
Qualified applicants are enrolled in a Masters or Phd program, have a
firm grasp of the Haskell
On Thu, May 19, 2011 at 7:29 PM, KC kc1...@gmail.com wrote:
For Euler 25; What is the first term in the Fibonacci sequence to
contain 1000 digits?; the following seems to work.
-- For number of digits being 5 or more.
fibNdigits :: Int - Int
fibNdigits nDigits = floor (((fromIntegral
On Thu, Apr 14, 2011 at 8:02 PM, Luke Palmer lrpal...@gmail.com wrote:
For this problem, it is too slow to memoize everything; you have to use a
bounded memo table. That's why I use a combinator-based memo approach as
opposed to the type-directed approach used in eg. MemoTrie. The memo table
Hi Dimitri,
When asking how to implement cache in Haskell I was hopping that there
exists some solution without using Data.Array, more functional approach,
if I may say so ...
Steven's second solution is purely functional. It uses so-called tries
to cache results instead of mutable arrays.
Hello Haskellers,
in parallel programs it is a common pattern to accumulate a list of
results in parallel using an associative operator. This can be seen as
a simple form of the map-reduce pattern where each element of the list
is mapped into a monoid before combining the results using `mconcat`.
2011/3/25 Thomas Schilling nomin...@googlemail.com:
unsafePerformIO traverses the stack to perform blackholing. It could
be that your code uses a deep stack and unsafePerformIO is repeatedly
traversing it. Just a guess, though.
Sounds reasonable. Here is a variant of the program without
Hi Richard,
On Thu, Mar 3, 2011 at 1:46 AM, Richard Senington sc06...@leeds.ac.ukwrote:
The file parsers are designed to process files coming out of the TSPLIB and
SATLIB
repositories. [...]
Since these are all related I was going to try to put them together into a
single
library and post
On Thu, Feb 17, 2011 at 4:57 PM, Max Bolingbroke batterseapo...@hotmail.com
wrote:
I think the problem is that the mtl1 Functor instances looked like:
instance Monad m = Functor (ReaderT e m) where
fmap = ...
But the mtl2/transformers instances look like:
instance Functor f = Functor
On Thu, Feb 17, 2011 at 11:32 AM, Evan Laforge qdun...@gmail.com wrote:
Or will there just be massive signature rewriting in the wake of mtl2?
I must admit I still don't understand your exact problem. Could you help me
with an example where using mtl2 requires an additional (Functor m)
On Mon, Feb 14, 2011 at 1:41 PM, John Meacham j...@repetae.net wrote:
Isn't this what data families (as opposed to type families) do?
On Tue, Feb 15, 2011 at 7:02 AM, Conal Elliott co...@conal.net wrote:
Yes, it's one things that data families do. Another is introducing *new*
data types
I've come across this a few times - In Haskell, once can prove the
correctness of the code - Is this true?
One way to prove the correctness of a program is to calculate it from its
specification. If the specification is also a Haskell program, equational
reasoning can be used to transform a
Hello,
I want to use the RULES pragma and cannot get my rules to fire. Here is a
simplified example of what I'm trying.
I define my own version of foldMap for lists:
fold :: Monoid m = (a - m) - [a] - m
fold f = foldr mappend mempty . map f
-- alternative, trying to avoid
Why don't the rules fire,
Because the 'match' is at the wrong type.
This was the correct hint, thanks!
what can I change such that they do,
Type signatures.
Initially, I thought that just leaving out the polymorphic signature should
fix the problem. But I think it cannot be fixed by
Hi Wren,
maybe Twilight STM is for you:
http://hackage.haskell.org/package/twilight-stm
Sebastian
On Sat, Feb 5, 2011 at 6:46 PM, wren ng thornton w...@freegeek.org wrote:
So I'm working on a project that uses STM to run a lot of things in
parallel without the headaches of locks. So far it's
Hi Max,
data M a = M { unM :: forall m. MonadPeelIO m = Reader.ReaderT () m a }
It seems clear that there should be a MonadPeelIO instance for M,
but I can't for the life of me figure it out.
Have you (or the big brains on Haskell-Cafe, who are CCed) come across
this before? Is there an
On Tue, Feb 1, 2011 at 9:23 PM, Ben Millwood hask...@benmachine.co.ukwrote:
On Tue, Feb 1, 2011 at 9:52 AM, Max Bolingbroke
batterseapo...@hotmail.com wrote:
Local declarations at module scope can be emulated using pattern
bindings:
(foo, bar) = (foo, bar)
where
foo = ..
On Sun, Jan 23, 2011 at 4:31 PM, Chung-chieh Shan
ccs...@post.harvard.eduwrote:
Maybe Text.Show.Pretty.parseValue in the pretty-show package can help?
That's what I was looking for, thanks!
On Sun, Jan 23, 2011 at 5:23 PM, Stephen Tetley stephen.tet...@gmail.com
wrote:
I don't think you
Hi Daryoush,
On Fri, Jan 21, 2011 at 7:52 PM, Daryoush Mehrtash dmehrt...@gmail.comwrote:
loop = MonadPlus m = m Bool
loop = loop
If we apply Just to loop as follows
test2 :: MonadPlus m = m (Maybe Bool)
test2 = loop = return . Just
the evaluation of test2 does not terminate
Hello,
I need a function and wonder whether I can copy some existing code so I
don't have to write it myself.
It should split a string into a list of strings:
splitAtTopLevelCommas :: String - [String]
I need something similar to `splitOn ,` from the Text package with the
property
sorry, forgot to cc cafe.
On Fri, Jan 21, 2011 at 7:12 PM, Sebastian Fischer fisc...@nii.ac.jpwrote:
Hi Daryoush,
On Fri, Jan 21, 2011 at 6:18 AM, Daryoush Mehrtash dmehrt...@gmail.comwrote:
I am having hard time understanding the following paragraph in Purely
functional Lazy non
Hi Kashyap,
Could someone please help me get a better understanding of the necessity of
monads complying with these laws?
Maybe it helps to write them in do-notation. Once written like this,
it becomes clear(er?) that do-notation would be much less intuitive if
the laws would not hold:
Left
On Sun, Jan 9, 2011 at 10:11 PM, Lennart Augustsson
lenn...@augustsson.netwrote:
That looks like it looses the efficiency of the underlying representation.
Yes, I don't think one can retain that cleanly without using restricted
monads to exclude things like
liftM ($42) (mplus (return
On Sun, Jan 9, 2011 at 6:53 AM, Lennart Augustsson
lenn...@augustsson.netwrote:
It so happens that you can make a set data type that is a Monad, but it's
not exactly the best possible sets.
module SetMonad where
newtype Set a = Set { unSet :: [a] }
Here is a version that also does not
On Fri, 2010-12-10 at 08:33 +, Simon Peyton-Jones wrote:
If there's a consensus that the behaviour is wrong, or at least
unexpected, would you like to make a reproducible test case and file a
ticket?
I took Erik's mail as indicator that the behaviour of GHCi is
inconsistent and
Hello,
according to
http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Monad.html
Control.Monad exports 20 Functor instance declarations in base-4.3.0.0.
However:
bash# ghc-pkg list | grep base
base-4.3.0.0
bash# ghci --version
The Glorious Glasgow Haskell
Hi Antoine,
On Thu, 2010-12-09 at 23:20 -0600, Antoine Latter wrote:
Are there any particular ones you're running into problems with?
Yes, I cannot find the instance for ((-) r).
Even if I import
Control.Monad
Control.Monad.Reader
Control.Applicative
Data.Functor
On Fri, 2010-12-10 at 14:35 +0900, Sebastian Fischer wrote:
Yes, I cannot find the Functor instance for ((-) r).
As the Applicative instance for ((-) r) depends on the Functor instance
I only needed to go through the imports of Control.Applicative to find
that the Functor instance of ((-) r
On Mon, 2010-11-22 at 14:48 +0800, Magicloud Magiclouds wrote:
(+) :: A - A - A
(+) a b =
A (elem1 a + elem1 b) (elem2 a + elem2 b) -- I got errors here, for
the (+) is ambiguous.
That's because (+) is implicitly imported from the Prelude. If you
import Prelude hiding ((+))
the error
On Thu, 2010-11-25 at 10:41 +0900, Hugo Pacheco wrote:
Would this be a desired feature for other people?
I'd like to have Haskell Type Constraints Unleashed
http://users.ugent.be/~tschrijv/Research/papers/constraint_families.pdf
which includes equality constraint synonyms.
Sebastian
On Nov 12, 2010, at 5:43 AM, Richard O'Keefe wrote:
A saucepan whose handle keeps falling off is defective,
I do not see TDNR as unambiguously defective as a loose saucepan handle.
The amount of time spent maintaining a program is much higher
than the amount of time spent creating it
On Nov 10, 2010, at 11:57 PM, Neil Brown wrote:
I wonder if special syntax is actually needed for this. How much of
the language would be broken by adopting the general rule: If the
only definitions of f are at the top-level or imported, find the
type of 'a' and the type of all the
I'm planning to write up a blog post about using list arrows for XML
processing.
Ok, I'll say tuned! Maybe a smaller example for the Haddock docs needs
less time.
Maybe this sounds weird on the Haskell mailing list, but at Silk[1]
we have a full implementation of (functional reactive)
to answer my own question:
On Nov 7, 2010, at 8:33 PM, Sebastian Fischer wrote:
Can you, for example, define a `perm` arrow that yields every
permutation of it's input? Monadic implementations look like they
need `=` but there may be another way..
A `perm` arrow can be defined
Hello,
I'm curious and go a bit off topic triggered by your statement:
On Nov 6, 2010, at 12:49 PM, rocon...@theorem.ca wrote:
An applicative functor morphism is a polymorphic function,
eta : forall a. A1 a - A2 a between two applicative functors A1 and
A2 that preserve pure and *
I
On Nov 4, 2010, at 3:48 PM, C K Kashyap wrote:
Also, any reference/suggestion on how I could go about using a state
machine to deal with the RFB protocol.
A simple way to model state machines is to use one function for each
state. Each function calls the functions corresponding to
On Nov 6, 2010, at 10:00 PM, Sebastiaan Visser wrote:
List arrows are a powerful tool when processing XML, building query
languages and lots of other domains that build on functions that
might return more than one value as their output.
Interesting. Do you plan to write some examples that
On Nov 6, 2010, at 8:22 AM, David Peixotto wrote:
To summarize, I found that it is possible to get LLVM to do this
transformation through a combination of tail-call elimination,
inlining,
induction variable optimization, and global value numbering.
Interesting. This approach requires `f`
Which proposal do you mean?
I referred to Christian's questions whether it is possible to generate
`ff` and `gg` from `f` and `g`. If `h` is similar to `g`, then `hh`
could reuse `ff` while with an inlining approach something like `ff`
would be duplicated.
I'm not sure something like
On Nov 4, 2010, at 2:07 PM, wren ng thornton wrote:
Besides, it's simple enough to just use the MonadLogic class and
switch between concrete types, if you need to test performance.
You may even try to use only `MonadPlus` to get more instances. The
only instances of `MonadLogic` are
Hi Gregory,
On Nov 2, 2010, at 9:27 AM, Gregory Crosswhite wrote:
I was thinking about using Curry, but it looks to me like the
language is dead and hasn't seen much activity for a few years.
The community is smaller than the Haskell community but the PAKCS
system is still actively
On Oct 30, 2010, at 9:15 PM, Henning Thielemann wrote:
To me it would make more sense if users could configure the colors
of links in their browsers, like they configure fonts and font sizes.
Most browsers support user style sheets: google.com/search?q=user+style
+sheet
Most people who
On Oct 30, 2010, at 2:30 PM, Mark Spezzano wrote:
If you use the type with Maybe Int like so:
sequence [Just 1, Nothing, Just 2]
then the result is Nothing.
Whereas sequence [Just 1, Just 2, Just 3] gives
Just [1, 2, 3]
Try
do x - Just 1
y - Nothing
z - Just 2
Maybe we can keep at least the docs without red links.
Pick the Classic style in the style menu. It will remember your
choice.
Sebastian
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi Max,
neat idea! Haskell supports laziness even on the type level ;)
I tried to play with your code but did not get very far. I quickly ran
into two problems.
On Oct 22, 2010, at 7:37 PM, Max Bolingbroke wrote:
The annoying part of this exercise is the the presence of a Force in
the
On Oct 24, 2010, at 8:52 AM, wren ng thornton wrote:
But then, how should we decide whether the additive or
multiplicative structure is more neutral?
On Oct 24, 2010, at 7:08 AM, Jacques Carette wrote:
People usually use additive notation for commutative monoids, and
multiplicative
On Oct 22, 2010, at 5:20 PM, Simon Peyton-Jones wrote:
I vote for this. In fact I've created a ticket for it.
http://hackage.haskell.org/trac/ghc/ticket/4426
+1 (I decided to prefer simplicity over convenience in this case)
Sebastian
___
Hi Simon,
thank you for your explanations. Now I understand why type variables
are quantified at the outermost position in function types.
My confusion was caused by implicit quantifications in data type
declarations. These are not (explicitly) mentioned in the
documentation that you
On Oct 21, 2010, at 9:58 PM, Simon Peyton-Jones wrote:
A implicit quantification point is
a) the type in a type signature f :: type, or
b) a type of form (context = type), that is not
enclosed by an explicit 'forall'
not quite:
foo :: forall a . a - (Ord b = b) - ()
On Oct 21, 2010, at 9:58 PM, Simon Peyton-Jones wrote:
So GHC's behaviour is probably about right, but the description is
wrong.
On Oct 21, 2010, at 11:14 PM, Sebastian Fischer wrote:
An implicit quantification point is
a) the type in a type signature f :: type or
b) a type
Hello,
GHC 6.12.3 allows to omit the explicit quantification of
higher-rank type variables using 'forall' in data types if they
appear in a type class context
{-# LANGUAGE RankNTypes #-}
data Foo = Foo (Eq a = a)
Is this implicit introduction of 'forall' intended? If it is, why
does it
On Sep 7, 2010, at 5:23 AM, wren ng thornton wrote:
In particular, one of the primary complaints against the Monad class
is precisely the fact that it *fails* to mention the Functor class
as a (transitive) dependency. Why should we believe that making unit
independent from fmap will fare
On Sep 6, 2010, at 12:23 PM, Johannes Waldmann wrote:
We have overloaded numerical literals (Num.fromInteger)
and we can overload string literals (IsString.fromString),
so how about using list syntax ( [], : )
for anything list-like (e.g., Data.Sequence)?
As lists of some type A represent
On Sep 6, 2010, at 1:57 PM, han wrote:
So the question is: Do you agree that Graphics.Rendering.OpenGL
actually should have been Graphics.OpenGL (or just OpenGL) for
wieldiness? If you don't, what is your reason? I would like to know.
Often, when this topic comes up, someone claims that
On Sep 6, 2010, at 1:47 PM, Stefan Holdermans wrote:
In general, it is kind of unfortunate that type classes and type
constructors share a namespace, even though there is no way to ever
mix them up.
Class and type names mix in im- and export lists. IIRC, this is the
reason for putting
Just because we don't have
a use now doesn't mean it might not be useful in the future.
I am suspicious about complicating a design for potential future
benefits.
However, difference lists provide an example of a type that support
Pointed more naturally than Applicative: the dlist package
[CC'ing maintainer of MonadRandom]
On Sep 3, 2010, at 1:59 AM, Thomas DuBuisson wrote:
data Key = Key {
encrypt :: B.ByteString - B.ByteString,
decrypt :: B.ByteString - B.ByteString,
keyLength :: BitLength,
serialize ::
On Sep 3, 2010, at 10:40 AM, Sebastian Fischer wrote:
An advantage of using a MonadRandom class would be that the
CryptoAPI would be independent of RandomGen or your new alternative.
One could define random monads based on either.
I was wrong. The MonadRandom class uses the Random class
On Aug 27, 2010, at 11:12 AM, Heinrich Apfelmus wrote:
Is it actually necessary to use a type class here? The situation is
very similar to
Luke Palmer. Haskell Antipattern: Existential Typeclass.
http://lukepalmer.wordpress.com/2010/01/24/
I suggest to use good old data types
data
On Sep 3, 2010, at 12:07 AM, Sebastian Fischer wrote:
Why not use
generateKeypair :: MonadRandom m = BitLength - m (Maybe (p,p))
Or if the choice to generate keys or not should solely depend on the
BitLength (and not on the random generator):
generateKeypair :: MonadRandom m
does anybody know of anything on Hackage for testing whether two
values are approximately equal?
http://hackage.haskell.org/package/approximate-equality
--
Underestimating the novelty of the future is a time-honored tradition.
(D.G.)
___
1 - 100 of 255 matches
Mail list logo