I want to write a parser for a Haskell-like type language. Amongst
other things this means having a symbol table of top-level
declarations. So for instance I want to be able to write in my type
language:
> type Foo = Bar Int
>
> data Bar a = Bar String a
I can come up with a parser tha
Oops. The last code sample should have been
> parseDeclarations :: Parser [Declaration]
> parseDeclarations = mdo
> decls <- many ParseDeclaration symbols
> let symbols = makeSymbolTable decls
> return decls
___
Haskell-Cafe mailing
Hi all,
I've been recently toying with a small tool inspired by
the Python tool virtualenv [1].
What it basically allows to do is to setup isolated,
disposable package environments.
You can find a small session example in:
http://www.haskell.org/haskellwiki/PkgEnv
The main benefits should be:
test3 :: MonadState Integer m => String -> m String
Good point. It's interesting that this allows the signature of
test5b to become MonadState Integer m => m Integer (instead of (Monad
m) => StateT Integer (StateT String m) Integer) which is more
general, and (surprisingly to me) does not
Is there any conceivable factoring of GHC that would allow you to
sandwich the core of jhc in between the front and back ends of GHC? Or
are the architectures so fundamentally incompatible as to make this
impossible?
Such a factoring would be one way the community could help, and if
suc
Would it be possible to separate the frontend (Haskell to Core) and backend
(Core to machine code) from the Haskell compilers (requiring a standard Core
language?)
I'm not sure how many extensions required a change to the Core language.
Most likely this is nice in theory but hard in practice?
O
On Sun, Feb 22, 2009 at 07:25:26AM -0700, John A. De Goes wrote:
>
> Is there any conceivable factoring of GHC that would allow you to
> sandwich the core of jhc in between the front and back ends of GHC? Or
> are the architectures so fundamentally incompatible as to make this
> impossible?
On Sun, Feb 22, 2009 at 3:31 AM, Paul Johnson wrote:
> > parseDeclarations :: Parser [Declaration]
> > parseDeclarations = mdo
> > decls <- many ParseDeclaration symbols
> let symbols = makeSymbolTable decls
> > return decls
Given a MonadFix instance, keep in mind that you s
On Sun, Feb 22, 2009 at 03:36:34PM +0100, Peter Verswyvelen wrote:
> Would it be possible to separate the frontend (Haskell to Core) and backend
> (Core to machine code) from the Haskell compilers (requiring a standard Core
> language?)
> I'm not sure how many extensions required a change to the Co
On Sun, Feb 22, 2009 at 8:15 AM, John Meacham wrote:
> On Sun, Feb 22, 2009 at 03:36:34PM +0100, Peter Verswyvelen wrote:
> > Would it be possible to separate the frontend (Haskell to Core) and
> backend
> > (Core to machine code) from the Haskell compilers (requiring a standard
> Core
> > langua
I think doing this work would improve the design of GHC by improving
modularity and factoring out generalized abstractions.
The richest possible core language makes the most sense for a common
core, because what's not needed can always be discarded. From your
description, it sounds like s
On Sun, 2009-02-22 at 13:22 +0100, Paolo Losi wrote:
> To test it, download it from
>
> http://bitbucket.org/pao/pkgenv/raw/488bfe8e58dd/pkgenv
>
> chmod a+x and drop to an executable directory.
>
> Any feedback would be really appreciated.
> Is this useful at all?
> Are there better ways to re
Quick question.
In Linux, if you want to find the PID of a process, you use getProcessID from
System.Posix.Process.
How do you do the same under Windows? I cannot find the equivalent function
in System.Win32 and searching Google does not yield any useful results.
Thanks.
_
Hello Alexandru,
Sunday, February 22, 2009, 7:38:31 PM, you wrote:
> In Linux, if you want to find the PID of a process, you use getProcessID from
"The GetCurrentProcessId function returns the process identifier of the calling
process.
DWORD GetCurrentProcessId(VOID)"
you need to make FFI imp
Duncan Coutts wrote:
Would it be useful to have cabal-install check a env var for its config
file?
Definitely yes.
This would allow dropping the dependency on bash aliasing and
make porting to Windows fairly easy.
Thanks
Paolo
___
Haskell-Cafe mail
On Sun, Feb 22, 2009 at 9:20 AM, Luis O'Shea wrote:
>> test3 :: MonadState Integer m => String -> m String
>
> Good point. It's interesting that this allows the signature of test5b to
> become MonadState Integer m => m Integer (instead of (Monad m) => StateT
> Integer (StateT String m) Integer) w
Felipe Lessa wrote:
> On Sun, Feb 22, 2009 at 2:08 AM, Antoine Latter
> wrote:
> > The goal of XHB is to provide a Haskell implementation of the X11
> > wire protocol, similar in spirit to the X protocol C-language
> > Binding (XCB).
> [snip]
> > Related projects:
> >
> > X C Bindings: http://xc
Am Sonntag, 22. Februar 2009 18:53 schrieb David Menendez:
> On Sun, Feb 22, 2009 at 9:20 AM, Luis O'Shea wrote:
> >> test3 :: MonadState Integer m => String -> m String
> >
> > Good point. It's interesting that this allows the signature of test5b to
> > become MonadState Integer m => m Integer (
On Sun, Feb 22, 2009 at 3:17 PM, Daniel Fischer
wrote:
> test5b :: (Monad (StateT [Char] (StateT s m)),
> MonadState s (StateT s m),
> Num s,
> Monad m) =>
> m s
Doesn't 'Monad m' imply 'MonadState s (StateT s m)' which implies
'Monad (StateT s m)' which imp
On Sun, 2009-02-22 at 18:38 +0100, Paolo Losi wrote:
> Duncan Coutts wrote:
>
> > Would it be useful to have cabal-install check a env var for its config
> > file?
>
> Definitely yes.
> This would allow dropping the dependency on bash aliasing and
> make porting to Windows fairly easy.
Ok, I've
Am Sonntag, 22. Februar 2009 19:29 schrieb Felipe Lessa:
> Did I make any mistakes?
No, I did. I didn't read it properly, saw the "MonadState s ..." there and
thought it was MonadState s m instead of MonadState s (StateT s m).
Sorry,
Daniel
___
Haskel
While working on extending scion I got some trouble and wonder which is
the best way to do this?
I have to pass a compilation result from a scion process instance to the
scion daemon process. Of course I'd just like to use a simple Read Show
for that. However I can't because two datatypes are Nomi
On Sun, Feb 22, 2009 at 12:55 PM, Marc Weber wrote:
> While working on extending scion I got some trouble and wonder which is
> the best way to do this?
>
> I have to pass a compilation result from a scion process instance to the
> scion daemon process. Of course I'd just like to use a simple Rea
On Sun, Feb 22, 2009 at 11:58 AM, Achim Schneider wrote:
>
> I once thought of hacking away on exactly that, but got demotivated by
> the fact that all that xlib code would have to be replaced (including
> xmonad-contrib). While nowadays xlib programs are compatible with xcb,
> because xlib itself
Hi
I don't want to get in to a platform war (which I certainly don't have
time to engage in - plus its not nearly as much fun over email vs
sitting in a pub with some beer having a platform war). Martijn's
thoughts of +windows, +unix, +os is exactly right, I'm happy to let
users say "oh, please sh
sitting in a pub with some beer having a platform war). Martijn's
thoughts of +windows, +unix, +os is exactly right, I'm happy to let
users say "oh, please show me these packages", but there are
trade-offs in Hoogle design. If someone has some clear viewpoint on
the answers, I'd love to hear them.
On Sun, Feb 22, 2009 at 1:04 PM, Neil Mitchell wrote:
> 1) What packages should Hoogle search by default?
At the very least - all of the Haskell Platform. If/when it searches
more (+hackage flag?), perhaps the results could be ordered to place
the HP functions first.
> 2) What groups of package
On Fri, 20 Feb 2009, Louis Wasserman wrote:
Hmmm. That's probably a better framework to draw on for the general array
interface.
For a list of all such low-level arrays, see:
http://www.haskell.org/haskellwiki/Storable_Vector
StorableVectors can also be manipulated in ST monad.__
Hi,
I read here:
www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Exception.html
that this is declared:
---
class (Typeable e, Show e) => Exception e where
toException :: e -> SomeException
fromException :: SomeException -> Maybe e
---
I understand this means Excepton is a clas
On Sun, Feb 22, 2009 at 9:41 PM, Maurício wrote:
> www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Exception.html
These are the docs for the latest GHC version.
> Type constructor `Exception' used as a class
> In the instance declaration for `Exception DbError'
What GHC version do
>I usually use Data.Binary for serialization.
Sure. But you can't derive Data.Binary easily for NominalDiffTime.
That's the point. You can only do so by using toReal or by adding
data MyOwnPico = MyOwnPico only to create serialization instances.
I don't like this kind of code duplication..
Mar
On Sun, Feb 22, 2009 at 5:23 PM, Marc Weber wrote:
>>I usually use Data.Binary for serialization.
> Sure. But you can't derive Data.Binary easily for NominalDiffTime.
> That's the point. You can only do so by using toReal or by adding
> data MyOwnPico = MyOwnPico only to create serialization i
Forwarded to the list:
By the way, there are important packages such are haskell plugins, that have
also this same single obstacle for workining under Windows.
Many have basically the same bash script that test the type of c compiler,
which fails miserably under windows:
example output:
checking
33 matches
Mail list logo