Re: [Haskell] Tools for web-based Haskell editing & compilation?
conal: > Has anyone set up GHC to run on a server with modules created, saved, > edited, imported, and executed via a web interface?? Are there tools > existing or under development that support some or all of this scenario? Sounds a bit like Pivot, I think. http://www.cs.kent.ac.uk/projects/pivotal with some flavour of HSP behaving as a compiler server? http://www.cs.chalmers.se/~d00nibro/hsp and hasp: http://scannedinavian.com/~lemmih/hasp -- Don ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
[Haskell] Tools for web-based Haskell editing & compilation?
Has anyone set up GHC to run on a server with modules created, saved, edited, imported, and executed via a web interface? Are there tools existing or under development that support some or all of this scenario? I'm working on a new implementation, "Pajama", of the Pan functional image synthesis DSEL, this time with the compiler targetting Java applets. (The image compiler is implemented in Haskell and generates Java code.) Besides running image effects, I'd also like to allow people to author new effects without having any software installed (GHC, the Pajama compiler, or the Java compiler). For starters, I'm thinking of an editor applet (running in a web page) and a compile server. Ideally, the editor would do syntax coloring and checking, show type annotations, etc, though it doesn't have to do so initially. When a module compiles successfully, the user would select definitions that would get run to generate Java code, which would then be compiled on the server and downloaded to the client via an html applet tag. Thanks, - Conal ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
RE: [Haskell] Hlist distribution -- compiler error in TIP
Dear Frank, HList is definitely tested with 6.4. See transcript below. My guess would be that you are perhaps not running with options as stated in the Makefile. Anyway, if your problems persist, I am happy to take this offline. Merry Christmas, Ralf [EMAIL PROTECTED] ~/projects/HList/src $ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.4 [EMAIL PROTECTED] ~/projects/HList/src $ make test ghci -fglasgow-exts -fallow-overlapping-instances -fallow-undecidable-instances MainGhcGeneric1.hs -v0 < Main.in > MainGhcGeneric1.out diff -b MainGhcGeneric1.out MainGhcGeneric1.ref ghci -fglasgow-exts -fallow-overlapping-instances -fallow-undecidable-instances MainGhcTTypeable.hs -v0 < Main.in > MainGhcTTypeable.out diff -b MainGhcTTypeable.out MainGhcTTypeable.ref runhugs -98 +o MainHugsTTypeable.hs < Main.in > MainHugsTTypeable.out diff -b MainHugsTTypeable.out MainHugsTTypeable.ref ghci -fglasgow-exts -fallow-overlapping-instances -fallow-undecidable-instances MainPosting-040607.hs -v0 < Main.in > MainPosting-040607.out diff -b MainPosting-040607.out MainPosting-040607.ref ghci -fglasgow-exts -fallow-overlapping-instances -fallow-undecidable-instances MainGhcGeneric2.hs -v0 < Main.in > MainGhcGeneric2.out diff -b MainGhcGeneric2.out MainGhcGeneric2.ref ghci -fglasgow-exts -fallow-overlapping-instances -fallow-undecidable-instances MainGhcGeneric3.hs -v0 < Main.in > MainGhcGeneric3.out diff -b MainGhcGeneric3.out MainGhcGeneric3.ref [EMAIL PROTECTED] ~/projects/HList/src > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Frank > Sent: Saturday, December 24, 2005 8:46 AM > To: haskell@haskell.org > Subject: [Haskell] Hlist distribution -- compiler error in TIP > > I just got the Hlist distribution but could not compile the example files > With ghc 6.4 (I use ghci - in eclipse - I did not use ghc with the > makefile). > > I got the following compile time error on module TIP: > > > C:\gisCodev13\HeterogenousList\src/TIP.hs:247:22: > Could not deduce (HType2HNat e l n1, > HDeleteAtHNat n1 l l'1, > HOccurs e (TIP l), > HOccurs e2 (TIP l'1)) > from the context (HOccurs e1 (TIP l), > HType2HNat e1 l n, > HDeleteAtHNat n l l', > HOccurs e2 (TIP l'), > HOccurs e2 (TIP l), > HType2HNat e2 l n', > HDeleteAtHNat n' l l'', > HOccurs e1 (TIP l'')) > arising from use of `y' at > C:\gisCodev13\HeterogenousList\src/TIP.hs:247:22 > Probable fix: > add (HType2HNat e l n1, > HDeleteAtHNat n1 l l'1, > HOccurs e (TIP l), > HOccurs e2 (TIP l'1)) > to the type signature(s) for `tuple' > or add an instance declaration for (HOccurs e (TIP l), HOccurs e2 > (TIP > l'1)) > In the definition of `tuple': > tuple (TIP l) > = let > x = hOccurs (TIP l) > l' = hDeleteAtProxy (toProxy x) l > y = hOccurs (TIP l') > in (x, y) > > > Can anybody quickly see, what is wrong? > > > > Andrew U. Frank > Professor, Head of Department > Geoinformation and Cartography E127 phone: +43 1 588 01 12710 > TU Vienna secr. +43 1 588 01 12700 > Gusshausstrasse 27-29 fax +43 1 588 01 12799 > A-1040 Vienna Austria cellular phone +43 676 41925 72 > http://www.geoinfo.tuwien.ac.at/persons/frank/frank.html > skype:AndrewUFrank > > ___ > Haskell mailing list > Haskell@haskell.org > http://www.haskell.org/mailman/listinfo/haskell ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
[Haskell] Hlist distribution -- compiler error in TIP
I just got the Hlist distribution but could not compile the example files With ghc 6.4 (I use ghci - in eclipse - I did not use ghc with the makefile). I got the following compile time error on module TIP: C:\gisCodev13\HeterogenousList\src/TIP.hs:247:22: Could not deduce (HType2HNat e l n1, HDeleteAtHNat n1 l l'1, HOccurs e (TIP l), HOccurs e2 (TIP l'1)) from the context (HOccurs e1 (TIP l), HType2HNat e1 l n, HDeleteAtHNat n l l', HOccurs e2 (TIP l'), HOccurs e2 (TIP l), HType2HNat e2 l n', HDeleteAtHNat n' l l'', HOccurs e1 (TIP l'')) arising from use of `y' at C:\gisCodev13\HeterogenousList\src/TIP.hs:247:22 Probable fix: add (HType2HNat e l n1, HDeleteAtHNat n1 l l'1, HOccurs e (TIP l), HOccurs e2 (TIP l'1)) to the type signature(s) for `tuple' or add an instance declaration for (HOccurs e (TIP l), HOccurs e2 (TIP l'1)) In the definition of `tuple': tuple (TIP l) = let x = hOccurs (TIP l) l' = hDeleteAtProxy (toProxy x) l y = hOccurs (TIP l') in (x, y) Can anybody quickly see, what is wrong? Andrew U. Frank Professor, Head of Department Geoinformation and Cartography E127 phone: +43 1 588 01 12710 TU Vienna secr. +43 1 588 01 12700 Gusshausstrasse 27-29 fax +43 1 588 01 12799 A-1040 Vienna Austria cellular phone +43 676 41925 72 http://www.geoinfo.tuwien.ac.at/persons/frank/frank.html skype:AndrewUFrank ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
Re: [Haskell] Problem with constructing instances for a class Pair
Hello Frank, Saturday, December 24, 2005, 12:02:28 AM, you wrote: F> class P a where F> outl :: a b c -> b F> outr :: a b c -> c F> make :: b -> c -> a b c reusing my answer to David Roundy :))) are you seen in Hugs manual chapter about multi-parameter type classes? they use the following class Collects e ce | ce -> e where empty :: ce insert :: e -> ce -> ce member :: e -> ce -> Bool instance Eq e => Collects e [e] where ... instance Eq e => Collects e (e -> Bool) where ... instance Collects Char BitSet where ... instance (Hashable e, Collects a ce) => Collects e (Array Int ce) where ... may be you can solve your problem by using {-# OPTIONS_GHC -fglasgow-exts #-} class P b c abc | abc -> b, abc -> b where outl :: abc -> b outr :: abc -> c make :: b -> c -> abc instance P b c (P1 b c) where outl (P1 p q) = p outr (P1 p q) = q make = P1 instance P b c (P2 b c) where outl = fst outr = snd make = (,) data P1 p q = P1 p qderiving (Show, Eq, Ord) type P2 = (,) instance (P b c abc) => P [b] [c] [abc] where outl = undefined outr = undefined make = zipWith make although it is a bit too verbose... and have problems with defining outl/outr F> Andrew U. Frank F> Professor, Head of Department i helped Professor? wow! :) -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell