Meta tags:
Headings (most frequently used words):
2011, june, ghci, tuesday, lambda, record, cabal, and, dumbing, down, the, ghcoptions, almost, reloading, ending, quine, starting, google, summer, of, gsoc, about, me, wednesday, thursday, august, 18, july, 12, saturday, 25, 15, sandwich, 14, sunday, may, 29, followers, blog, archive, code,
Text of the page (most frequently used words):
the (92), cabal (34), for (25), #component (23), #this (22), and (20), share (18), #repl (17), #ghci (15), #options (15), #that (15), ghc (14), #build (13), #building (12), there (12), #code (11), command (11), reload (10), file (10), function (10), all (9), can (9), package (9), these (9), more (8), commands (8), interpretation (8), reloading (8), macros (8), ghcoptions (8), record (8), #option (7), specific (7), 2011 (7), library (7), should (7), anklesaria (7), interpreter (7), summer (7), with (7), user (7), what (7), list (6), twitter (6), will (6), stage (6), facebook (6), default (6), blogthis (6), but (6), macro (6), email (6), pinterest (6), used (6), interpret (6), posted (6), files (5), comments (5), load (5), here (5), first (5), necessary (5), etc (5), make (5), from (5), have (5), compiler (5), are (5), would (5), flag (5), enable (4), need (4), components (4), high (4), functions (4), level (4), isn (4), define (4), each (4), also (4), add (4), two (4), haskell (4), one (4), whatever (4), every (4), june (4), loaded (4), given (4), packages (4), when (4), google (4), only (4), long (3), api (3), through (3), call (3), project (3), type (3), just (3), well (3), not (3), other (3), behavior (3), kind (3), some (3), within (3), executable (3), flags (3), shadow (3), has (3), sources (3), wants (3), fields (3), before (3), work (3), filename (3), line (3), which (3), require (3), perform (3), install (3), take (3), because (3), creating (3), stuff (3), defined (3), into (3), required (3), preprocessing (3), starting (2), now (2), simple (2), mode (2), idea (2), pieces (2), basic (2), specify (2), themselves (2), down (2), disable (2), individually (2), really (2), same (2), test (2), particular (2), multiple (2), must (2), examples (2), allow (2), sometimes (2), approach (2), things (2), like (2), itself (2), directory (2), comment (2), tuesday (2), place (2), preparing (2), arguments (2), programs (2), course (2), custom (2), rendering (2), little (2), number (2), think (2), had (2), name (2), almost (2), enough (2), change (2), fine (2), string (2), use (2), its (2), their (2), everything (2), previously (2), allowing (2), sandwich (2), control (2), those (2), gsoc (2), august (2), needed (2), support (2), giving (2), been (2), don (2), doing (2), sorted (2), specified (2), determines (2), topologically (2), overload (2), calls (2), manually (2), users (2), something (2), needs (2), done (2), while (2), tool (2), render (2), hooks (2), ending (2), july (2), based (2), instance (2), returns (2), about (2), programinvocation (2), set (2), could (2), may (2), part (2), template (2), lambda (2), argument, single, necessarily, complex, slightly, tell, thursday, thought, however, detailed, than, tests, dumbing, known, including, pkg, development, input, does, saturday, times, often, action, please, longer, monoid, changes, entirety, they, say, mapped, happens, any, last, nothing, requiring, module, prerepl, replhook, postrepl, leading, order, maps, another, yet, sufficient, added, prefixes, field, hilariously, compbuildmap, meaning, dependencies, qualified, collisions, potentially, localbuildinfo, nasty, hoc, different, understands, pain, yeah, filling, small, price, how, everyone, constructors, sure, pay, better, composability, addition, figure, monday, haddock, wrapped, start, bar, replaces, usage, foo, strings, were, myexe, contained, usual, grained, except, anyone, onto, ones, meant, apply, lots, coming, loading, both, leaves, arbitrarily, speak, eventually, choosing, currently, certainly, implimentation, names, method, defines, lists, bit, makes, series, standard, ways, cases, seems, date, try, pencils, session, firm, passes, fair, let, contains, failing, suite, such, where, found, contain, give, problem, watermark, much, containing, pre, rendered, process, generic, separate, means, important, particularly, create, current, buildlib, buildexe, buildabihash, compilers, plan, although, appear, version, agnostic, linking, ghcoptstage, additionally, naturally, again, thus, pretty, preparation, trigger, going, sunday, ghcoptmode, abihashmode, execmode, libmode, ghcimode, context, performs, bundling, off, overloaded, atom, facilitate, described, originally, working, privilege, home, posts, following, subscribe, followers, archive, blog, profile, complete, view, blogger, powered, specifically, then, sending, commandui, tidy, nice, information, bundle, old, counterparts, making, records, possible, fun, showing, spec, accessible, next, sly, feed, special, fortunately, rebuilding, shared, created, verbosity, most, decided, wednesday, admittedly, difficult, feeding, takes, accommodate, easy, fairly, ride, along, come, seem, initially, started, was, taking, planned, already, direct, others, among, mappend, together, glueing, consists, adjusted, representation, become, describing, pair, translate, link, hash, abi, consisting, essentially, very, took, generated, abstract, redefine, adding, propose, quine, implementation, respecify, represented, handle, syntax, especially, quite, doesn, lisp, expected, thing, defining, pattern, perhaps, operations, auto, write, restricted, step, time, operation, fact, cat, telling, dist, extra, theme, best, ugly, look, piping, sneakily, modify, calling, resulting, source, handled,
Text of the page (random words):
lambda sandwich lambda sandwich cabal development for google summer of code thursday august 18 2011 ending gsoc as the firm pencils down date for google summer of code is coming up monday i figure i d better make sure everyone understands what i ve done and how to use it ghcoptions record this record has fields for every ghc option used by cabal it replaces the ad hoc lists of strings that were used previously ghcoptions is also a monoid instance so one can mapped more specific options onto basic ones to allow this instance lots of fields are wrapped in all any first and last constructors which can be kind of a pain when filling the fields manually but it s a small price to pay for composability repl function this addition to the cabal api will start an interpreter session by default it will load all files from the library component of a package if the user passes specific files the function will try to build the component that contains these files failing if no such component can be found or if multiple components contain the files if the user wants to load some specific component this can be specified by the component flag like other functions in the cabal api there are number of hooks that the user can specify to change default interpretation behavior prerepl replhook and postrepl the names kind of speak for themselves ghci support the repl function eventually calls an interpret function defined individually for each compiler currently the only compiler with interpretation defined is ghc ghc s interpret implimentation also defines a series of macros that overload the standard load and reload interpreter commands to call cabal repl enable reload on the specified component before loading so as to do whatever preprocessing is necessary other changes to the cabal api because ghc s interpret function calls the cabal install tool i had to add cabal to the list of known programs including ar ghc ghc pkg etc also because interpretation does not necessarily require building every single package the topologically sorted build order list used in building is no longer sufficient i ve added a compbuildmap field to localbuildinfo which maps components to their topologically sorted list of dependencies cabal repl the cabal install tool now has an repl command usage cabal repl filename flags enable reload enable file reloading from within an interpreter disable reload disable file reloading from within an interpreter component component the component of the cabal package to interpret examples cabal repl only library component in the package cabal repl examples foo hs specific file cabal repl bar hs component myexe file from specific component cabal repl component library library contained in the package the usual flags apply as well of course and the enable reload option isn t really meant for anyone except cabal itself to use when reloading packages oh yeah here s the code and here is the haddock stuff posted by anklesaria at 11 27 am 4 comments email this blogthis share to twitter share to facebook share to pinterest tuesday july 12 2011 cabal and ghci for my summer of code project i m giving cabal an repl command at first i thought a simple filename argument would be enough more complex cabal packages require a slightly more detailed input however often times there s more to a cabal package than a library sometimes there s tests sometimes an executable and all these components can have different ways of building themselves this makes interpretation a bit of a problem if a file is part of multiple components which method of building should be used both should work certainly but choosing a component arbitrarily leaves little control to the user in cases like this it seems that cabal repl must take a component as well let s give it a flag component component where component is the name of some library or executable or test suite that s a component in the cabal package fair enough but there s more but what if a user wants to test a component in its entirety not just one particular file here they only need to specify the component so we say cabal repl component component what happens what s loaded into ghci should nothing be loaded requiring the user to load every module he wants to work with should everything be loaded leading to potentially nasty name collisions should everything be loaded but qualified meaning that users will have to type hilariously long prefixes before all their functions should there be yet another flag for what course of action to take please comment and tell me because i have no idea posted by anklesaria at 3 47 pm 6 comments email this blogthis share to twitter share to facebook share to pinterest saturday june 25 2011 dumbing down the ghcoptions record i ve decided to change the approach i m taking to my summer of code project allowing cabal s code for building with ghc to accommodate interpretation previously i had planned make the options record describing the arguments given to ghc very high level essentially consisting of a mode option ie executable library interpretation abi hash etc and a stage option c stage template haskell stage link stage etc a rendering function would translate this pair of options to a list of command line flags now the ghcoptions record has become a direct representation of the command line options every flag used in building cabal packages can be adjusted individually creating the options for a particular mode and stage consists of glueing together through mappend a long list of ghcoptions pieces there s pieces for among others build options c options and verbosity options allowing much more fine grained control of the options given to ghc posted by anklesaria at 9 24 am no comments email this blogthis share to twitter share to facebook share to pinterest wednesday june 15 2011 reloading ghci starting ghci with cabal is fairly easy as the interpreter takes most of the same arguments we ve been feeding ghc but reloading it is a little more difficult admittedly there are a number of things we don t have to do when reloading all the options given to the interpreter initially seem to come along for the ride with each reload command so rendering ghc command line options isn t necessary preparing the build directory and auto generated files already took place when the interpreter was started so that stuff isn t required for a reload in fact there are only really two things that need doing first there s preprocessing this is a high level operation not specific to a compiler at the same time there s c sources a step in building restricted to ghc i propose adding a flag reload perhaps to the repl command to handle these two operations handled by the high level build hs code to perform preprocessing and the compiler specific ghc hs code to perform c source building macros would be defined in ghci to shadow those commands resulting in code reloading calling cabal repl filename reload first to define these macros i think i ll need to modify ghci to take a custom ghci file i can t just sneakily add to the user one and piping in the commands through cat or something would look ugly as it is i think the best approach is to add an option for an extra ghci file cabal would write its set of macros to shadow default commands to some place in the dist directory telling ghci about the the file posted by anklesaria at 11 35 am 1 comment email this blogthis share to twitter share to facebook share to pinterest tuesday june 14 2011 almost a quine to allow reloading from ghci to trigger all the necessary cabal preparation i need to define macros to shadow the default commands r l etc the basic idea for each of these macros is pretty simple call whatever programs needed for preparing the package for building un define the command so that the default behavior returns call the default command respecify the custom implementation redefine the command each of these macros must thus define itself again creating a macro within a macro naturally as this behavior is shared by all the overloaded ghci commands i created a macro to abstract this pattern that s a string defining a macro to make a macro to make a macro while this kind of thing is fine almost expected in lisp it doesn t work quite so well in haskell especially as syntax is just represented as a string posted by anklesaria at 10 42 am no comments email this blogthis share to twitter share to facebook share to pinterest sunday may 29 2011 starting google summer of code this summer i ve been given the privilege of working on cabal for the google summer of code the project originally described here and here is to facilitate the interpretation of cabal packages through ghci more specifically i ll be doing the following i ll create a ghcoptions record containing all the options needed to build a package two options are particularly important the ghcoptmode option determines what type of build is going on this could be one of libmode execmode abihashmode or ghcimode the build function performs whatever type of build is necessary based on this context the ghcoptstage option determines what part of the build process needs to be rendered into a programinvocation this could be the building of c sources pre building for template haskell building haskell sources or linking based on the current stage the render function returns a programinvocation with the necessary set of options for ghc this means that the ghcoptions record is used for two separate generic functions build and render creating these records isn t something users should have to do manually so i ll also be making counterparts to the old buildexe buildlib and buildabihash functions that bundle the required information into a nice tidy ghcoptions record before sending it off to build additionally there will be an interpret function for bundling the options required for interpretation a compiler agnostic version of interpret repl will appear in the high level build hs file although i don t plan to add support for other compilers next i make the repl function accessible as a command giving it hooks and a commandui spec while showing it to cabal install s long list of possible commands then there s all those fun commands in ghci that require rebuilding reload load etc fortunately i can overload these with macros that perform whatever special cabal stuff needs to be done first and feed these on the sly to ghci posted by anklesaria at 8 48 am no comments email this blogthis share to twitter share to facebook share to pinterest home subscribe to posts atom followers blog archive 2011 6 august 1 ending gsoc july 1 june 3 may 1 about me anklesaria view my complete profile watermark theme powered by blogger
|