Hi Johannes,
The repository version of ghc-mtl already compiles with ghc 7.6.1. I'm working
at the moment on making hint compile again as well (am I the only one on this
list that doesn't get excited with every new release of ghc? :)), then I'll
upload both to hackage.
Thanks,
Daniel
On Oct
in a library (and
make sure that it is installed before running the program).
Hope this helps...
Daniel
On Mar 31, 2012, at 8:06 PM, Claude Heiland-Allen wrote:
Hi Daniel, cafe,
On 31/03/12 17:47, Daniel Gorín wrote:
Could you provide a short example of the code you'd like to write
On Sep 14, 2011, at 5:29 AM, Kazu Yamamoto (山本和彦) wrote:
Hello,
Of course, I use ByteString or Text for real programming. But I would
like to know whether or not there are any efficient methods to remove
a tail part of a list.
--Kazu
In that case, I would prefer this version, since it
Hi Romildo, you can try the darcs version of ghc-mtl [1], I don't know if that
will be enough to build lambdabot, though
Best,
Daniel
[1] http://darcsden.com/jcpetruzza/ghc-mtl
On Sep 7, 2011, at 1:34 PM, José Romildo Malaquias wrote:
Hello.
In order to compile ghc-mtl-1.0.1.0 (the latest
On Jul 11, 2011, at 10:48 PM, Alistair Bayley wrote:
12 July 2011 05:49, Michael Snoyman mich...@snoyman.com wrote:
As for Bryan's resource-pool: currently I would strongly recommend
*against* using it for any purpose. It is based on
MonadCatchIO-transformers[2], which is a subtly broken
I think you need to change the type of putback slightly:
import Data.IORef
putback :: a - IO a - IO (IO a)
putback a action =
do next - newIORef a
return (do r - readIORef next; writeIORef next = action; return r)
main =
do getChar' - putback 'a' getChar
str - sequence $ take
I expect this one to run in constant space:
import Data.Bits
genbin :: Int - [String]
genbin n = map (showFixed n) [0..2^n-1::Int]
where showFixed n i = map (bool '1' '0' . testBit i) [n-1,n-2..0]
bool t f b = if b then t else f
Daniel
On Oct 15, 2010, at 9:43 AM, Eugene
I believe the way is done in hint is something like this (untested):
showType t =
do -- Unqualify necessary types
-- (i.e., do not expose internals)
unqual - GHC.getPrintUnqual
return $ GHC.showSDocForUser unqual (GHC.pprTypeForUser False
t) -- False means 'drop explicit
Hi Tom,
There is probably more than one way to do this. Did you try using the
package hint-server? [1] It has a very simple interface: you start a
server and obtain a handle; then you can run an interpreter action
using the handle. Something like this:
runIn handle (interpret msg (as
On May 9, 2010, at 12:32 AM, Tom Hawkins wrote:
I have a lot of structured data in a program written in a different
language, which I would like to read in and analyze with Haskell. And
I'm free to format this data in any shape or form from the other
language.
Could I define a Haskell type for
Hi, Martin
Do you have a complete example one can use to reproduce this behavior?
(preferably a short one! :P)
In any case, I'm resending your message to the glasgow-haskell-users
list to see if a ghc guru recognize the error message. It is strange
that the problem only manifests on
On Nov 11, 2009, at 5:39 AM, Martin Hofmann wrote:
I still have problems and your code won't typecheck on my machine
printing the following error:
[...]
I assume we are using different versions of some packages. Could you
please send me the output of your 'ghc-pkg list'.
Thanks,
Martin
On Sep 30, 2009, at 2:20 AM, Martin Hofmann wrote:
Thanks a lot.
You ought to be able to add a Control.Monad.CatchIO.catch clause to
your interpreter to catch this kind of errors, if you want.
I forgot to mention that this didn't work for me either.
Thanks for the report!
You are
On Sep 29, 2009, at 8:56 AM, Martin Hofmann wrote:
Hi,
The API of Language.Haskell.Interpreter says, that 'runInterpreter'
runInterpreter :: (MonadCatchIO m, Functor m) =
InterpreterT m a -
m (Either InterpreterError a)
returns 'Left' in case of errors and 'GhcExceptions from
should be done testing the solution
before I hit the send button... Cabal guys, you rock.
Thanks again, Dan.
/Joe
Daniel Gorín wrote:
Hi
Just a wild guess but maybe the interpreter is recompiling (in
runtime) code that has already been compiled to build your
application (in compile-time
Hi
Just a wild guess but maybe the interpreter is recompiling (in
runtime) code that has already been compiled to build your application
(in compile-time). This may lead to inconsistencies since a type such
as HackMail.Data.Main.Types.Filter may refer to two different (and
incompatible)
Hi
Just a wild guess but maybe the interpreter is recompiling (in
runtime) code that has already been compiled to build your application
(in compile-time). This may lead to inconsistencies since a type such
as HackMail.Data.Main.Types.Filter may refer to two different (and
incompatible)
to use it, I need
to not know it...
Perhaps, in fact, I'm doing this wrong. Thanks for the help Daniel,
everyone...
/Joe
Daniel Gorín wrote:
Ok, so I've pulled the latest version and the error I get now is:
Hackmain.hs:70:43:
Ambiguous type variable `a' in the constraint
Hi
I've downloaded Hackmain from patch-tag, but I'm getting a different
error. The error I get is:
Hackmain.hs:63:10:
No instance for (Data.Typeable.Typeable2
Control.Monad.Reader.Reader)
arising from a use of `interpret' at Hackmain.hs:63:10-67
Hint
instances in all the appropriate places. And provided a
(maybe incorrect? Though I'm fairly sure that shouldn't affect the
bug I'm having now) Typeable implementation for Reader, but I still
get this ambiguous type. I'll push the current version asap.
Thanks.
/Joe
Daniel Gorín wrote:
Hi
On Feb 2, 2009, at 1:06 AM, Louis Wasserman wrote:
Is there any sensible way to make
newtype FooT m e = FooT (StateT Bar m e) deriving (MonadState)
work to give instance MonadState Bar (FooT m e)?
That is, I'm asking if there would be a semantically sensible way of
modifying
i would expect to get back the Error from the *first* function in the
sequence of functions in checkHeader (oggHeaderError from the
oggHeader
function). but instead i always see the Error from the *last* function
in the sequence, OggPacketFlagError from the OggPacketFlag function.
why
is
On Oct 25, 2008, at 8:39 PM, Anatoly Yakovenko wrote:
so I am trying to figure out how to use ghc as a library. following
this example, http://www.haskell.org/haskellwiki/GHC/As_a_library, i
can load a module and examine its symbols:
[...]
given Test.hs:
module Test where
hello = hello
On Jun 17, 2008, at 11:08 PM, Don Stewart wrote:
Haskell's type system is based on System F, the polymorphic lambda
calculus. By the Curry-Howard isomorphism, this corresponds to
second-order logic.
just nitpicking a little this should read second-order
propositional logic, right?
(Since this can be of interest to those using the ghc-api I'm cc-ing
the ghc users' list.)
Hi, Evan
The odd behavior you spotted happens only with hint under ghc-6.8. It
turns out the problem was in the session initialization.
Since ghc-6.8 the newSession function no longer receives a
Hi
Something like this would do?
if_ = Compound $ If [(IntLit 6, Suite [] [Break])] Nothing
while_ = Compound $ While (IntLit 6) (Suite [] [if_]) Nothing
f = Program [while_]
-- this one fails
-- f2 = Program [if_]
newtype Ident = Id String
data BinOp = Add
| Sub
data Exp =
26 matches
Mail list logo