Maxime Henrion wrote:
I've been playing with some code to work with DFAs, but I'm now faced
with an implementation problem. In order to have states that can
transition to themselves, it seems I would need self-referential data;
otherwise I would need to separate those transitions from the
On Tue, Dec 28, 2010 at 3:09 AM, o...@okmij.org wrote:
Maxime Henrion wrote:
I've been playing with some code to work with DFAs, but I'm now faced
with an implementation problem. In order to have states that can
transition to themselves, it seems I would need self-referential data;
Hi folks!
I have the following problem. As code is most time easier to understand,
let give an example what I try to do in C:
unsigned int i,j;
unsigned int r[100];
for (i = 0; i 100; i++) {
j = makeResult(); //j is known to be smaller than 100.
r[j] = r[j] + 1;
}
(My C is poor, so
On Tue, 28 Dec 2010, Robert Clausecker wrote:
Hi folks!
I have the following problem. As code is most time easier to understand,
let give an example what I try to do in C:
unsigned int i,j;
unsigned int r[100];
for (i = 0; i 100; i++) {
j = makeResult(); //j is known to be smaller than
On Tue, Dec 28, 2010 at 08:46:24PM +0800, Robert Clausecker wrote:
I have the following problem. As code is most time easier to understand,
let give an example what I try to do in C:
unsigned int i,j;
unsigned int r[100];
for (i = 0; i 100; i++) {
j = makeResult(); //j is known to
Hi,
Jonathan Geddes wrote:
For TH use #1, compile-time parsing of arbitrary strings, I think it
would be nice for quasiquote semantics to be modified so that code
like
json :: String - JsonObject
json = ...
data = [ json |
{ name : Jonathan
, favorite language: Haskell
}
|]
On Tue, Dec 28, 2010 at 8:17 AM, Tillmann Rendel
ren...@mathematik.uni-marburg.de wrote:
This seems simple enough to me, so it looks as if your use case is already
supported as a library on top of the more general API.
This is exactly what I was looking for, and much simpler than my
previous
Hello all:
I'd like to right a function that could take a structure with type
(random example):
(Int, (String, (Int, Int)))
and another where each individual value is a Maybe of the
corresponding type, for example:
(Maybe Int, (Maybe String, (Maybe Int, Maybe Int)))
and perform a fromMaybe
Hi folks,
I have been looking at developing for my Android phone which is
running Gingerbread (Android version 2.3). The important thing about
the official development kit is this:
The new native development kit (C/C++ cross compiler for ARM) is that
the you can create android applications
Maybe something like this would work for you (requires the TypeFamilies
extension).
class FromMaybe a where
type Maybe' a
fromMaybe :: a - Maybe' a - a
instance FromMaybe Int where
type Maybe' Int = Maybe Int
fromMaybe = Data.Maybe.fromMaybe
instance
Hello.
When I run a program compiled with ghc-6.12.3 like this:
... +RTS -A2G -M8G -s
I get as an answer:
Heap exhausted;
Current maximum heap size is 0 bytes (0 MB);
use `+RTS -Msize' to increase it.
and when I put the options
... +RTS -A2000M -M8000M -s
I get
Heap exhausted;
Current
I've finally gotten around to doing an update to HaskellNet which
provides along with some cleanups
integration with mime-mail. There is an example of its usage at:
example/smtpMimeMail.hs
in
http://hackage.haskell.org/package/HaskellNet
-Rob
On Wed, Oct 27, 2010 at 11:05 AM, Michael Snoyman
There was work ongoing for an ARM port of GHC. See here:
http://tommd.wordpress.com/2010/01/19/ghc-on-arm/
Also see:
http://alpheccar.org/en/posts/show/94
Alpheccar's build uses the work of Stephen Blackheath to cross
compile, which originated in the GHC-iPhone project, based on ghc
6.10.2 I
jhc generated C works on the android/ARM just fine. Android specific
libraries arn't available, so you would have to bind to what you want
with the FFI.
John
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On 28 December 2010 19:23, Edward Amsden eca7...@cs.rit.edu wrote:
Hello all:
I'd like to right a function that could take a structure with type
(random example):
(Int, (String, (Int, Int)))
and another where each individual value is a Maybe of the
corresponding type, for example:
(Maybe
Although I don't understand it myself Oleg's deepest functor [1] seems
to be what you're looking for.
-deech
[1] http://okmij.org/ftp/Haskell/deepest-functor.lhs
On Tue, Dec 28, 2010 at 1:23 PM, Edward Amsden eca7...@cs.rit.edu wrote:
Hello all:
I'd like to right a function that could take a
On Tue, Dec 28, 2010 at 21:23, Edward Amsden eca7...@cs.rit.edu wrote:
(Int, (String, (Int, Int)))
and another where each individual value is a Maybe of the
corresponding type, for example:
(Maybe Int, (Maybe String, (Maybe Int, Maybe Int)))
This example demonstrates exactly why you might
Aditya: Not quite, because I'm actually looking to extract values from
a functor (Maybe) with a default.
Stephen: Thanks, I'll take a look at those. I do have a need for it.
I'm writing a very similar library to Yampa. (I would be patching
Yampa, but the code is a mess, so I decided to try
We were trying to make an addition function that, unlike the library one,
could add numbers of different types from the typeclass 'Num.' We originally
ran into a problem when trying to add (5 :: Integer) + 4.8, and were trying
to define a new function that would be able to get that:
(+') :: (Num
Basically, I have a signal processing loop, where values are passed
updated with a Maybe, representing whether there is or is not a change
to the value. I could use a single Maybe around the whole thing, but
that would require then re-updating a potentially large structure
entirely. I want to
On 28 December 2010 21:44, Edward Amsden eca7...@cs.rit.edu wrote:
[SNIP]
I'm writing a very similar library to Yampa. (I would be patching
Yampa, but the code is a mess, so I decided to try starting from
scratch.)
Basically, I have a signal processing loop, where values are passed
updated
The problem here is that unfortunately the Haskell type system cannot
do coercion.
There is however a toRational method Real typeclass that converts
instances of Num and Ord to Rational data type and a fromRational
method that converts back. So your code could be:
myplus :: (Real a, Real b) = a
TIA,
David
--
David Sankel
Sankel Software
www.sankelsoftware.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Eta conversion corresponds to extensionality; i.e. there is nothing
more to a function than what it does to its argument.
Suppose f x = g x for all x. Then using eta conversion:
f = (\x. f x) = (\x. g x) = g
Without eta this is not possible to prove. It would be possible for
two functions to
One way to look at it is that β rules are the application of an
eliminator (e.g. function application) to its corresponding constructor
(the lambda expression), whereas η rules correspond to the application
of a constructor to its corresponding eliminator.
E.g.
λ y . (x y)= x
This looks very good, thank you! One comment: do you think it would be
possible to add a function for sending a mime-mail Mail datatype
directly? I see that you provide a wrapper around simpleMail in your
sendMimeMail function, but that won't always be sufficient.
Michael
On Tue, Dec 28, 2010 at
Hi all:
I'm new to Haskell, and I ran into this problem recently while I am
using ftphs module downloaded from hackage.
Prelude :m Network.FTP.Client
Prelude Network.FTP.Client h - easyConnectFTP xxx.xxx.xxx.xxx
*** Exception: FTP: (unknown) (line 2, column
27 matches
Mail list logo