To clarify in Bobs remark : while you're still learning Haskell and the
type system , things like lifted Num on functions can lead to some
potentially confusing type errors.
That said, it's absolutely doable, and can be a very nice / powerful tool
when used appropriately.
On Sunday, September 1,
On 08/31/2013 09:27 PM, Charlie Paul wrote:
I believe that this is what you want:
http://www.haskell.org/haskellwiki/Num_instance_for_functions
On Sat, Aug 31, 2013 at 10:01 PM, Christopher Howard
wrote:
The author seemed to be subtly mocking the idea. It seemed to be
suggesting that a Num i
On 01/09/13 04:27, Mateusz Kowalczyk wrote:
> It doesn't have to be 1-to-1 but the features have to be expressible in
> both: it's useless if we have different features with one syntax but not
> the other.
I don't find that useless. Markdown does not have definition lists, but
we use a normal list
On 13-09-01 02:02 AM, yi lu wrote:
I have noticed if *bar* is predefined or it is a number, it can be used
as arguments. But can other strings be used this way? Like in bash, we
can use *ping 127.0.0.1* where *127.0.0.1* is an argument.
Does Bash have a rich type system, like Haskell?
Does Has
On 13-09-01 02:41 AM, Mateusz Kowalczyk wrote:
It's a bit like asking whether you can do addition everywhere by just
typing the numbers to each other (no cheating and defining number
literals as functions ;) ).
To your horror, common math language does some of that.
When 3 and ½ are typed next
Not that I really want to encourage such a "stringly typed" practice, but
it wouldn't really be that much of a stretch.
* Use haskell-src-exts[0] and haskell-src-meta[1] to make a quasiquoter
that can parse Haskell syntax
* Use syb[2] or some other generics to find VarE and ConE expressions. In
o
Hi,
Hoogle is definitely not deprecated. The reason you can't yet search
all packages simultaneously is that it consumes too many resources -
the number of Haskell packages exploded at a time when I wasn't able
to spend enough time to allow Hoogle to keep up. It's definitely
something on the todo
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 {getInit :: [a],getLast ::a }
> deriv
Yes, that GHC ticket shows that this problem is well known.
Thank you.
On Fri, Aug 30, 2013 at 2:19 AM, Ben Lippmeier wrote:
>
> On 30/08/2013, at 2:38 AM, Daniel Díaz Casanueva wrote:
>
> > While hacking in one of my projects, one of my modules stopped to
> compile for apparently no reason. T
On 01/09/13 13:59, Niklas Hambüchen wrote:
> On 01/09/13 04:27, Mateusz Kowalczyk wrote:
>> It doesn't have to be 1-to-1 but the features have to be expressible in
>> both: it's useless if we have different features with one syntax but not
>> the other.
>
> I don't find that useless. Markdown does
Thanks!
You do a great job!
Adam Gundry wrote
>> Haskell doesn't allow classes to be polymorphic in the names of their
>> methods
Yes, still not ((
--
View this message in context:
http://haskell.1045720.n5.nabble.com/Proposal-Polymorphic-typeclass-and-Records-tp5735096p5735365.html
Sent fr
I think it is an old idea, but nevertheless.
Now we have next functions:
if (a :: Bool) then x else y
case b of
a1 :: Bool -> x1
a2 :: Bool -> x2
...
Let we have generic conditions for 'if' and 'case':
class Boolean a where
toBool :: a -> Bool
instance Boolean Bool where
toBool = id
in
I didn't test it, but you might want to look into the 'rebindable syntax'
extension and its 'ifThenElse' feature.
Nicolas
On Sep 2, 2013 12:51 AM, "Wvv" wrote:
> I think it is an old idea, but nevertheless.
> Now we have next functions:
>
> if (a :: Bool) then x else y
>
> case b of
> a1 :: Bool
On 1/09/2013, at 7:06 PM, Christopher Howard wrote:
> It seemed to be suggesting that a Num instance for functions would imply the
> need for constant number functions, which leads to difficulties. But I don't
> see why one would have to take it that far.
You *cannot* make a type an instance of
On 1/09/2013, at 6:02 PM, yi lu wrote:
> I want to know if it is possible that I use strings without "".
>
> If I type
> Prelude>foo bar
> which actually I mean
> Prelude>foo "bar"
> However I don't want to type ""s.
>
> I have noticed if bar is predefined or it is a number, it can be used as
No, but I agree that this behavior is useful and in the spirit of th-desugar. I
can add this to the next version, which should come out in a few days
(tomorrow?), because I've noticed a bug with the scoping of as-patterns in let
statements.
Thanks for the suggestion!
Richard
On Aug 31, 2013, a
On Mon, Sep 2, 2013 at 5:43 AM, Richard A. O'Keefe wrote:
>
> A slogan I have programmed by since I first met C and recognised
> how vastly superior to PL/I it was for text manipulation _because_
> it didn't have a proper string type is "Strings are Wrong!".
>
I wonder if you notice the irony in
On 2/09/2013, at 3:55 PM, Rustom Mody wrote:
> On Mon, Sep 2, 2013 at 5:43 AM, Richard A. O'Keefe wrote:
>
> A slogan I have programmed by since I first met C and recognised
> how vastly superior to PL/I it was for text manipulation _because_
> it didn't have a proper string type is "Strings a
For expanding/inlining type synonyms, there is also th-expand-syns (
http://hackage.haskell.org/package/th-expand-syns).
/Anders
On Mon, Sep 2, 2013 at 3:25 AM, Richard Eisenberg wrote:
> No, but I agree that this behavior is useful and in the spirit of
> th-desugar. I can add this to the next
19 matches
Mail list logo