Re: [Haskell-cafe] simple parsec question
Carlo, Thanks a lot! This looks very promising (though I have to test it for my purpose more in depth). As you mention, the key seems to be the optionMaybe combinator. Thanks for pointing to it. Immanuel 2013/3/5 Carlo Hamalainen carlo.hamalai...@gmail.com On Mon, Mar 4, 2013 at 1:44 AM, Immanuel Normann immanuel.norm...@googlemail.com wrote: I am trying to parse a semi structured text with parsec that basically should identify sections. Each section starts with a headline and has an unstructured content - that's all. Here's my attempt: https://gist.github.com/carlohamalainen/5087207 {-# LANGUAGE FlexibleContexts #-} import Text.Parsec import Control.Applicative hiding ((|),many) -- Example input: {- top 1: some text ... bla top 2: more text ... bla bla -} data Top = Top String deriving (Show) data Content = Content [String] deriving (Show) data Section = Section Top Content deriving (Show) headline = do t - many1 (noneOf :\n) char ':' newline return $ Top t contentLine = do x - many (noneOf :\n) newline return x content = do line - optionMaybe (try contentLine) case line of Just x - do xs - content return (x:xs) _ - return [] section = do h - headline c - Content $ content return $ Section h c main = do x - readFile simple.txt print $ parse (many section) x Example run using your sample data: $ runhaskell Simple.hs Right [Section (Top top 1) (Content [,some text ... bla,]),Section (Top top 2) (Content [,more text ... bla bla,])] Notes: * I had to assume that a content line does not contain a ':', because that is the only way to distinguish a head-line (correct me if I'm wrong). * The key was to use optionMaybe along with try; see the definition of content. * I haven't tested this code on very large inputs. * I slightly changed the definition of Content to have a list of Strings, one for each line. I'm sure this could be altered if you wanted to retain all whitespace. * I am still new to Parsec, so don't take this as the definitive answer ;-) -- Carlo Hamalainen http://carlo-hamalainen.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] simple parsec question
Andrey, Thanks a lot for your effort! I have the same suspect that the lookahead in the content parser is the problem, but I don't know how to solve it either. At least the I learned from your code that noneOf is also a quite useful parser in this context which I have overlooked. Anyway, if you find a solution it would be great! In the end the task itself doesn't look very specific, but rather general: an alternation between strictly (the headline in my case) and loosely (the content in my case) structured text. It shouldn't be difficult to build a parser for such a setting. (btw. I am aware the my test parser would (or rather should) parse only the first section. For testing this would be sufficient.) 2013/3/4 Andrey Chudnov achud...@gmail.com Immanuel, I tried but I couldn't figure it out. Here's a gist with my attempts and results so far: https://gist.github.com/achudnov/f3af65f11d5162c73064There, 'test' uses my attempt at specifying the parser, 'test2' uses yours. Note that your attempt wouldn't parse multiple sections -- for that you need to use 'many section' instead of just 'section' in 'parse' ('parseFromFile' in the original). I think what's going on is the lookahead is wrong, but I'm not sure how exactly. I'll give it another go tomorrow if I have time. /Andrey On 03/03/2013 05:16 PM, Immanuel Normann wrote: Andrey, Thanks for your attempt, but it doesn't seem to work. The easy part is the headline, but the content makes trouble. Let me write the code a bit more explicit, so you can copy and paste it: -- {-# LANGUAGE FlexibleContexts #-} module Main where import Text.Parsec data Top = Top String deriving (Show) data Content = Content String deriving (Show) data Section = Section Top Content deriving (Show) headline :: Stream s m Char = ParsecT s u m Top headline = manyTill anyChar (char ':' newline) = return . Top content :: Stream s m Char = ParsecT s u m Content content = manyTill anyChar (try headline) = return . Content section :: Stream s m Char = ParsecT s u m Section section = do {h - headline; c - content; return (Section h c)} -- Assume the following example text is stored in /tmp/test.txt: --- top 1: some text ... bla top 2: more text ... bla bla --- Now I run the section parser in ghci against the above mentioned example text stored in /tmp/test.txt: *Main parseFromFile section /tmp/test.txt Right (Section (Top top 1) (Content )) I don't understand the behaviour of the content parser here. Why does it return ? Or perhaps more generally, I don't understand the manyTill combinator (though I read the docs). Side remark: of cause for this little task it is probably to much effort to use parsec. However, my content in fact has an internal structure which I would like to parse further, but I deliberately abstracted from these internals as they don't effect my above stated problem. Immanuel 2013/3/3 Andrey Chudnov achud...@gmail.com Immanuel, Since a heading always starts with a new line (and ends with a colon followed by a carriage return or just a colon?), I think it might be useful to first separate the input into lines and then classify them depending on whether it's a heading or not and reassemble them into the value you need. You don't even need parsec for that. However, if you really want to use parsec, you can write something like (warning, not tested): many $ liftM2 Section headline content where headline = anyChar `manyTill` (char ':' spaces newline) content = anyChar `manyTill` (try $ newline headline) /Andrey On 3/3/2013 10:44 AM, Immanuel Normann wrote: I am trying to parse a semi structured text with parsec that basically should identify sections. Each section starts with a headline and has an unstructured content - that's all. For instance, consider the following example text (inside the dashed lines): --- top 1: some text ... bla top 2: more text ... bla bla --- This should be parsed into a structure like this: [Section (Top 1) (Content some text ... bla), Section (Top 1) (Content more text ... bla)] Say, I have a parser headline, but the content after a headline could be anything that is different from what headline parses. How could the section parser making use of headline look like? My idea would be to use the manyTill combinator, but I dont find an easy solution. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] simple parsec question
Hi, I am trying to parse a semi structured text with parsec that basically should identify sections. Each section starts with a headline and has an unstructured content - that's all. For instance, consider the following example text (inside the dashed lines): --- top 1: some text ... bla top 2: more text ... bla bla --- This should be parsed into a structure like this: [Section (Top 1) (Content some text ... bla), Section (Top 1) (Content more text ... bla)] Say, I have a parser headline, but the content after a headline could be anything that is different from what headline parses. How could the section parser making use of headline look like? My idea would be to use the manyTill combinator, but I dont find an easy solution. Many thanks for any hint Immanuel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] simple parsec question
Andrey, Thanks for your attempt, but it doesn't seem to work. The easy part is the headline, but the content makes trouble. Let me write the code a bit more explicit, so you can copy and paste it: -- {-# LANGUAGE FlexibleContexts #-} module Main where import Text.Parsec data Top = Top String deriving (Show) data Content = Content String deriving (Show) data Section = Section Top Content deriving (Show) headline :: Stream s m Char = ParsecT s u m Top headline = manyTill anyChar (char ':' newline) = return . Top content :: Stream s m Char = ParsecT s u m Content content = manyTill anyChar (try headline) = return . Content section :: Stream s m Char = ParsecT s u m Section section = do {h - headline; c - content; return (Section h c)} -- Assume the following example text is stored in /tmp/test.txt: --- top 1: some text ... bla top 2: more text ... bla bla --- Now I run the section parser in ghci against the above mentioned example text stored in /tmp/test.txt: *Main parseFromFile section /tmp/test.txt Right (Section (Top top 1) (Content )) I don't understand the behaviour of the content parser here. Why does it return ? Or perhaps more generally, I don't understand the manyTill combinator (though I read the docs). Side remark: of cause for this little task it is probably to much effort to use parsec. However, my content in fact has an internal structure which I would like to parse further, but I deliberately abstracted from these internals as they don't effect my above stated problem. Immanuel 2013/3/3 Andrey Chudnov achud...@gmail.com Immanuel, Since a heading always starts with a new line (and ends with a colon followed by a carriage return or just a colon?), I think it might be useful to first separate the input into lines and then classify them depending on whether it's a heading or not and reassemble them into the value you need. You don't even need parsec for that. However, if you really want to use parsec, you can write something like (warning, not tested): many $ liftM2 Section headline content where headline = anyChar `manyTill` (char ':' spaces newline) content = anyChar `manyTill` (try $ newline headline) /Andrey On 3/3/2013 10:44 AM, Immanuel Normann wrote: I am trying to parse a semi structured text with parsec that basically should identify sections. Each section starts with a headline and has an unstructured content - that's all. For instance, consider the following example text (inside the dashed lines): --- top 1: some text ... bla top 2: more text ... bla bla --- This should be parsed into a structure like this: [Section (Top 1) (Content some text ... bla), Section (Top 1) (Content more text ... bla)] Say, I have a parser headline, but the content after a headline could be anything that is different from what headline parses. How could the section parser making use of headline look like? My idea would be to use the manyTill combinator, but I dont find an easy solution. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] cannot install base-4.3.1.0 package
Hi, how can I install the base-4.3.1.0 package. I tried first cabal install base that gives me this error: Resolving dependencies... cabal: Distribution/Client/Dependency/TopDown.hs:169:37-73: Non-exhaustive patterns in lambda I googled for this error and found nothing but the simple statement in the track system http://hackage.haskell.org/trac/hackage/ticket/605: cabal install base is not expected to work, however the error message should be better, see #597. (but the link to #547 doesn't solve the problem either) So I downloaded base-4.3.1.0 package from hackage and run: runhaskell Setup configure which gives this error: Setup.hs:1:0: attempting to use module `Prelude' (./Prelude.hs) which is not loaded Then I noticed that there is configure script in the base-4.3.1.0 dir, so executed this which yields this error message: config.status: error: cannot find input file: `base.buildinfo.in' Why is it so complicated to install the base package? Thanks for any help! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] FGL problem: cannot acces data constructor NodeMap
Hi, I have a problem with the data constructor NodeMap Data.Graph.Inductive.NodeMap of the graph library fgl-5.4.2.3 (also fgl-5.4.2.2): I cannot access the data constructor NodeMap, as the ghci session shows: Prelude :m Data.Graph.Inductive.NodeMap Prelude Data.Graph.Inductive.NodeMap :t NodeMap interactive:1:0: Not in scope: data constructor `NodeMap' However, when I load the source directly it works: Prelude :l Data/Graph/Inductive/NodeMap.hs [1 of 3] Compiling Data.Graph.Inductive.Graph ( Data/Graph/Inductive/Graph.hs, interpreted ) [2 of 3] Compiling Data.Graph.Inductive.Internal.FiniteMap ( Data/Graph/Inductive/Internal/FiniteMap.hs, interpreted ) [3 of 3] Compiling Data.Graph.Inductive.NodeMap ( Data/Graph/Inductive/NodeMap.hs, interpreted ) Ok, modules loaded: Data.Graph.Inductive.Internal.FiniteMap, Data.Graph.Inductive.Graph, Data.Graph.Inductive.NodeMap. *Data.Graph.Inductive.NodeMap :t NodeMap NodeMap :: (Ord a) = FiniteMap a Node - Int - NodeMap a Why is that so? Afterall, my purpose is to get access to the map in a NodeMap and finally to apply lookup to it. But I don't know how to access the map from a NodeMap (the map selector isn't accessible either). Immanuel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] FGL problem: cannot acces data constructor NodeMap
2010/7/24 Ivan Lazar Miljenovic ivan.miljeno...@gmail.com Once again cc-ing -cafe; Immanuel, can you please do reply to all rather than just reply in GMail? :p Oh, yes I forgot - sorry! Thanks for all the valuable infos :-) Immanuel Immanuel Normann immanuel.norm...@googlemail.com writes: 2010/7/24 Ivan Lazar Miljenovic ivan.miljeno...@gmail.com CC-ing haskell-cafe again: Immanuel Normann immanuel.norm...@googlemail.com writes: 2010/7/24 Ivan Lazar Miljenovic ivan.miljeno...@gmail.com Some of my lnodes in the graph have by construction unique labels and I want to lookup the lnode from a graph given only the label of that lnode. Well, from my understanding NodeMap doesn't do what you want, since it assumes that _all_ of the node labels are unique I wouldn't bother when NodeMap maps also non-unique labels to single nodes, because I only lookup nodes with unique labels, e.g. assume my label are of the form data Label = Unique String | Multi Label I'm of the suspicion that using NodeMaps in this fashion will have problem when considering nodes with the same label (even if you don't explicitly use it for those nodes), as NodeMap seems to assume that node labels are unique. For example, mkNode assumes node labels are unique. Furthemore, the way of using it seems to be analogous of how one would use a State monad rather than for actual interactive use throughout. Could you elaborate this further, please. http://hackage.haskell.org/packages/archive/fgl/5.4.2.3/doc/html/Data-Graph-Inductive-NodeMap.html#v%3Arun and http://hackage.haskell.org/packages/archive/fgl/5.4.2.3/doc/html/Data-Graph-Inductive-NodeMap.html#v%3Arun_ If you just want a mapping from labels to nodes, you may be better off using your own custom Map (and maybe even defining a new graph type that has such a Map as part of it). The successor to FGL-5.x (whatever we'll end up calling it) will allow you to have custom node types rather than using Ints. However, this will not work for you in this situation. The node type is just an _index_ type, analogous to the actual hash value in a hash{map,array} (as opposed to the value which has the hashing function applied upon it). It's there to provide a unique identifier for a particular node. Arguably, an abstract type would be even better as an Int as it will prevent you from doing silly things like adding node indices together, but that's beside the point. If you wish to find a node with a specific label, try using something like gsel: http://hackage.haskell.org/packages/archive/fgl/5.4.2.3/doc/html/Data-Graph-Inductive-Basic.html#v%3Agsel -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] haskelldb problem
Hi, I have problems with the usage of the DBSpec module. The following used to work a year ago: testDB :: DBInfo testDB = makeDBSpec testDB (DBOptions False) [t1] t1 :: TInfo t1 = makeTInfo t1 [c1,c2] c1 :: CInfo c1 = makeCInfo c1 (IntT,False) c2 :: CInfo c2 = makeCInfo c2 (StringT,False) Now the problem is type error in (DBOptions False): Couldn't match expected type `DBOptions' against inferred type `Database.HaskellDB.DBSpec.PPHelpers.MakeIdentifiers So my precise problem is the usage of that MakeIdentifiers: MakeIdentifiers moduleName :: String - String identifier :: String - String toType :: String - String Could someone please demonstrate how to use MakeIdentifiers reasonably e.g. for the above testDB? And more general: I cannot find uptodate documentation on haskelldb. Is there something around? Thanks Immanuel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] haskelldb problem
Hi, I have problems with the usage of the DBSpec module. The following used to work a year ago: testDB :: DBInfo testDB = makeDBSpec testDB (DBOptions False) [t1] t1 :: TInfo t1 = makeTInfo t1 [c1,c2] c1 :: CInfo c1 = makeCInfo c1 (IntT,False) c2 :: CInfo c2 = makeCInfo c2 (StringT,False) Now the problem is type error in (DBOptions False): Couldn't match expected type `DBOptions' against inferred type `Database.HaskellDB.DBSpec. PPHelpers.MakeIdentifiers So my precise problem is the usage of that MakeIdentifiers: MakeIdentifiers moduleName :: String - String identifier :: String - String toType :: String - String Could someone please demonstrate how to use MakeIdentifiers reasonably e.g. for the above testDB? And more general: I cannot find uptodate documentation on haskelldb. Is there something around? Thanks Immanuel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] manipulating predicate formulae
Hi Ganesh, manipulating predicate formulae was a central part of my PhD research. I implemented some normalization and standarcization functions in Haskell - inspired by term rewriting (like normalization to Boolean ring representation) as well as (as far as I know) novell ideas (standardization of quantified formulae w.r.t associativity and commutativity). If you are interested in that stuff I am pleased to provide you with more information. May be you can describe in more detail what you are looking for. Best, Immanuel 2008/11/30 Ganesh Sittampalam [EMAIL PROTECTED] Hi, Are there any Haskell libraries around for manipulating predicate formulae? I had a look on hackage but couldn't spot anything. I am generating complex expressions that I'd like some programmatic help in simplifying. Cheers, Ganesh ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] manipulating predicate formulae
Hi, you can browse my code here.http://trac.informatik.uni-bremen.de:8080/hets/browser/trunk/Search/CommonIt has become part of Hets http://www.dfki.de/sks/hets the Heterogeneous Tool Set which is a parsing, static analysis and proof management tool combining various tools for different specification languages. However, let me warn you: the code isn't yet well documented at parts also ad hoc. Don't know whether it can help to solve your tasks. The goal of my normalization code is to bring formulae via equivalence transformations and alpha-renaming into a standard or normal form such that for instance the following three formulae become syntactically identical (i.e. not just modulo alpha equivalence or modulo associativity and commutativity): \begin{enumeratenumeric} \item $\forall \varepsilon . \varepsilon 0 \Rightarrow \exists \delta . \forall x. \forall y. 0 |x - y| \wedge |x - y| \delta \Rightarrow | f (x) - f (y) | \varepsilon$ \item $\forall \varepsilon . \exists \delta . \forall x, y. \varepsilon 0 \Rightarrow (0 |x - y| \wedge |x - y| \delta \Rightarrow | f (x) - f (y) | \varepsilon)$ \item $\forall e . \exists d . \forall a,b. e 0 \wedge |a - b| d \wedge 0 |a - b| \Rightarrow | f (a) - f (b) | e$ \end{enumeratenumeric} Cheers, Immanuel 2008/12/4 Ganesh Sittampalam [EMAIL PROTECTED] Hi, That sounds like it might be quite useful. What I'm doing is generating some predicates that involve addition/subtraction/comparison of integers and concatenation/comparison of lists of some abstract thing, and then trying to simplify them. An example would be simplifying \exists p_before . \exists p_after . \exists q_before . \exists q_after . \exists as . \exists bs . \exists cs . (length p_before == p_pos length q_before == q_pos (p_before == as q_after == cs) p_before ++ p_new ++ p_after == as ++ p_new ++ bs ++ q_old ++ cs as ++ p_new ++ bs ++ q_old ++ cs == q_before ++ q_old ++ q_after) into q_pos - (p_pos + length p_new) = 0 which uses some properties of length as well as some arithmetic. I don't expect this all to be done magically for me, but I'd like as much help as possible - at the moment I've been growing my own library of predicate transformations but it's all a bit ad-hoc. If I could look at your code I'd be very interested. Cheers, Ganesh On Thu, 4 Dec 2008, Immanuel Normann wrote: Hi Ganesh, manipulating predicate formulae was a central part of my PhD research. I implemented some normalization and standarcization functions in Haskell - inspired by term rewriting (like normalization to Boolean ring representation) as well as (as far as I know) novell ideas (standardization of quantified formulae w.r.t associativity and commutativity). If you are interested in that stuff I am pleased to provide you with more information. May be you can describe in more detail what you are looking for. Best, Immanuel 2008/11/30 Ganesh Sittampalam [EMAIL PROTECTED] Hi, Are there any Haskell libraries around for manipulating predicate formulae? I had a look on hackage but couldn't spot anything. I am generating complex expressions that I'd like some programmatic help in simplifying. Cheers, Ganesh ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Starting Haskell with a web application
Where can I find the sources of the latest WASH? I couldn't find them in HackageDB (and neither with Google). -- Immanuel Normann 2008/3/6 Lars Viklund [EMAIL PROTECTED]: On Wed, Mar 05, 2008 at 10:52:07AM -0800, Bryan O'Sullivan wrote: Jonathan Gardner wrote: There's also WASH, but that has an even lower profile. I couldn't tell you if it sees much use, or even builds with recent compilers. The HTML component of WASH builds rather cleanly with GHC 6.8.2 after enabling the following extensions: MultiParamTypeClasses FlexibleContexts FlexibleInstances TypeSynonymInstances I use it for my statically generated blog, together with sqlite3. I've modified WASH/HTML to spit out reasonably correct XHTML as well. As for the rest of WASH, I have no idea since I had no need for it. -- Lars Viklund | [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] haskelldb basic documentation needed
with the release update haskelldb-0.9 - haskelldb-0.10 several things have changed. Unfortunately the API documentation does not give enough information in generall. Is there any additional uptodate documentation around? In particular the fundamental function connect hast a new signature: *connect* :: (forall m a . MonadIOhttp://hackage.haskell.org/packages/archive/mtl/1.1.0.0/doc/html/Control-Monad-Trans.html#t%3AMonadIOm = [( Stringhttp://hackage.haskell.org/packages/archive/base/3.0.0.0/doc/html/Data-Char.html#t%3AString, Stringhttp://hackage.haskell.org/packages/archive/base/3.0.0.0/doc/html/Data-Char.html#t%3AString)] - (Databasefile:///usr/share/doc/haskelldb-0.10/Database-HaskellDB-Database.html#t%3ADatabase- m a) - m a) I don't know what pairs of strings this function needs. The API description is to unspecific: The connectfile:///usr/share/doc/haskelldb-0.10/Database-HaskellDB-DriverAPI.html#v%3Aconnectfunction takes some driver specific name, value pairs use to setup the database connection, and a database action to run. What are the specific name value pairs needed (for a connection to a mysql db )? Immanuel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Installation of GLFW package
Am Dienstag, den 02.10.2007, 23:18 +0800 schrieb Paul L: It seems like the GLFW C binaries wasn't included in your GLFW Haskell module installed. Did you do the last step by running install.bat or install.sh instead of runhaskell Setup install? now it works! ... although I am unfortunately not able to reconstruct what I did to make it running. Thank you, Immanuel Regards, Paul Liu On 10/2/07, Immanuel Normann [EMAIL PROTECTED] wrote: Hello, I have just read the thread about installation of GLUT package started at 9/3/2007 by Ronald Guida. Installation of the GLFW package is very much related to that. However, I haven't found the solution for installing the GLFW successsfully. I have downloaded http://www.cs.yale.edu/homes/hl293/download/GLFW-20070804.zip and followed the compile and installation instructions from the README.txt file. Actually I haven't noticed any error messages. Then I tried SimpleGraphics from SOE (downloaded from http://www.cs.yale.edu/homes/hl293/download/SOE-20070830.zip) with ghci-6.6. Again loading the file did not raise any error. But when I tried to start main = runGraphics ( do w - openWindow My First Graphics Program (300,300) drawInWindow w (text (100,200) Hello Graphics World) k - getKey w closeWindow w ) I got this error message: During interactive linking, GHCi couldn't find the following symbol: GLFWzm0zi1_GraphicsziUIziGLFW_initializze_closure This may be due to you not asking GHCi to load extra object files, archives or DLLs needed by your current session. Restart GHCi, specifying the missing library using the -L/path/to/object/dir and -lmissinglibname flags, or simply by naming the relevant files on the GHCi command line. Alternatively, this link failure might indicate a bug in GHCi. Here I am lost. What is the missing library? Regards, Immanuel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Installation of GLFW package
Hello, I have just read the thread about installation of GLUT package started at 9/3/2007 by Ronald Guida. Installation of the GLFW package is very much related to that. However, I haven't found the solution for installing the GLFW successsfully. I have downloaded http://www.cs.yale.edu/homes/hl293/download/GLFW-20070804.zip and followed the compile and installation instructions from the README.txt file. Actually I haven't noticed any error messages. Then I tried SimpleGraphics from SOE (downloaded from http://www.cs.yale.edu/homes/hl293/download/SOE-20070830.zip) with ghci-6.6. Again loading the file did not raise any error. But when I tried to start main = runGraphics ( do w - openWindow My First Graphics Program (300,300) drawInWindow w (text (100,200) Hello Graphics World) k - getKey w closeWindow w ) I got this error message: During interactive linking, GHCi couldn't find the following symbol: GLFWzm0zi1_GraphicsziUIziGLFW_initializze_closure This may be due to you not asking GHCi to load extra object files, archives or DLLs needed by your current session. Restart GHCi, specifying the missing library using the -L/path/to/object/dir and -lmissinglibname flags, or simply by naming the relevant files on the GHCi command line. Alternatively, this link failure might indicate a bug in GHCi. Here I am lost. What is the missing library? Regards, Immanuel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] literate Haskell newbie question
I am a newbie to literate Haskell and these are my two simple questions: How do I compile a literate haskell file foo.lhs (using ghc-6.6)? Is there a tool that translates foo.lhs to foo.hs? Surprisingly I don't find the answer in http://haskell.org/haskellwiki/Literate_programming whereas a lot about translation into tex-files can be found. Thanks, Immanuel begin:vcard fn:Immanuel Normann n:;Immanuel Normann email;internet:[EMAIL PROTECTED] tel;work:+49 421 200 3168 tel;fax:+49 421 200 3103 x-mozilla-html:TRUE version:2.1 end:vcard ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe