Re: [Haskell-cafe] System.FilePath, Request for comments

2006-06-29 Thread Neil Mitchell
Hi 1) there are two independent filepath modules used with little modifications in all projects i seen. They both included in MissingH (FilePath.hs and NameManip.hs). From what I can tell, FilePath.hs is the one from Cabal, which I already used as a reference. As far as I can tell, this

Re: [Haskell-cafe] Win32 GUI bindings

2006-06-27 Thread Neil Mitchell
Hi Jason, As far as I am aware, the Win32 bindings are not that well maintained currently, and programming against the Win32 API is quite painful since it is a very low level, and very C like API. Gtk2Hs does require additional dependancies, but seems to be the most actively developed version.

Re: [Haskell-cafe] A question about stack overflow

2006-06-27 Thread Neil Mitchell
Hi, mymax [] = undefined mymax (x:xs) = f x xs where f x [] = x f x (y:ys) | y x = f y ys | otherwise = f x ys Or if you don't want to go for a fold next, in a style more similar to the original: maximum [] = undefined maximum [x] = x

Re: [Haskell-cafe] haskell companies

2006-06-21 Thread Neil Mitchell
Hi See section 7.1 in the latest HCAR at http://haskell.org/communities/11-2005/html/report.html Thanks Neil On 6/21/06, Andreas Kägi [EMAIL PROTECTED] wrote: hello i wonder if there are companies that use haskell in practice. i'm a computer science student from switzerland (europe) and need

Re: [Haskell-cafe] Re: Functional programming for processing of largeraster images

2006-06-21 Thread Neil Mitchell
Hi, I happen to like laziness, because it means that when I'm not thinking about performance, I don't have to think about evaluation order _at all_. And since my computer is a 750Mhz Athlon with Hugs, I never find any need to worry about performance :) If it ever becomes an issue I can move to

Re: [Haskell-cafe] Parsec and destructuring HTML content

2006-06-18 Thread Neil Mitchell
Hi hugs (winhugs) is rather fast, loading several KLOCs per second, and finally you can compile program with ghc WinHugs (but not Hugs) also has a feature called auto-reload - if you change and save any of the source code files it will automatically detect and reload them - no more :r :)

Re: [Haskell-cafe] take the keywords from a string

2006-06-17 Thread Neil Mitchell
Hi Sara, This function will take the input as a string and return a list of keywords taken from the input string and they are elements of ListOfKeywords. The order of the result list is sequenced as: the last keyword found is set as the first element of the list, and so on. It looks like

Re: [Haskell-cafe] Sets symmetric difference

2006-06-17 Thread Neil Mitchell
Hi, This can quite easily be formulated in terms of union and \\ (set difference), both available in Data.List. Thanks Neil On 6/18/06, Jenny678 [EMAIL PROTECTED] wrote: Hello, Know Somebody the code for symmetric difference (Sets) examples symmetric_difference [1..8][5..7] [1,2,3,4,8]

Re: [Haskell-cafe] take the keywords from a string

2006-06-17 Thread Neil Mitchell
Hi On 6/18/06, Sara Kenedy [EMAIL PROTECTED] wrote: Sorry, I am not clear at some point in your answer: 1) The function lex :: String - [(String,String)] and filter :: (a - Bool) - [a] - [a] So, I did not see how filter can use the list of tuple string of lex. You can write a function

Re: [Haskell-cafe] what do you think of haskell ? (yes, it's a bit general ...:)

2006-06-15 Thread Neil Mitchell
Hi Minh, When I write Haskell, its because I want to write the code quickly, not because I want it to run quickly. GHC is a wonderful compiler and makes things go fast, but Hugs is faster at compiling, so I always use Hugs (WinHugs in fact). If your focus is on things going fast, then with

Re: [Haskell-cafe] Closure trace?

2006-06-14 Thread Neil Mitchell
Hi Michael, I have defined fromJustNote and headNote, which take an extra parameter, for example: fromJustNote msg (Just x) = x fromJustNote msg Nothing = error $ fromJustNote failed, ++ msg I also have lookupJust which does a lookup and a fromJust, since this is a common pattern in my

Re: [Haskell-cafe] how to apply a function which returns IO() to a list?

2006-06-14 Thread Neil Mitchell
Hi, I think the kind of structure you are after is something like: writeList [] = return () writeList (x:xs) = do writeHtml x writeList xs Which is already defined for you, using sequence_ Thanks Neil ___

Re: [Haskell-cafe] Bug in WinHugs?

2006-06-13 Thread Neil Mitchell
Hi Lyle, I just installed the May 2006 release of Hugs. When I use the command-line version, the '$$' symbol to reference the last expression works fine. It does not work in WinHugs, but yields 'ERROR - Syntax error in expression (unexpected symbol $$)'. I typed ':set' to verify the '-r$$'

Re: [Haskell-cafe] Separate a string into a list of strings

2006-06-12 Thread Neil Mitchell
Hi, I tend to use the module TextUtil (or Util.Text) from Yhc for these kind of string manipulations: http://www-users.cs.york.ac.uk/~malcolm/cgi-bin/darcsweb.cgi?r=yhc;a=headblob;f=/src/compiler98/Util/Text.hs separate = splitList , I am currently thinking about making this module into a

Re: [Haskell-cafe] Separate a string into a list of strings

2006-06-12 Thread Neil Mitchell
Hi beginsWith [] [] = True beginsWith _[] = True beginsWith [] _ = False beginsWith (a:aa) (b:bb) | a == b = aa `beginsWith` bb | otherwise= False I used to have this in my library then I discovered isPrefixOf :) (or flip

Re: [Haskell-cafe] Re: Editors for Haskell

2006-06-08 Thread Neil Mitchell
Hi - about formatted error messages (I am sure you guys don't care), could someone build a light GHC front end that given a .hs/.lhs file produces two XML files with specified DTD, the parsed structure and the error messages? the reason for choosing XML is that not only the Java people

Re: [Haskell-cafe] Re: Editors for Haskell

2006-06-07 Thread Neil Mitchell
Hi Pete As part of my learning experience, I think I want to see if I can write a haskell pastebin that does proper syntax highlighting. Someone in #haskell suggested that I use just a lexer because using a parser is overkill. However, I can't make this assessment until I see how to use the

Re: [Haskell-cafe] Problem in code

2006-06-06 Thread Neil Mitchell
Hi, Haskell is based on indentation for grouping, so your code is fine, you just need to indent the lines marked: f :: (Float,Float) - Float f (x,y) = (a(x,y) + 4) * (b(x,y) + 3) where a :: (Float,Float) - Float a(x,y) = (x + y)*2 b :: (Float,Float) - Float b(x,y) = (y -

Re: [Haskell-cafe] changing out

2006-05-30 Thread Neil Mitchell
Hi, i want to change my input integers In 23 98 Out 98 23 Can you explain what the bigger goal behind this is? It really depends on exactly what you want to do, if you want a function that takes a pair of integers and flips the pair, that's easy enough: f (x,y) = (y,x) But I guess you have

Re: [Haskell-cafe] How to print the character without the backslash

2006-05-29 Thread Neil Mitchell
Hi I have this basic question of how to print the character without the backslash. I'm trying to print html code, so i need a lot. giveHtml (Leaf (a,(b,c))) = frame src=\\ name=\ ++ [a] ++ \ scrolling=\No\ noresize=\noresize\ id=\ ++ [a] ++ \ title=\ ++ [a] ++ \ / Can anybody give me a

Re: [Haskell-cafe] Newbie:Debugging and Overgeneralization

2006-05-15 Thread Neil Mitchell
Hi Deech, 1. Is there a way to output intermediate values of a calculation? Debug.Trace.trace is what you want, its not quite as convenient (or safe) as cout, but its usually good enough. If you want to see more detail then Hat (http://www.haskell.org/hat) is probably what you want. From a

[Haskell-cafe] Predicate Library?

2006-05-08 Thread Neil Mitchell
Hi, I'm trying to manipulate predicates in Haskell, and was wondering if there was a predicate library available that I could use? My predicates consist of `and` and `or` over some constraints. I have various rules which can be used to collapse certain constraints. Currently I have written my

Re: [Haskell-cafe] Predicate Library?

2006-05-08 Thread Neil Mitchell
Hi Tim, Is this what you're looking for? http://www.cse.ogi.edu/~hallgren/Programatica/tools/property/Plogic.html http://citeseer.ist.psu.edu/kieburtz02plogic.html That looks very interesting and I'll certainly come back to that later, but I couldn't see a predicate simplifier amongst that

Re: [Haskell-cafe] Haskell + Windows API = wuh?

2006-05-02 Thread Neil Mitchell
Hi, Pretty much every Haskell implementation supports the FFI - its a standardised Haskell 98 extension. Take a look at the System.Win32 library which is a wrapper round the Windows API. If you have a reference to the Win32 API (i.e. MSDN) then the API looks like a very straightforward wrapper.

[Haskell-cafe] Saving a data structure to a file

2006-04-28 Thread Neil Mitchell
Hi, I have a program which needs to cache intermediate data structures to a file (finite, non-cyclic, relatively simple, around ~100Kb when shown). Is there any easy way to acheive this? The current approach I am using is to add deriving Read, Show to all the data structures, and then

Re: [Haskell-cafe] database access recommendation

2006-04-27 Thread Neil Mitchell
Hi It fails with Hugs on both platforms on the runhugs Setup.lhs configure step in the base HSQL library with: Windows: ERROR C:\Program Files\WinHugs\libraries\Text\ParserCombinators\ReadP.hs:156 - Syntax error in type expression (unexpected `.') That looks like it requires haskell

Re: [Haskell-cafe] The case of the missing module

2006-04-16 Thread Neil Mitchell
Hi, import Paths_haddock( getDataDir ) Haddock requires to be built with Cabal (which generates this module), and as far as I can remember, its a Cabal that isn't released anywhere. When I did some work on haddock I commented this out, and made getDataDir return an empty list and then made

Re: [Haskell-cafe] Haskell on Pocket PC?

2006-04-03 Thread Neil Mitchell
Hi, Starting from YHC porting pages the only source for Win32 port I found is WinHaskell. [http://www-users.cs.york.ac.uk/~ndm/projects/winhaskell.php] That's an entirely separate project, it just uses Yhc/GHC/Hugs. Thats the things about the Yhc port to Windows - its not a port, Yhc just

Re: [Haskell-cafe] Haskell on Pocket PC?

2006-03-31 Thread Neil Mitchell
Hi, If I was doing a Haskell port to PPC Windows Mobile, I'd start with Yhc. If you port a small, portably written runtime (Yhi) in C, then you get everything else for free. There was some talk of a palm port of Yhi, and the only issues that came up were: * GMP is a dependancy, so you'll need

Re: [Haskell-cafe] Moving from Hugs to GHC and getting an error

2006-03-31 Thread Neil Mitchell
type SOA= Rec (properties :: PropList, time :: Time, world :: World) This type definition does not make use of standard Haskell records, I suspect this is making use of Trex, although I don't know any of Trex. I would have expected standard Haskell to look like:

Re: [Haskell-cafe] show for functional types

2006-03-31 Thread Neil Mitchell
Hi, First, its useful to define referential transparency. In Haskell, if you have a definition f = not Then this means that anywhere you see f, you can replace it with not. For example f True and not True are the same, this is referentially transparent. Now lets define super show which takes

Re: [Haskell-cafe] Newbie question: inferred type

2006-03-29 Thread Neil Mitchell
I think this is the monomorphism restriction, you can see more details on the web page: http://www.haskell.org/hawiki/MonomorphismRestriction On 3/30/06, David Laffin [EMAIL PROTECTED] wrote: Hi, Newbie question. Given the inferred type for square, the inferred types for quad1, quad2 and

Re: [Haskell-cafe] Re: Haskell's market

2006-03-28 Thread Neil Mitchell
instead of coding them. I am thinking about an approach based on a sort of DSL design with Haskell then code/bytecode generation to Java/whatever platform. Yhc can generate a portable bytecode, and it can also generate .NET bytecode (IL), and there was a project underway to generate Java (JVM)

Re: [Haskell-cafe] Positive integers

2006-03-27 Thread Neil Mitchell
Doesn't Ada have constrained number types which have similar behaviour? Yes. Just for comparison, the behaviour of the Ada number is to throw an exception at runtime if a number overflows its bounds. If these checks can be eliminated statically, then they are. If an operation will always give a

Re: [Haskell-cafe] multiple computations, same input

2006-03-27 Thread Neil Mitchell
Hi Greg, But if I do something like this: f lst = show (filter ( 1) lst, filter ( 2) lst) then it looks like GHC won't garbage collect list elements until the first filter has completely finished There is a very good reason for this, show (a,b) is essentially show (a,b) = ( ++ show a

Re: [Haskell-cafe] multiple computations, same input

2006-03-27 Thread Neil Mitchell
Hi, Here would be a better example then. f lst = show (sum (filter ( 1) lst), sum (filter ( 2) lst)) I suspected that you actually wanted to do something cleverer with the list, for the sake of argument, I'm going to change 1 to p1 and 2 to p2 - to show how this can be done in the general

Re: [Haskell-cafe] multiple computations, same input

2006-03-27 Thread Neil Mitchell
Thanks Neil. How do I add in another ~10 computations, or map a list of a 100 computations to the same input? Isn't there a way to do this without one computation having to be aware of the other? I guess they have to be aware at some level, perhaps arrows generalise the awareness they need,

Re: [Haskell-cafe] planet.haskell.org? for Haskell blogs

2006-03-24 Thread Neil Mitchell
Hi Is it possible to have an RSS feed for Planet Haskell? i.e. so I can read all the Haskell related blogs with my feed reader without being subscribed to all of them individually. Thanks Neil On 3/23/06, Antti-Juhani Kaijanaho [EMAIL PROTECTED] wrote: Isaac Jones wrote: Cool, if you think

Re: [Haskell-cafe] different code in different platforms

2006-03-15 Thread Neil Mitchell
Hi, Does it really have to change statically? I use code like: #ifdef __WIN32__ (Windows code) #else (Linux code) #endif In Yhc, we use a runtime test to check between Windows and Linux. It has various advantages - we only have one code base, everything is type checked when we

Re: [Haskell-cafe] Re: request for code review

2006-03-14 Thread Neil Mitchell
Hi, I disagree with most people on this, since I am in general principle opposed to monads on the grounds that I don't understand them :) o How important is it that I switch from using the State monad to using arrows? I don't understand either monads or arrows o How important is it that I

Re: [Haskell-cafe] Re: [Haskell] Trying to get a Composite design pattern to work

2006-03-13 Thread Neil Mitchell
How's this? What about ++, in Haskell thats just an ordinary function, yet you are using the library one in this case. The other thing is that the first definition of my_concat_map is entirely redundant, the second one handles both cases anyway. Also, for completeness, you might be interested

Re: [Haskell-cafe] library sort

2006-03-08 Thread Neil Mitchell
I'm not sure I agree that is a good reason. I never claimed it was a good reason, merely that it was a reason :) Hoogle 2 only allowed you to search the Haskell 98 libraries, which obviously everyone wants to do. Hoogle 3 is still in beta - I introduced searching more, but have not got round to

Re: [Haskell-cafe] Dropping trailing nulls from a list of list

2006-03-08 Thread Neil Mitchell
dropTrailNulls list = reverse (dropWhile null (reverse list)) Or more succinctly: dropTrailNulls = reverse . dropWhile null . reverse Or, is there a more efficient idiom for addressing these problems? The bad thing about this definition is that it is tail strict. Consider

Re: [Haskell-cafe] library sort

2006-03-07 Thread Neil Mitchell
Well, this a bold assumption IMHO, and I'm not particularly happy with that, as you can probably imagine. I would also imagine that Joe Programmer is more likely to use wxHaskell or Gtk2Hs than those - however because those are outside the standard tree they don't make it in. I don't think much

Re: [Haskell-cafe] request for code review

2006-03-05 Thread Neil Mitchell
Hi, You seem to like let a lot, whereas I hardly ever use them. In general I find where a lot more readable. (disclaimer, all notes untested, may not compile, may be wrong) Also, most haskell programs use $ instead of | -- For convenience: currTokType :: ParseContext - TokenType currTokType

Re: [Haskell-cafe] beginner question - file handling

2006-03-05 Thread Neil Mitchell
Hi do x - readFile test.txt print (length (lines x)) That prints out the number of lines in a file, but once you have done lines x, you can do anything you want to the lines Thanks Neil On 3/5/06, Richard Gooding [EMAIL PROTECTED] wrote: Hi, can someone please point me at some code to

Re: [Haskell-cafe] library sort

2006-03-04 Thread Neil Mitchell
And a related question is: Which packages are searchable by Hoogle? The best answer to that is some. I intentionally excluded OpenGL and other graphics ones because they have a large interface and yet are not used by most people using Haskell. I have recently patched Haddock so it will directly

Re: [Haskell-cafe] Question about Haskell types

2006-02-26 Thread Neil Mitchell
Hi Pete, a = () b x = (x ) c x y = (x y) I'm pretty sure this is the Monomorphism Restriction, its on the wiki at: http://www.haskell.org/hawiki/MonomorphismRestriction Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Lazy read

2006-02-16 Thread Neil Mitchell
Hi, I have a nice big data structure that I serialise to a file using show, and read back in using read. This data structure has deriving (Read, Show), which makes it all nice and easy to save and load this data structure, without worrying about parsing code etc. The problem is that this data

Re: [Haskell-cafe] library sort

2006-02-16 Thread Neil Mitchell
Hi Radu, Is there a sort function in the libraries that come with GHC (6.4)? import Data.List Or just hit Hoogle with sort http://haskell.org/hoogle/?q=sort Thanks Neil On 16/02/06, Radu Grigore [EMAIL PROTECTED] wrote: My search at

Re: [Haskell-cafe] Lazy read

2006-02-16 Thread Neil Mitchell
Honestly, don't use read. It's icky. Check out ReadP or parsec, they are far superior in general. I think there was a suggestion of replacing Read with ReadP? The whole point is not about writing a parser, its about having a parser written for me with deriving Read - unfortunately their is no

Re: [Haskell-cafe] Haskell XSLT interpreter?

2006-02-12 Thread Neil Mitchell
It does, in practise - but this might not be done as part of the tranformation - it might be done as part of the preparation. It can't be done before any transformations, since the URI can be a function, and the result of that function might be defined in terms of transformations and the nodes

Re: [Haskell-cafe] Haskell XSLT interpreter?

2006-02-11 Thread Neil Mitchell
Hi, I don't know of any, but there may well be, I've never looked. It probably wouldn't be that difficult to do, since XSLT is a functional language. There is probably lots of code in HaXml you could reuse (since the syntax for XSLT is XML). The only slightly taxing thing would be that XSLT is

Re: [Haskell-cafe] Haskell and JVM

2006-02-02 Thread Neil Mitchell
Hi, up one time or another. If someone is interested, I have some Java code for compiling Haskell98 to bytecode that I would be more than willing to share. It is not in the best shape and does not implement You might also be interested in: http://www.brianweb.net/personal/blog/entry.php?id=18

Re: [Haskell-cafe] Can I use Haskell for web programming

2006-01-21 Thread Neil Mitchell
Hi, Can I use Haskell to do what people do with, say, PHP? I wrote Hoogle (http://haskell.org/hoogle) using Haskell, without using any libraries - just directly as a console program. It's open source so you can download it and see how its done, if you want. Of course the web handling bit is

Re: [Haskell-cafe] RE: Haskell vs. Clean

2006-01-05 Thread Neil Mitchell
Hi My knowledge of Clean is fairly limited Mine too, but one of the biggest differences is that Clean has uniqueness types instead of Monads. They are in fact so similar that you can convert between them, using Hacle: http://www-users.cs.york.ac.uk/~mfn/hacle/ I believe also that Clean has a

Re: [Haskell-cafe] RE: Haskell vs. Clean

2006-01-05 Thread Neil Mitchell
On 1/5/06, Scherrer, Chad [EMAIL PROTECTED] wrote: Interesting. Have there been any performance comparisons vs GHC et al? Yes: http://www-users.cs.york.ac.uk/~mfn/hacle/index.html#fin http://www-users.cs.york.ac.uk/~mfn/hacle/eval.html ___

Re: [Haskell-cafe] file i/o

2006-01-03 Thread Neil Mitchell
Hi Robert, The first thing to mention is that Haskell uses linked-lists, not arrays as the standard list type structure, so [1,2] is actually a linked list. The next thing to note is that Haskell is *lazy*. It won't do work that it doens't have to. This means that you can return a linked list

Re: [Haskell-cafe] How to print a string (lazily)

2006-01-03 Thread Neil Mitchell
Hi, All Haskell functions are lazy, hence there is no need to write a lazy version of your print_list function. I think the function you probably want is: putStr (unlines xs) This uses the bulid in unlines function, which is similar in spirit to join (you get more quotes, which I guess you

Re: [Haskell-cafe] Learning about haskell compilers

2005-12-20 Thread Neil Mitchell
You could also learn from the code and documentation of the various implementations of Haskell: GHC, hugs, nhc, and - YHC (http://www-users.cs.york.ac.uk/~ndm/yhc/) (an nhc derivatibe) including a portable bytecode compiler With Yhc, there is also a quite useful wiki at

Re: [Haskell-cafe] Re: Tutorial uploaded

2005-12-20 Thread Neil Mitchell
Hi, Hugs Interpreter onlySuitable for learning. You'll need GHC for serious work. This is putting Hugs down quite a bit. I personally prefer Hugs, and use it for serious work (including developing a Haskell compiler, and 4 years of academic study and counting). About the only thing

Re: [Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-16 Thread Neil Mitchell
I don't think restricting editing to registered users is a significant turn off if registration is simple. It really really is a turn off. Sometimes when I spot a mistake, and I'm at a computer where I haven't logged in to hawiki, I don't bother fixing it. No one wants to have yet another

Re: [Haskell-cafe] Estonia and GADT

2005-10-15 Thread Neil Mitchell
1) where can i find articles from Estonia conference? There were several conferences in Estonia including TFP, ICFP and Haskell Workshop. Go to http://www.cs.ioc.ee/tfp-icfp-gpce05/, look at the program, type in the title of the talk and most of the time google will give you a copy of the

Re: [Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-13 Thread Neil Mitchell
As someone who is not an academic researcher and not a student in CS, I would like to express a personal opinion; we don't need a new standard. Maybe you just don't realise how much we do need a new standard! standard. To me, Haskell needs more libraries, more users (which means more

Re: [Haskell-cafe] Newbie question on Haskell type

2005-10-13 Thread Neil Mitchell
isString::(Show a) =a -Bool This function will return True if the input is a string and return False if not This is not particularly nicely - you certainly can't write it as simple as the 'isString' function, and it will probably require type classes etc, quite possibly with haskell extensions.

Re: [Haskell-cafe] Papers from the 2005 Haskell Workshop (Tallinn)?

2005-10-06 Thread Neil Mitchell
It was a demonstration, not a paper. The half page thing is all there is. There were however slides that went with the presentation which you might be able to get off the author. I think its also being released open source, so you could even put your home directory on it :) Neil On 10/6/05,

Re: [Haskell-cafe] Trapped by the Monads

2005-09-20 Thread Neil Mitchell
Take a look at unsafePerformIO, it is of type IO a - a. Its not particularly safe (the name gives a clue), but it does what you want. On 9/20/05, Mark Carter [EMAIL PROTECTED] wrote: I'm puzzling out how to get a Bool from am IO Bool. I know I'm not supposed to, but I don't see any way around

Re: [Haskell-cafe] Newbie syntax question

2005-09-16 Thread Neil Mitchell
So I think map ( (flip foo) 5 ) my_list_of_lists_of_doubles will work, as will using a lambda expression map (\x - foo x 5) may_list_of_lists_of_doubles I really like the `foo` syntax. map (`foo` 5) my_list also works, without an auxiliary function and without a lambda. In reality this

Re: [Haskell-cafe] Doing Windows Programming

2005-09-11 Thread Neil Mitchell
Hi, The CVS version of Hugs for Windows has a module System.Win32.Registry, along with quite a few other windows modules. I'm not sure if the last stable releases have these features in or not. Thanks Neil On 9/11/05, Brian McQueen [EMAIL PROTECTED] wrote: How can I use Haskell to do general

Re: [Haskell-cafe] static typing and interactivity

2005-08-18 Thread Neil Mitchell
Hi Jake, program. How do most of the folks here debug their large code base? You might have some success with Hat, http://www.haskell.org/hat/, for debugging. Unfortunately unless you are doing Monadic computations, breakpoints don't really work as well as in strict imperative programs.

Re: [Haskell-cafe] Type system extension

2005-05-15 Thread Neil Mitchell
Hi, Yes, sounds like a good idea. I'm not sure the right approach is to make the user give this information though - the code will very likely be something like doSomethingToAModule (SModule a b) = f a b from which you can derive the type SCode(SModule) very easily. As the expressions get more

<    5   6   7   8   9   10