Hello,
I have a sample file (attached) which I cannot read into Text:
Prelude Control.Applicative Data.Text.IO.readFile foo
*** Exception: utf8.txt: hGetContents: invalid argument (invalid
byte sequence)
Prelude Control.Applicative Data.Text.Encoding.decodeUtf8 $
Graphics program often relies on system frameworks such as GLUT or
GLFW to handle window and user input. But such frameworks often impose
a rigid style of callback programming, or inversion of control. It is
no secret that continuation monad can deal with this issue [1]. It is
also known that
I think you're making this way harder than it really is.
What 99% of people need is that hackage packages builds with the latest
haskell platform, and/or with bleeding edge ghc, and with the latest
versions of its dependencies.
Thus for every dependency there is only one possible version - the
On Fri, Aug 31, 2012 at 7:59 AM, jeff p mutj...@gmail.com wrote:
Hello,
I have a sample file (attached) which I cannot read into Text:
Prelude Control.Applicative Data.Text.IO.readFile foo
*** Exception: utf8.txt: hGetContents: invalid argument (invalid
byte sequence)
Prelude
I had my subscription to haskell-cafe deleted because
of intermittent bounces.
I raised a support ticket with my ISP bluehost.com
and they suggested the bounces might be because
78.46.100.80 is on the mxtoolbox blacklist as
reported here:
On Fri, Aug 31, 2012 at 05:45:27AM +0100, Richard O'Keefe wrote:
Consider the following interface
type Ord k = Sliding_Window k v
entries :: Sliding_Window k v - [(k,v)]
The cost is expected to be linear in the length of
the result. The pairs are listed in
Aha. See http://hackage.haskell.org/trac/ghc/ticket/7205.
I don't think there's a workaround, I'm afraid
Simon
| -Original Message-
| From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-
| boun...@haskell.org] On Behalf Of Paul Liu
| Sent: 30 August 2012 20:52
| To: Haskell
Any search tree implementation will do add and purge in O(log n) time.
Add's obvious, but could you explain to me about purge?
All of the explanations of search trees I'm familiar with,
if they bother to explain deletion at all, talk about how
to repair the balance of a tree after deleting
One possibility would be a random-access list
(http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.55.5156), which is a
kind of list of trees.
Then 'add' is trivially O(1) and 'since' is trivially O(length result).
The only tricky operation is purge, which naively would be O(N), where N is
On Thu, Aug 30, 2012 at 11:21 PM, damodar kulkarni
kdamodar2...@gmail.comwrote:
Note: google badly fails to search these functions identifiers.
http://symbolhound.com/
--
brandon s allbery allber...@gmail.com
wandering unix systems administrator
thanks for the symbolhound link.
@Kristopher:
I knew hoogle to some extent, not an expert user though.
and, it seems, the hoogle plugin for firefox works only for haskell.org
Damodar
On Fri, Aug 31, 2012 at 8:07 PM, Brandon Allbery allber...@gmail.comwrote:
On Thu, Aug 30, 2012 at 11:21 PM,
I realize if one wants speed you probably want to use the hMatrix
interface to GSL, BLAS and LAPACK.
Worth it in the sense of have a purely functional implementation.
--
--
Regards,
KC
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
I'd have to say that there is one(and only one) issue in Haskell that bugs
me to the point where I start to think it's a design flaw:
It's much easier to type things over generally than it is to type things
correctly.
Say we have a
data BadFoo =
BadBar{
badFoo::Int} |
BadFrog{
Thanks, Simon! I'll be looking forward to its resolution.
On Fri, Aug 31, 2012 at 4:37 AM, Simon Peyton-Jones
simo...@microsoft.com wrote:
Aha. See http://hackage.haskell.org/trac/ghc/ticket/7205.
I don't think there's a workaround, I'm afraid
Simon
| -Original Message-
| From:
timothyho...@seznam.cz writes:
data BadFoo =
BadBar{
badFoo::Int} |
BadFrog{
badFrog::String,
badChicken::Int}
This is fine, until we want to write a function that acts on Frogs but not
on Bars. The best we can do is throw a runtime error when passed a Bar and
not a Foo:
You can
Sure, but that's relying on the promise that you're passing it a valid
BadFrog... Consider then:
deBadFrog $ BadFrogType (BadBar { badFoo = 1})
-- Původní zpráva --
Od: John Wiegley jo...@newartisans.com
Datum: 31. 8. 2012
Předmět: Re: [Haskell-cafe] Over general types
Dear gentle Haskellers,
I'd appreciate it very much if you could please take a look the my code
here and give me some feedback -
https://github.com/ckkashyap/haskell-websocket/blob/master/src/lib/Net/WebSocket/Request.hs
I am particularly looking for advice around what would be a good type for
KC kc1...@gmail.com writes:
I realize if one wants speed you probably want to use the hMatrix
interface to GSL, BLAS and LAPACK.
Worth it in the sense of have a purely functional implementation.
I, for one, have needed these in the past and far prefer Repa's
interface to that of hMatrix. I
Hello Timothy
GADTs let you catch more errors at compile time. With them you can give
different types to constructors of the same datatype.
regards
paolino
2012/8/31 timothyho...@seznam.cz
Sure, but that's relying on the promise that you're passing it a valid
BadFrog... Consider then:
What you are essentially asking for is a refinement on the type of
'BadFoo' in the function type, such that the argument is provably
always of a particular constructor.
The easiest way to encode this kind of property safely with Haskell
2010 as John suggested is to use phantom types and use the
On 12-08-31 01:59 AM, jeff p wrote:
I have a sample file (attached) which I cannot read into Text:
Prelude Control.Applicative Data.Text.IO.readFile foo
*** Exception: utf8.txt: hGetContents: invalid argument (invalid
byte sequence)
Prelude Control.Applicative
It is often the case that using GADTs with phantom types can allow you to
constrain which functions can operate on the results of which constructors. I
believe this is common practice now in such situations.
Nick
On Friday, August 31, 2012 09:32:37 PM Paolino wrote:
Hello Timothy
GADTs
On 1 September 2012 01:11, damodar kulkarni kdamodar2...@gmail.com wrote:
I knew hoogle to some extent, not an expert user though.
and, it seems, the hoogle plugin for firefox works only for haskell.org
Because Hoogle indexes the packages on Hackage.
Where else can it find it Haskell source
I'm following Yesod tutorial that gives this as the first example for
type-safe URLs:
| getHomeR = defaultLayout [whamlet|a href=@{Page1R}Go to page 1!|]
Worked fine, the a href generated looks perfect.
Then I tried this:
| getHomeR = defaultLayout [whamlet|Hello!a href=@{Page1R}Go to page
Hamlet is whitespace sensitive like haskell and python. If you put a tag
after text, it is treated as text.
Write the a... on the next line and it will work.
On Fri, Aug 31, 2012 at 7:14 PM, Thiago Negri evoh...@gmail.com wrote:
I'm following Yesod tutorial that gives this as the first
On Fri, 31 Aug 2012, Alexander Kjeldaas alexander.kjeld...@gmail.com wrote:
I think you're making this way harder than it really is.
What 99% of people need is that hackage packages builds with the latest
haskell platform, and/or with bleeding edge ghc, and with the latest
versions of its
On Fri, Aug 31, 2012 at 9:45 PM, David McBride toa...@gmail.com wrote:
Hamlet is whitespace sensitive like haskell and python. If you put a tag
after text, it is treated as text.
Write the a... on the next line and it will work.
Another option is to manually put the closing /a when the tag
We will work on releasing more interesting examples. For now there are only the
test files such as
https://github.com/Cognimeta/perdure/blob/7b6cbe80d1fc735f697b3ee148b01eb57c4079fa/exe-src/Database/Perdure/TestState.hs.
There were many internals that are needlessly exposed. We've hidden them
So I'm trying to follow [this blog][1]. So I tried the code, couldn't
compile the haskell part, probably due to the fact the guide uses
version 6, but I have version 7 of ghc. By changing the paramaters I
could compile it with the following:
ghc --make -dynamic -shared -fPIC -no-hs-main -optl
29 matches
Mail list logo