Tom Ellis wrote:
Shouldn't it be an *Applicative* constraint?
class Applicative t = ApplicativeIO t where
liftIO :: IO a - t a
and require that
liftIO (pure x) = pure x
liftIO (f * x) = liftIO f * liftIO x
Seems like ApplicativeIO makes more sense than MonadIO, which
Dan Burton wrote:
From what you've said, it sounds like you can already write:
serverSide :: IO a - Form a
This seems elegant enough to me for your needs. Just encourage it as an
idiom specific to Forms.
myBlogForm = Blog $ titleForm * serverSide getCurrentTime *
contentsForm
The mailman daemon process on the server apparently exited
for some reason. I restarted it, and now mail traffic seems to be
going through normally again.
-Yitz
On Sun, May 12, 2013 at 9:21 PM, Carter Schonwald
carter.schonw...@gmail.com wrote:
I've had this problem too. Was trying to sign up
, Tim Docker t...@dockerz.net wrote:
Thanks - I can confirm all is working again. I believe than, within some
time window. some messages may have been dropped.
Tim
On 14/05/13 07:06, Yitzchak Gale wrote:
The mailman daemon process on the server apparently exited
for some reason. I
Johan Tibell wrote:
I suggest that we implement an alternative haddock syntax that's a
superset of Markdown.
Here is a previous thread on this exact topic, from five years ago:
http://www.haskell.org/pipermail/haskell-cafe/2008-February/039846.html
It mentions a few additional shades of
Hi David,
David Thomas wrote:
https://github.com/dlthomas/tzcache
A small bit of code, but seems likely to be useful enough that I figured I
should share.
Thanks for sharing this!
1) Does this already exist somewhere I missed?
I haven't seen it anywhere.
2) It seems silly to make
Adde Nilsson wrote:
Ok, do you know of any way to add/subtract without converting to UTC and
back?
Brandon Allbery wrote:
I'm not sure I'd do that in any environment, since usually libraries don't
deal with the result crossing a daylight/summer time change (and those that
do, surprise
Bryan O'Sullivan wrote:
A substantial number of the difficulties I am encountering are related to
packages specifying upper bounds on their dependencies. This is a recurrent
problem, and its source lies in the recommendations of the PVP itself
I think the PVP recommendation is good, though
Johan Tibell wrote:
If Chris is indeed out of the loop we should find a new maintainer.
Mark and I are also interested in the future of protocol buffers in
Haskell.
Also, Chris is the maintainer of some regex packages
that are in the Haskell Platform.
-Yitz
Pēteris Paikens wrote:
I'm stuck at trying to get Data.Encoding package functional. Cabal
gives the following error message:
This is caused by a problem with the cabal file in the encoding
package. Often it causes the entire GHC package system to
get confused, as pointed out by Brandon.
The
Yves Parès wrote:
Is there some litterature expliciting in a less empiric way than I did the
differences like this between data and newtype? I've never come against
such documentation through all my learning of Haskell, yet I think it's an
important point.
Roman Cheplyaka wrote:
See the
Bas van Dijk wrote:
What's the recommended way for serializing (with the cereal package) an
UTCTime?
Serialize the Day part as an Integer using
toModifiedJulianDay/ModifiedJulianDay,
(Note that Day is not a constructor, it's just the name of
the type.)
Serialize the DiffTime as a Rational, as
Jason Dagit wrote:
Looks like the repo [1] for the OpenAL bindings that Sven Panne
created [2] is no longer available. I assume this is a result of The
Great Server Outage of 2011 [3].
[1] http://darcs.haskell.org/packages/OpenAL/
[2]
Yves Parès wrote:
(^^ Michael just outposted [1] me).
[1] I don't know if there is such a word. Sorry, I'm french.
If there wasn't before, there is now. It's a great word!
(Et je suis en effet un anglophone.)
-Yitz
___
Haskell-Cafe mailing list
dokondr wrote:
All I actually need
is some way to get *seconds* since epoch from the system, so I could
manipulate them as integers.
Well, you already have that - that's exactly what POSIXTime
is. It is a numerical type, an instance of the RealFrac
class. So perhaps you can do all of your
Gregory Crosswhite wrote:
could we split the some/many methods out from Alternative? They simply
don't make sense except in a subset of possible Alternatives --- in most
cases they just result in an infinite loop...
That is a very good point. I would be in favor of such a
change, even though
dokondr wrote:
When I try to read POSIXTime...
No instance for (Read POSIXTime)...
What should I do to provide Read instance for POSIXTime?
Short answer: if you are thinking about this as a moment
in time that could be parsed from the usual kind of
string representation for that, you probably
Brandon Allbery wrote:
case () of
() | s == reverse s - putStrLn palindrome
_ - putStrLn nope
Tom Murphy wrote:
This is kind of a hack of case, though. I think what the OP was looking
for is
isPalindrome word
| (word == reverse word) = putStrLn (word ++ is a
Hi Edward,
I started @telling you on #haskell, but it has become
too long for that. :)
The following functions would be nice additions
to Data.List.NonEmpty in the semigroups package:
replicate1p :: Whole n = n - a - NonEmpty a
take1p :: Whole n = n - NonEmpty a - NonEmpty a
splitAt1p :: Whole
I wrote:
The following functions would be nice additions
to Data.List.NonEmpty in the semigroups package...
Here are two more requests:
maximum, minimum :: Ord a = NonEmpty a - a
Two more unsafe Prelude functions become safe!
Thanks,
Yitz
___
Ben Gamari wrote:
Is there a reason why the current version of the timezone-series and
timezone-olson packages depend on time1.3? With time 1.4 being widely
used at this point this will cause conflicts with many packages yet my
tests show that both packages work fine with time 1.4. Could we
Ben Gamari wrote:
Recently I've been working on an iCalendar parser implementation with
support for recurrence rules.
For the recurrence logic, I've been
relying on Chris Heller's excellent time-recurrence
package.
Unfortunately, it seems we have both encountered great
difficulty in cleanly
I wrote:
This would be nice. However, there would have to be
a way for it to be turned on and off by the author.
(Spam is not nice.)
Ketil Malde wrote:
This is where it stranded the last time, IIRC. That sentiment makes me
a bit uneasy; so you are the official maintainer of a package on
Gregory Crosswhite wrote:
could [Hackage] have a feature where when a
working package breaks with a new version of
GHC the author is automatically e-mailed?
This would be nice. However, there would have to be
a way for it to be turned on and off by the author.
(Spam is not nice.)
Thanks,
Yitz
Eric Y. Kow wrote:
So I'm combining Haskell software with some non-free/closed source work.
I was wondering what sort of effort it would take to organise a blanket
license for everything in the Haskell Platform, and whether it would be
worthwhile to anybody...
- My user is concerned that a
Daniel Fischer wrote:
Just for the record, not a newcomer, and has non-spam
messages
Conrad Parker wrote:
There was a recent hotmail exploit, with people reporting their
account sent spam...
No exploit is needed. It is trivial for an impostor to
seem as if he is sending email from someone
Dmitri wrote:
I need to call Stanford NLP Parser from Haskell
(unfortunately Haskell does not have a similar one)...
Just out of curiosity, why do you not consider GF
at all similar? To an outsider like me, there does
appear to be quite a bit of similarity.
http://www.grammaticalframework.org/
Thanks for all the great information provided in this thread.
The wiki page that Paulo originally linked had Vasyl's
fantastic documentation for using his hgettext package,
but it did not mention any of the other methods we discussed.
I moved the gettext documentation to its own linked page
and
Chris Smith wrote:
class Ord a = Range a where...
Before adding a completely new Range class, I would suggest
considering Paul Johnson's Ranged-sets package:
http://hackage.haskell.org/package/Ranged-sets
Ranges have many more natural operations, and interactions
with other classes, than you
Evan Laforge wrote:
hex2 = (+)$ ((*16)$ higit)* higit
higit = subtract (fromEnum '0')$ satisfy isHexDigit
color = Color$ hex2* hex2* hex2
Twan van Laarhoven wrote:
How is subtract (fromEnum '0') supposed to convert a hex digit to an Int
or Word8? I think you need digitToInt (or an
Joachim Breitner wrote:
...Usually in Haskell, you’d determine them in the main function and then
pass them in an argument to all functions needing them, or you wrap that
in a monad...
The big downside is the verbosity of the approach: A lot of parameters
need to be passed, and if one such
Brandon Allbery wrote:
Anything useful has to be modified to depend on SemiGroup as well to get
mconcat or its replacement; that's why you jumped the proposal to begin
with
Not at all. Types with Monoid instances need an additional
instance, a Semgroup instance, in order to be able to use
Thanks for the more permissive licenses.
And most of all, thanks for all your great work
on HDBC as maintainer.
Thanks and good luck to Nicolas.
Regards,
Yitz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hi Michael,
Don is no longer involved in planet AFAIK.
The administrator of planet-haskell is
Antti-Juhani Kaijanaho. I'll send you
his email address off list.
Regards,
Yitz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
I wrote:
Please respond to this thread if you own a package
that will be affected by this change.
Responding to my own request, here are some more
packages that use mkTyCon explicitly:
Ashley Yakeley's time package, which is part of the
Haskell Platform.
My timezone-series package, because it
Jon Fairbairn wrote:
There’ll be a replacement for mkTycon (mkTycon3), so you can
still do manual instances…
Right, it should be easy to fix manual Typeable instances.
It's just that if no action is taken, they will eventually break.
So it's good to make sure that there is public awareness,
and
Simon Marlow has announced[1] on the Haskell Libraries
list that the Typeable class is changing.
The standard way to create a Typeable instance is
just to derive it. If you do that, you will not be affected
by this change.
But it seems that many packages create Typeable
instances by explicitly
I wrote:
Not exactly. A TimeZone in Data.Time doesn't really
represent a time zone - it represents a specific clock setting
in a time zone.
Ashley Yakeley wrote:
I still regret this! I should have called it TimeOffset or somesuch.
Oh, it's not your fault. Every other time library in the
Ashley, heads up! I am CCing you on this message because
I think a problem has been found with Data.Time.Format.
Please see below.
Daniel Patterson wrote:
I've found most of the time library to be quite useful, but
the parsing to be worthless
The API for parsing and rendering time in Data.Time
Joe Healy wrote:
One of the points I found non obvious were the fact that local time is
just that. There is no knowledge of the actual timezone in the data
type. If you wish to store that, it needs to be stored alongside.
Erik Hesselink wrote:
Isn't that what ZonedTime [1] is for?
Not
Oops, forgot the references:
ZoneSeriesTime in the timezone-series package[1]...
To get a TimeZoneSeries, representing a time zone with
all of its known clock changes throughout history and some
years into the future, use the timezone-olson package[2]
Ashley Yakeley wrote:
This was fixed in time-1.2.0.5. From the haddock for parseTime:
Supports the same %-codes as formatTime, including %-, %_ and %0
modifiers.
Great, glad to hear this was recently fixed. I installed
the latest version of the time package, and it works.
It is important to
Ryan Ingram wrote:
So this is definitely a GHC bug, but I think the problem is probably
triggered by this line:
instance Serializable a b = IResource a
I don't think this is a valid instance declaration without a functional
dependency on Serializable, as it's impossible to know which type
Daniel Fischer wrote:
No, the instance head is just a type variable, not a type constructor
applied to type variables
Oops, you're right. GHC was telling the truth, I should have
paid closer attention!
Fixing my minimal example, I get:
{-# LANGUAGE MultiParamTypeClasses, UndecidableInstances
Tony Morris wrote:
I recently set out to write a library that required a decent time
library. Having only had a flirt with Data.Time previously, I assumed
it would be robust like many other haskell libraries. I don't know
about consensus, but I have been massively let down. I won't go in to
Dmitri O.Kondratiev wrote:
I have:
ds1 = 10/11/2009 7:04:28 PM
ds2 = 10/17/2009 8:48:29 AM
t1 = readTime defaultTimeLocale %m/%d/%Y %l:%M:%S %p ds1 :: UTCTime
t2 = readTime defaultTimeLocale %m/%d/%Y %l:%M:%S %p ds2 :: UTCTime
dif = diffUTCTime t2 t1
I need to:
1) Find how many complete
Dmitri O.Kondratiev wrote:
It would also help to see a simple example of parsing 10/11/2009 7:04:28
PM to time and date objects.
Let's assume that 10/11/2009 means October 11, as in the U.S.
Then you can use:
import System.Locale (defaultTimeLocale)
import Data.Time
thatMoment :: Maybe
The SIGPLAN Programming Languages Software Award
For 2011, the winners of the award are
Simon Peyton Jones and Simon Marlow of
Microsoft Research, Cambridge, for GHC
Congratulations!
Well deserved recognition for visionary ideas backed by
so many years of hard work.
-Yitz
Bryan O'Sullivan wrote:
Now that I think of it: in principle, you could
write a specialised concat that would check the pointer/offset/length
combinations of its arguments and, if they all abutted perfectly, would just
return a new view into that same array, sans copying.
Gregory Collins
I wrote:
You almost never want to use UndecidableInstances
when writing practical programs in Haskell.
When GHC tells you that you need them, it almost
always means that your types are poorly designed,
usually due to influence from previous experience
with OOP.
wren ng thornton wrote:
Scott Lawrence wrote:
I'm modelling text in a markov-model-like way. I have an actual markov
model (albeit one in which X_n depends on a fixed range X_n-1 ..
X-n-k). I'm vaguely anticipating the presence of other models:
class Model m a | m - a where
lexemes :: m - Set a
genFunc :: m
I wrote:
You almost never want to use UndecidableInstances
when writing practical programs in Haskell.
When GHC tells you that you need them, it almost
always means that your types are poorly designed,
usually due to influence from previous experience
with OOP.
Gábor Lehel wrote:
Are you
Scott Lawrence wrote:
But... this prevents me from storing more information in a Model in the
future. While I don't really anticipate needing too (I can see this
function covering all likely use cases), it does seem sorta restrictive.
I tend not to think about storing information inside of
Scott Lawrence wrote:
type Model a = (Ord a) = Set a -- the set of lexemes
- [a] -- the original text to model
- [a] -- list of previous lexemes
- ProbDist a -- the next lexeme
and then
entropy :: Model a - Set a -
Gregory Collins wrote:
Surprisingly enough, mtl uses UndecidableInstances, so almost every
practical Haskell program uses it in one way or another.
The library uses it, you don't use it directly in your program.
Anyway, transformers does the job when you need to
build on the basic monad
Chris Smith wrote:
I had to abandon a plan
to introduce Haskell in a class I taught this past semester
[12 to 13 years old] because of issues with getting it
installed on the Macintosh laptops that some of
the students had.
Truth is, you obviously don't need support for FFI development
in
The dtd-text package[1] provides a parser and renderer for XML
DTDs. It implements most of the parts of the W3C XML specification
relating to DTDs, and is compatible with versions 1.0 and 1.1 of the
specification.[2] The parser and renderer operate on Haskell DTD
objects from the dtd-types[3]
I wrote:
I really should have edited the Cabal description of this package
before I uploaded it.
Max Rabkin wrote:
Could you upload a bugfix version with an accurate description? This
could be very frustrating to a random hackage-brower who hasn't read
the announcement (or me, in a few
The dtd-text package[1] provides a parser for XML DTDs. It implements
most of the parts of the W3C XML specification relating to DTDs,
and is compatible with versions 1.0 and 1.1 of the specification.[2]
The result of the parse is a Haskell DTD object from the
dtd-types[3] package. This first
The dtd-types[1] package provides types for processing
XML DTDs in Haskell. These types are intended to be
compatible with and extend the set of types provided by
John Millikin's xml-types package[2].
This version, 0.3.0.1, was released in support of the dtd-text
package[3]. It includes some
I wrote:
I was thinking of even lower level: allocating a moderate chunk of
memory and writing the results directly into it consecutively as a
special case.
Bryan O'Sullivan wrote:
Surely that would save only one copy compared to creating a list of results
and then concatenating them, no?
Scott Lawrence wrote:
More specifically, I have
class Model m a | m - a where ...
class Entropy d where ...
instance (Model m a) = Entropy m where ...
The first line requires MultiParamTypeClasses and
FunctionalDependencies... the third
requires UndecidableInstances...
Is this likely
Bryan O'Sullivan wrote:
I'd like a no-copy combinator for the same reasons, but I think it's
impossible to do without some low-level support.
I wrote:
...does the internal representation easily admit such a combinator?
Not very easily. Internally, attoparsec maintains just three pieces of
Mario Blažević wrote:
I don't know if this helps, but the incremental-parser library has
exactly the combinator you're looking for.
Wow, that is a beautiful implementation of a general parser
library. So much simpler than Parsec. Thanks for pointing it out.
Why are you hiding those nice
John Goerzen wrote:
I've decided that I'm OK with re-licensing hslogger, HDBC, and well all of
my Haskell libraries (not end programs) under 3-clause BSD.
Thanks John!
-Yitz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
I often find while using attoparsec and attoparsec-text that I need to
match a number of text parsers consecutively and concatenate the
result. By text parser I mean Parser ByteString for attoparsec and
Parser Text for attoparsec-text.
It seems the best I can do is to collect them all in a list
The dtd-types package provides types for processing XML DTDs in Haskell.
These types are intended to be compatible with and extend the set of types
provided by John Millikin's xml-types package.
The consensus seems to be to leave this as a separate package and
not to merge it with xml-types.
Edward Kmett wrote:
I felt I should probably mention that ultimately what was done is I moved
NonEmpty all the way down into semigroups and chose
sconcat :: NonEmpty a - a
at it was the closest analogue to the current mconcat behavior.
So, request accomodated. ;)
Indeed, this is an excellent
The dtd-types package provides types for processing XML DTDs in Haskell.
These types are intended to be compatible with and extend the set of types
provided by John Millikin's xml-types package.
This is a very preliminary first version, pending discussion by the
community on the web-devel list
Michael Snoyman wrote:
main = do
fromAddr - unsafePackAddressLen 7 $(return $ LitE $
StringPrimL 123\0\456)
print fromAddr
let fromStr = S.pack $ map (toEnum . fromEnum) $(return $ LitE
$ StringL 123\0\456)
print fromStr
I get the result:
123\192\128\45
I wrote:
It's not a good idea for a basic time
library to introduce possible crashes. At least you should
provide an alternative safe interface. Similarly for toEnum.
Chris Heller wrote:
are you suggesting something like doing modulo arithmetic rather
than calling error on undefined values?
Moving the discussion from haskell to haskell-cafe.
Chris Heller wrote:
http://github.com/hellertime/time-recurrence
A library for generating and inspecting recurring times.
Very nice. Please put it up on hackage so we can see the
haddocks, try it out easily, etc.
hoping to solicit some
Don Stewart wrote:
The haskell.org committee... has decided to
incorporate haskell.org as a legal entity. This email outlines our
recommendation, and seeks input from the community on this decision.
Thanks, good news! And thanks for posting to multiple
lists for maximum public notification to
Eitan Goldshtrom wrote:
f p = putStrLn $ (show (Main.id p)) ++ - message received
Brandon S Allbery KF8NH wrote:
f p = putStrLn $ (show $ Main.id p) ++ = message received
wren ng thornton w...@freegeek.org wrote:
f p = putStrLn $ show (Main.id p) ++ - message received
f p = putStrLn
Andrew Butterfield wrote:
Why not indeed ?
Roel van Dijk wrote:
import Control.Category ( () )
f = Main.id show (++ - message received) putStrLn
Indeed, I agree. I sometimes do that, too, when I want to
emphasize the idea of applying tools one after the other.
But most often I just use
Andrew Butterfield wrote:
Why not indeed ?
Roel van Dijk wrote:
import Control.Category ( () )
f = Main.id show (++ - message received) putStrLn
Indeed, I agree. I sometimes do that, too, when I want to
emphasize the idea of applying tools one after the other.
But most often I just use
Hi Edward,
Thanks much for the very useful semigroups
package.
When using it in practice, it would be very useful
to have an analogue to the mconcat method of
Monoid. It has the obvious default implementation,
but allows for an optimized implementation for
specific instances. That turns out to
Stephen Tetley wrote:
Does it have an obvious default implementation, bearing in mind it we
might really want a total function?
sconcat [] = error Yikes - I wish this was total!
sconcat [a] = a
sconcat (a:as) = a sconcat as
Holger Siegel wrote:
You have to provide the neutral
Stephen Tetley wrote:
There is that formulation, though usually I find I need to do it with
an alternative instead:
altconcat alt [] = alt
altconcat _ (a:as) = go a as
where
go acc [] = acc
go acc (b:bs) = go (acc b) bs
But the whole reason we need this as a method is
for the
Hi Edward,
Could you please add a Semigroup instance for Text?
Once you're doing that, I suppose you'd also want to
add it for lazy Text and both kinds of ByteStrings.
But what I currently need is strict Text.
The reason, of course, is that in complex calculations
is *so* much more readable
Edward Kmett wrote:
sconcat :: [a] - a - a
with either the semantics you supplied or something like
sconcat = appEndo . mconcat . map diff
The sconcat we have been discussing is
sconcat = flip $ appEndo . getDual . mconcat . map (Dual . Endo . flip ())
(avoiding the use of Dual.diff.Dual so
I wrote:
Could you please add a Semigroup instance for Text?
Edward Kmett wrote:
Unfortunately, I don't think I can really bring myself to do either.
I was deliberately trying to keep the number of dependencies for the
semigroups as low as possible...
You are quite right. These should really
José Pedro Magalhães wrote:
I want to use cabal-install on a machine without internet access.
Work is ongoing for a version of hackage that you can just
install on your own server. Perhaps the people working on that
can comment about the status.
If all you want is a barebones server that you
José Pedro Magalhães wrote:
Thanks, but I don't really need a functional server or anything; I just want
to have a local copy of Hackage on disk (latest versions only will do) and
tell cabal-install to use that instead of the web.
If you have the package tarball, you can unpack it manually
and
+1 for UTF-8 only.
Brandon Moore wrote:
...I don't see much to be gained by prohibiting other encodings.
Universal portability of Haskell source code with respect to its
encoding is to be gained. We can achieve that simplicity now
with almost no cost. Why miss the opportunity?
In particular,
malcolm.wallace wrote:
BOM is not part of UTF8, because UTF8 is byte-oriented. But applications
should be prepared to read and discard it, because some applications
erroneously generate it.
For maximum portability, the standard should be require compilers
to accept and discard an optional BOM
On Mac OS X 10.6.7, after upgrading to yackage 0.1.0.1:
After running yackage -l, I cannot connect to it even directly
from localhost. I get the message:
This Yackage server only talks to local clients
On a Linux server it seems to work fine though.
On the Mac, when I do telnet localhost I
I wrote:
After running yackage -l, I cannot connect to it even directly
from localhost. I get the message:
This Yackage server only talks to local clients
Michael Snoyman wrote:
...it doesn't sound like your problem is caused by the mis-behaving
Yackage code: it *should* give you a
Could you please add a way of varying the title of the
Yackage web page? That would make it much easier to work
with multiple Yackages at once. For my particular setup,
including its port number in the web page title would do
the trick. But perhaps the easiest and most general thing
would be to
Hi Manfred,
I am copying this response to the Haskell Cafe mailing list.
Manfred Lotz wrote:
...I'm trying to figure out how to use your
packages to get the time in a different timezone.
Do you have an example how to do that? What I want for example is to
provide the timezone preferably like
Thanks for the fantastic cabal-dev tool!
Is there any convenient way to save changes to the
package-specific cabal config file in cabal-dev?
When I make changes to cabal-dev/cabal.config,
cabal-dev seems to scribble over them next time
I run it.
The only solution I have found so far is to run
Erlend Hamberg wrote:
When I wanted to get the newest xmonad code from darcs today¹ it was
really, really slow...
Being on an IPv6 network, and having been burnt by
similar problems before, I tried adding IPv4 address for
code.haskell.org in /etc/hosts...
This fixed the issue
...Connecting
Richard Cobbe wrote:
I'm trying to see if I'm running the latest version of haskell-mode.el.
Unfortunately, the download link at the top of
http://www.haskell.org/haskellwiki/Haskell_mode_for_Emacs points to a
directory with nothing in it.
Is there somewhere else I should be looking?
It is
Brandon Moore wrote:
This code produces and uses a table of all
allowed combinations. I think this makes it easier
to understand why the code works (and is H98).
It's just as easy to make a direct version that
produces one requested composition in linear time,
so I haven't worried whether
Eric Mertens wrote:
(but I've had my head in Agda lately)
Indeed, coming across this problem tempted me
to abandon the real world and take refuge in Agda.
http://hpaste.org/44469/software_stack_puzzle
Wow, so simple, and no higher-rank types! This is the
best solution yet. I am now truly in
Brandon Moore wrote:
My solution does not serialize and deserialize between every
pair of layers.
Ahhh, I see! Sorry I didn't look closely enough the first time.
Yes, this is a very nice Haskell 98 solution!
This code produces and uses a table of all
allowed combinations. I think this makes
Thanks to everyone for the nice solutions to this puzzle,
here and on reddit:
http://www.reddit.com/r/haskell/comments/fu6el/a_practical_haskell_puzzle/
There were two basic approaches. One was to use GADTs and
higher-rank types to reduce the amount of type trickery needed.
One nice example is
You have written a large software system in Haskell. Wishing to
play to Haskell's strength, you have structured your system
as a series of composable layers. So you have data types
Layer1, Layer2, ...
and functions
layer2 :: Layer1 - Layer2
layer3 :: Layer2 - Layer3
...
etc.
Of course you'll
Gwern Branwen wrote:
You could look at them yourself; I attached the files.
Max Bolingbroke wrote:
Frankly I am surprised how much size gets used.
It seems that making it fast is more important than
I thought.
Johan Tibell wrote:
IntMap (which shares data structure with HashMap) only hash
I wrote:
I suggest adding the following type-specialized variants to
Data.Attoparsec.Char8:
(*.) :: Applicative f = f a - f ByteString - f a
(*.) = (*)
(.*) :: Applicative f = f ByteString - f a - f a
(.*) = (*)
Bryan O'Sullivan wrote:
Sounds reasonable. Send a patch?
Felipe Almeida
1 - 100 of 500 matches
Mail list logo