template-haskell
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
September 2006
- 4 participants
- 3 discussions
12 Sep '06
----------------------------------------------------------------------
Second Call For Papers
ACM SIGPLAN 2007 Workshop on
PARTIAL EVALUATION AND PROGRAM MANIPULATION (PEPM'07)
Nice, France
January 15-16, 2007
(Co-located with POPL 2007)
http://www.program-transformation.org/PEPM07
----------------------------------------------------------------------
The PEPM Symposium/Workshop series aims to bring together researchers
and practitioners working in the areas of program manipulation, partial
evaluation, and program generation. PEPM focuses on techniques, theory,
tools, and applications of analysis and manipulation of programs.
The 2007 PEPM workshop will be based on a broad interpretation of
semantics-based program manipulation and continue last year's successful
effort to expand the scope of PEPM significantly beyond the
traditionally covered areas of partial evaluation and specialization and
include practical applications of program transformations such as
refactoring tools, and practical implementation techniques such as rule-
based transformation systems. In addition, the scope of PEPM covers
manipulation and transformations of program and system representations
such as structural and semantic models that occur in the context of
model-driven development. In order to reach out to practitioners, a
separate category of tool demonstration papers will be solicited.
----------------------------------------------------------------------
Topics of interest for PEPM'07 include, but are not limited to:
+ Program and model manipulation techniques such as transformations
driven by rules, patterns, or analyses, partial evaluation,
specialization, slicing, symbolic execution, refactoring, aspect
weaving, decompilation, and obfuscation.
+ Program analysis techniques that are used to drive program/model
manipulation such as abstract interpretation, static analysis,
binding-time analysis, dynamic analysis, constraint solving, and
type systems.
+ Analysis and transformation for programs/models with advanced
features such as objects, generics, ownership types, aspects,
reflection, XML type systems, component frameworks, and middleware.
+ Techniques that treat programs/models as data objects including
meta-programming, generative programming, staged computation, and
model-driven program generation and transformation.
+ Application of the above techniques including experimental studies,
engineering needed for scalability, and benchmarking. Examples of
application domains include legacy program understanding and
transformation, domain-specific language implementations,
scientific computing, middleware frameworks and infrastructure
needed for distributed and web-based applications, resource-limited
computation, and security.
We especially encourage papers that break new ground including
descriptions of how program/model manipulation tools can be integrated
into realistic software development processes, descriptions of robust
tools capable of effectively handling realistic applications, and new
areas of application such as rapidly evolving systems, distributed and
web-based programming including middleware manipulation, model-driven
development, and on-the-fly program adaptation driven by run-time or
statistical analysis.
----------------------------------------------------------------------
Submission Categories and Guidelines
Regular research papers must not exceed 10 pages in ACM Proceedings
style. Tool demonstration papers must not exceed 4 pages in ACM
Proceedings style, and authors will be expected to present a live
demonstration of the described tool at the workshop. Suggested topics,
evaluation criteria, and writing guidelines for both research tool
demonstration papers will be made available on the PEPM'07 web
site. Papers should be submitted electronically via the workshop web
site. The workshop proceedings will be published in the ACM Digital
Library and selected papers will be invited for a journal special
issue dedicated to PEPM'07.
----------------------------------------------------------------------
Important Dates
+ Abstracts due: October 18, 2006
+ Submission: October 20, 2006
+ Notification: December 1, 2006
+ Camera-ready: December 18, 2006
+ Workshop: January 15-16, 2007
-----------------------------------------------------------------------
Program Chairs
* G. Ramalingam (Microsoft Research, Bangalore)
* Eelco Visser (Delft University of Technology, The Netherlands)
Program Committee Members
* Ras Bodik (University of California, Berkeley, USA)
* Albert Cohen (INRIA, France)
* Jim Cordy (Queen's University, Canada)
* Martin Erwig (Oregon State University, USA)
* Bernd Fischer (University of Southampton, UK)
* John Hatcliff (Kansas State University, USA)
* Jan Heering (CWI, The Netherlands)
* Dan Grossman (University of Washington, USA)
* Annie Liu (State University of New York at Stony Brook, USA)
* Jacques Noyé (École des Mines de Nantes/INRIA, France)
* German Puebla (Technical University of Madrid, Spain)
* Peter Sestoft (Royal Veterinary and Agricultural University, Denmark)
* Yannis Smaragdakis (Georgia Tech, Atlanta, USA)
* Walid Taha (Rice University, Houston, USA)
-----------------------------------------------------------------------
1
0
Dear all,
I use Text.PrettyPrint.HughesPJ and
Text.ParserCombinators.Parsec heavily so I made
some DrIFT rules for deriving the "obvious" instances for
class ToDoc a where toDoc :: a -> Doc
class Reader a where readerPrec :: Int -> Parser a
http://141.57.11.163/cgi-bin/cvsweb/drift/src/UserRuleToDoc.hs?rev=1.5
Still I'd like to avoid external preprocessors (for hygienic reasons,
and because they do not seem to fit well with the Cabal model)
so I'd like to investigate whether I could get the same effect
with Template Haskell (in ghc) - and what this would cost.
Perhaps someone has solved a similar problem before.
On the other hand, HaXml does need DrIFT it seems.
--
-- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 --
---- http://www.imn.htwk-leipzig.de/~waldmann/ -------
3
2
I am hoping that this example is small, simple and well commented enough to
help people generate instances with TH.
The instance generation is used to create instances to render haskell code
to TH code that generates the original haskell code.
there is an example in Test.hs
The instance generation function is in Base.hs. TH_Render.hs is where the
instances are derived.
Rene.
begin 666 TH_render.hs
M>RTC($]05$E/3E,@+69G;&%S9V]W+65X=',@+69T:" C+7T-"GLM(R!/4%1)
M3TY3("UF86QL;W<M;W9E<FQA<'!I;F<M:6YS=&%N8V5S(",M?0T*;6]D=6QE
M(%1(7W1O;VQS+E1(7W)E;F1E<B!W:&5R90T*#0II;7!O<G0@3&%N9W5A9V4N
M2&%S:V5L;"Y42 T*:6UP;W)T($QA;F=U86=E+DAA<VME;&PN5$@N4WEN=&%X
M#0H-"FEM<&]R="!,86YG=6%G92Y(87-K96QL+E!A<G-E<@T*:6UP;W)T($QA
M;F=U86=E+DAA<VME;&PN4')E='1Y#0II;7!O<G0@3&%N9W5A9V4N2&%S:V5L
M;"Y3>6YT87@-"@T*:6UP;W)T(%1(7W1O;VQS+D)A<V4-"@T*#0HM+2!V87)I
M86)L92!A<F=U96UE;G0@8G5I;&1E<@T*+2T@8G5I;&0G('1A:V5S(&%N>2!N
M=6UB97(@;V8@87)G=65M96YT<R ^/2 Q+"!R96YD97)S('1H96T@86YD(&-O
M;F-A=&5N871E<R!T:&5M#0HM+2!T;V=E=&AE<B!W:71H($AS07!P+B!&:6YA
M;'D@:70@=W)A<',@=&AE(')E<W5L="!I;B!A($AS<&%R96X-"F-L87-S($)U
M:6QD2'-%>' @82!R('=H97)E#0H@(" @8G5I;&0G(#HZ($AS17AP("T^(&$@
M+3X@<@T*#0II;G-T86YC92 H5$A?4F5N9&5R(&$I(#T^($)U:6Q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9&5R("<G17AP
M*2 -"B0H9V5N7W)E;F1E<B G)TUA=&-H*2 -"B0H9V5N7W)E;F1E<B G)U)A
M;F=E*2 -"@T*+2T@2&%N9&QE<B!A;&P@=&AE('-P96-I86P@8V%S97,-"@T*
M:6YS=&%N8V4@5$A?4F5N9&5R($9U;D1E<"!W:&5R90T*("!R96YD97(@*$9U
M;D1E<"!N86UE<S$@;F%M97,R*2 ](&5R<F]R(")R96YD97(@)V9U;D1E<"!N
M86UE<S$@;F%M97,R(@T*#0II;G-T86YC92!42%]296YD97(@1F]R96EG;B!W
M:&5R90T*("!R96YD97(@7R ](&5R<F]R(")&;W)E:6=N1"!N;W0@<W5P<&]R
M=&5D(@T*#0II;G-T86YC92!42%]296YD97(@3F%M92!W:&5R90T*("!R96YD
M97(@;F%M92 ](&)U:6QD("=M:TYA;64@*&YA;65"87-E(&YA;64I#0H-"FEN
M<W1A;F-E(%1(7U)E;F1E<B H3F%M92P@4W1R:6-T+"!4>7!E*2!W:&5R90T*
M("!R96YD97(@*&YA;64L('-T<FEC="P@='EP*2 ](&)U:6QD("=V87)3=')I
M8W14>7!E(&YA;64@*'-T<FEC="P@='EP*0T*#0II;G-T86YC92!42%]296YD
M97(@*$UA>6)E($5X<"D@=VAE<F4-"B @(')E;F1E<B H2G5S="!E>' I(#T@
M8G5I;&0@)TIU<W0@97AP#0H@("!R96YD97(@3F]T:&EN9R ](&9U;F-?;W5T
M("=.;W1H:6YG#0H-"FEN<W1A;F-E(%1(7U)E;F1E<B H4W1R:6-T+"!4>7!E
M*2!W:&5R90T*("!R96YD97(@*'-T<FEC="P@='EP*2 ](&)U:6QD("=S=')I
M8W14>7!E('-T<FEC="!T>7 -"@T*:6YS=&%N8V4@5$A?4F5N9&5R("A'=6%R
M9"P@17AP*2!W:&5R90T*(" @<F5N9&5R("A.;W)M86Q'(&=E>' L(&5X<"D@
M/2!B=6EL9" G;F]R;6%L1T4@9V5X<"!E>' -"B @(')E;F1E<B H4&%T1R!S
M=&UT<RP@97AP*2 ](&)U:6QD("=P871'12!S=&UT<PT*#0II;G-T86YC92!4
M2%]296YD97(@*$YA;64L($5X<"D@=VAE<F4-"B @(')E;F1E<B H;F%M92P@
M97AP*2 ](&)U:6QD("=F:65L9$5X<"!N86UE(&5X< T*#0II;G-T86YC92!4
M2%]296YD97(@*$YA;64L(%!A="D@=VAE<F4-"B @(')E;F1E<B H;F%M92P@
M<&%T*2 ](&)U:6QD("<@9FEE;&10870@;F%M92!P870-"@T*:6YS=&%N8V4@
M*%1(7U)E;F1E<B!A*2 ]/B!42%]296YD97(@6V%=('=H97)E#0H@("!R96YD
M97(@;&ES=" ]($AS3&ES=" H;6%P(')E;F1E<B!L:7-T*0T*#0II;G-T86YC
M92!42%]296YD97(@6U1Y<&5=('=H97)E#0H@(')E;F1E<B!C>'1S(#T@2'-0
M87)E;B D("AF=6YC7V]U=" G8WAT*2!@2'-!<'!@("A(<TQI<W0@)"!M87 @
M<F5N9&5R(&-X=',I#0H-"FEN<W1A;F-E(%1(7U)E;F1E<B!3=')I;F<@=VAE
M<F4-"B @<F5N9&5R('-T<FEN9R ]($AS3&ET("0@2'-3=')I;F<@<W1R:6YG
M#0H@#0II;G-T86YC92!42%]296YD97(@3&ET('=H97)E#0H@("!R96YD97(@
M*$EN=&5G97),(&EN="D@/2!B=6EL9" G26YT96=E<DP@:6YT#0H@("!R96YD
M97(@*$-H87),(&-H87(I(#T@8G5I;&0@)T-H87),(&-H87(-"B @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" -"FEN<W1A;F-E(%1(
M7U)E;F1E<B!);G1E9V5R('=H97)E#0H@("!R96YD97(@:6YT(" ]("A(<TQI
M=" H2'-);G0@:6YT*2D@( T*#0II;G-T86YC92!42%]296YD97(@26YT('=H
M97)E#0H@("!R96YD97(@:6YT(" ]("A(<TQI=" H2'-);G0@)"!F<F]M26YT
M96=R86P@:6YT*2D-"@T*:6YS=&%N8V4@5$A?4F5N9&5R($-H87(@=VAE<F4-
M"B @<F5N9&5R(&-H87(@(#T@*$AS3&ET("A(<T-H87(@8VAA<BDI#0H-"@T*
M<F5N9&5R7V%L;" Z.B H36]N860@;2D@/3X@;2!;1&5C72 M/B!M(%M(<T5X
M<%T-"G)E;F1E<E]A;&P@9&5C<R ](&1O(&1E8W,G(#PM(&1E8W,-"B @(" @
M(" @(" @(" @(" @(" @(')E='5R;B D("AM87 @<F5N9&5R(&1E8W,G*0T*
M#0HM+2!#86X@86QW87ES('5S92!M871C:&EN9R!H97)E('1O(')E;6]V92!O
M=71E<FUO<W0@*"D-"G!R:6YT5$@@.CH@42!;1&5C72 M/B!)3R H*0T*<')I
M;G142"!D96-S(#T@9&\@9&5C<R<@/"T@<G5N42 D(')E;F1E<E]A;&P@9&5C
M<PT*(" @(" @(" @(" @(" @(" @<'5T4W1R("0@<')E='1Y4')I;G0@)"!(
M<TQI<W0@9&5C<R<-"B @(" @(" @(" @(" @(" @('!U=%-T<B B7&XB#0H-
-"@T*#0H-"@T*#0H-"@``
`
end
begin 666 Base.hs
M>RTC($]05$E/3E,@+69G;&%S9V]W+65X=',@+69T:" C+7T-"FUO9'5L92!4
M2%]T;V]L<RY"87-E('=H97)E#0H-"FEM<&]R="!,86YG=6%G92Y(87-K96QL
M+E1(#0II;7!O<G0@3&%N9W5A9V4N2&%S:V5L;"Y42"Y3>6YT87@-"@T*:6UP
M;W)T($1A=&$N0VAA<@T*#0II;G-T86YC92!3:&]W($EN9F\@=VAE<F4-"B @
M<VAO=R H5'E#;VY)(&1E8RD@/2 B5'E#;VY)("0@(B K*R!S:&]W(&1E8PT*
M#0IP<FEN=$%35" Z.B H4VAO=R!A*2 ]/B!1(&$@+3X@24\@*"D-"G!R:6YT
M05-4("!A<W0@/2!R=6Y1(&%S=" ^/CT@<'5T4W1R3&X@+B!S:&]W#0H-"G!R
M:6YT0V]D92 Z.B H4'!R(&$I(#T^(%$@82 M/B!)3R H*0T*<')I;G1#;V1E
M(&%S=" ](')U;E$@87-T(#X^/2!P=713='),;B N('!P<FEN= T*#0IT97-T
M7W!R:6YT('%U87-I(#T@9&\@>V0@/"T@<G5N42 D('%U87-I(#L@('!R:6YT
M(&1]#0H-"BTM+2!(96QP97(@9G5N8W1I;VYS#0H-"G-T<FEN9TYA;64@.CH@
M3F%M92 M/B!1($5X< T*<W1R:6YG3F%M92!N(#T@<F5T=7)N("A,:71%("A3
M=')I;F=,("AN86UE0F%S92!N*2DI#0H-"BTM+2!3=&]L96X@9G)O;2!364(@
M24E)(&-O9&4N+BXN#0H-"G1Y<&5);F9O(#HZ($1E8U$@+3X@42 H3F%M92P@
M6TYA;65=+"!;*$YA;64L($EN="E=+"!;*$YA;64L(%LH36%Y8F4@3F%M92P@
M5'EP92E=*5TI#0IT>7!E26YF;R!M(#T-"B @(" @9&\@9" \+2!M#0H@(" @
M(" @(&-A<V4@9"!O9@T*(" @(" @(" @("!D0"A$871A1"!?(%\@7R!?(%\I
M("T^#0H@(" @(" @(" @("!R971U<FX@)" H<VEM<&QE3F%M92 D(&YA;64@
M9"P@<&%R86US02!D+"!C;VYS02!D+"!T97)M<T$@9"D-"B @(" @(" @(" @
M9$ H3F5W='EP940@7R!?(%\@7R!?*2 M/@T*(" @(" @(" @(" @<F5T=7)N
M("0@*'-I;7!L94YA;64@)"!N86UE(&0L('!A<F%M<T$@9"P@8V]N<T$@9"P@
M=&5R;7-!(&0I#0H@(" @(" @(" @(%\@+3X@97)R;W(@*")D97)I=F4Z(&YO
M="!A(&1A=&$@='EP92!D96-L87)A=&EO;CH@(B K*R!S:&]W(&0I#0H-"B @
M(" @=VAE<F4-"B @(" @(" @8V]N<T$@*$1A=&%$(%\@7R!?(&-S(%\I(" @
M(#T@;6%P(&-O;D$@8W,-"B @(" @(" @8V]N<T$@*$YE=W1Y<&5$(%\@7R!?
M(&,@7RD@(#T@6R!C;VY!(&,@70T*#0H@(" @(" @('!A<F%M<T$@*$1A=&%$
M(%\@7R!P<R!?(%\I(#T@<',-"B @(" @(" @<&%R86US02 H3F5W='EP940@
M7R!?('!S(%\@7RD@/2!P<PT*#0H@(" @(" @('1E<FUS02 H1&%T840@7R!?
M(%\@8W,@7RD@/2!M87 @=&5R;4$@8W,-"B @(" @(" @=&5R;7-!("A.97=T
M>7!E1"!?(%\@7R!C(%\I(#T@6R!T97)M02!C(%T-"@T*(" @(" @("!T97)M
M02 H3F]R;6%L0R!C('AS*2 @(" @(" @/2 H8RP@;6%P("A<>" M/B H3F]T
M:&EN9RP@<VYD('@I*2!X<RD-"B @(" @(" @=&5R;4$@*%)E8T,@8R!X<RD@
M(" @(" @(" @(#T@*&,L(&UA<" H7"AN+"!?+"!T*2 M/B H2G5S=" D('-I
M;7!L94YA;64@;BP@="DI('AS*0T*(" @(" @("!T97)M02 H26YF:7A#('0Q
M(&,@=#(I(" @(" @/2 H8RP@6RA.;W1H:6YG+"!S;F0@=#$I+" H3F]T:&EN
M9RP@<VYD('0R*5TI#0H-"B @(" @(" @8V]N02 H3F]R;6%L0R!C('AS*2 @
M(" @(" @(#T@*'-I;7!L94YA;64@8RP@;&5N9W1H('AS*0T*(" @(" @("!C
M;VY!("A296-#(&,@>',I(" @(" @(" @(" @/2 H<VEM<&QE3F%M92!C+"!L
M96YG=&@@>',I#0H@(" @(" @(&-O;D$@*$EN9FEX0R!?(&,@7RD@(" @(" @
M(" ]("AS:6UP;&5.86UE(&,L(#(I#0H-"B @(" @(" @;F%M92 H1&%T840@
M7R!N(%\@7R!?*2 @(" @(#T@;@T*(" @(" @("!N86UE("A.97=T>7!E1"!?
M(&X@7R!?(%\I(" @/2!N#0H@(" @(" @(&YA;64@9" @(" @(" @(" @(" @
M(" @(" @(" ](&5R<F]R("0@<VAO=R!D#0H-"G-I;7!L94YA;64@.CH@3F%M
M92 M/B!.86UE#0IS:6UP;&5.86UE(&YM(#T-"B @(&QE="!S(#T@;F%M94)A
M<V4@;FT-"B @(&EN(&-A<V4@9')O<%=H:6QE("@O/2<Z)RD@<R!O9@T*(" @
M(" @("!;72 @(" @(" @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" @(#T@;F5W3F%M92 -"B @(" @(" @(" @(" @(" @
M(" D(&-A<V4@='EP(&]F( T*(" @(" @(" @(" @(" @(" @(" @*$-O;E0@
M;F%M92D@+3X@=&],("0@;F%M94)A<V4@;F%M90T*(" @(" @(" @(" @(" @
M(" @(" @;W1H97)W:7-E(" @+3X@(G!A<FTB#0H@(" @(" @(" @(" @("!W
M:&5R92!T;TP@*'@Z>2D@/2 H=&],;W=E<B!X*3IY#0H-"G5N0V%P86QI>F4@
M.CH@6T-H87)=("T^(%M#:&%R70T*=6Y#87!A;&EZ92 H>#IY*2 ]("AT;TQO
M=V5R('@I.GD-"@T*+2T@1V5N97)A=&4@86X@:6YT86YC92!O9B!T:&4@8VQA
M<W,@5$A?4F5N9&5R(&9O<B!T:&4@='EP92!T>7!.86UE#0IG96Y?<F5N9&5R
M(#HZ($YA;64@+3X@42!;1&5C70T*9V5N7W)E;F1E<B!T>7!.86UE(#T-"B @
M9&\@*%1Y0V]N22!D*2 \+2!R96EF>2!T>7!.86UE("TM($=E="!A;&P@=&AE
M(&EN9F]R;6%T:6]N(&]N('1H92!T>7!E#0H@(" @("AT>7!E7VYA;64L7RQ?
M+&-O;G-T<G5C=&]R<RD@/"T@='EP94EN9F\@*')E='5R;B!D*2 M+2!E>'1R
M86-T(&YA;64@86YD(&-O;G-T<G5C=&]R<R @(" @(" @(" @(" @(" @( T*
M(" @("!I7V1E8R \+2!G96Y?:6YS=&%N8V4@*&UK3F%M92 B5$A?4F5N9&5R
M(BD@*&-O;E0@='EP95]N86UE*2!C;VYS=')U8W1O<G,-"B @(" @(" @(" @
M(" @(" @(" @(" M+2!G96YE<F%T:6]N(&9U;F-T:6]N(&9O<B!M971H;V0@
M(G)E;F1E<B(-"B @(" @(" @(" @(" @(" @(" @("!;*&UK3F%M92 B<F5N
M9&5R(BP@9V5N7W)E;F1E<BE=#0H@(" @(')E='5R;B!;:5]D96-=(" M+2!R
M971U<FX@=&AE(&EN<W1A;F-E(&1E8VQA<F%T:6]N#0H@(" @(" @(" @(" @
M+2T@9G5N8W1I;VX@=&\@9V5N97)A=&EO;B!T:&4@9G5N8W1I;VX@8F]D>2!F
M;W(@82!P87)T:6-U;&%R(&9U;F-T:6]N#0H@(" @(" @(" @(" @+2T@86YD
M(&-O;G-T<G5C=&]R#0H@(" @(" @=VAE<F4@9V5N7W)E;F1E<B H8V]N3F%M
M92P@8V]M<&]N96YT<RD@=F%R<R -"B @(" @(" @(" @(" @(" @+2T@9G5N
M8W1I;VX@;F%M92!I<R!B87-E9"!O;B!C;VYS=')U8W1O<B!N86UE(" -"B @
M(" @(" @(" @(" @(#T@;&5T(&9U;F-.86UE(#T@;6%K94YA;64@)"!U;D-A
M<&%L:7IE("0@;F%M94)A<V4@8V]N3F%M92 -"B @(" @(" @(" @(" @(" @
M+2T@8VAO;W-E('1H92!C;W)R96-T(&)U:6QD97(@9G5N8W1I;VX-"B @(" @
M(" @(" @(" @(" @(" @(&AE861&=6YC(#T@8V%S92!V87)S(&]F#0H@(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @6UT@+3X@(F9U;F-?
M;W5T(@T*(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(&]T
M:&5R=VES92 M/B B8G5I;&0B( T*(" @(" @(" @(" @(" @(" @(" @("TM
M(&)U:6QD("=F=6YC3F%M92!P87)M,2!P87)M,B!P87)M,R N+BX-"B @(" @
M(" @(" @(" @(" @("!I;B!A<'!S12 D("AV87)%("0(a);6M.86UE(&AE861&
M=6YC*3IF=6YC3F%M93IV87)S("TM('!U="!I="!A;&P@=&]G971H97(-"B @
M(" @(" @(" @(" M+2!E<75I=F%L96YT('1O("=F=6YC4W1R('=H97)E(&9U
M;F-3='(@0T].5$%)3E,@=&AE(&YA;64@=&\@8F4@<F5T=7)N960-"B @(" @
M(" @(" @("!M86ME3F%M92!F=6YC4W1R(#T@*&%P<$4@*'9A<D4@*&UK3F%M
M92 B;6M.86UE(BDI("AL:71%("0@4W1R:6YG3"!F=6YC4W1R*2D-"B @(" @
*(" @(" @(" -"@``
`
end
begin 666 Test.hs
M>RTC($]05$E/3E,@+69G;&%S9V]W+65X=',@+69T:" C+7T-"FUO9'5L92!4
M2%]T;V]L<RY497-T('=H97)E#0H-"FEM<&]R="!,86YG=6%G92Y(87-K96QL
M+E1(#0II;7!O<G0@3&%N9W5A9V4N2&%S:V5L;"Y42"Y3>6YT87@-"@T*:6UP
M;W)T($QA;F=U86=E+DAA<VME;&PN4&%R<V5R#0II;7!O<G0@3&%N9W5A9V4N
M2&%S:V5L;"Y0<F5T='D-"FEM<&]R="!,86YG=6%G92Y(87-K96QL+E-Y;G1A
M> T*#0II;7!O<G0@5$A?=&]O;',N0F%S90T*:6UP;W)T(%1(7W1O;VQS+E1(
M7W)E;F1E<@T*#0IN97=T>7!E(%1E<W0Q(#T@5&5S=#$@26YT(&1E<FEV:6YG
M(%-H;W<-"FYE=W1Y<&4@5&5S=#(@/2!497-T,B!3=')I;F<@9&5R:79I;F<@
M4VAO=PT*;F5W='EP92!497-T,R ](%1E<W0S($)O;VP-"@T*9&%T82!296PQ
M(#T@4F5L,2!497-T,2!497-T,@T*9&%T82!296PR(#T@4F5L,B!497-T,2!4
M97-T,PT*#0I[+0T*='EP95]C;VUP<R Z.B!1($EN9F\@+3X@42!;*$YA;64L
M(%M4>7!E72E=#0IT>7!E7V-O;7!S('1Y<&5?9&5C(#T-"B @("!D;R H5'E#
M;VY)(&0I(#PM('1Y<&5?9&5C#0H@(" @(" @*%\L7RQ?+&1E=&%I;',I(#PM
M('1Y<&5);F9O("AR971U<FX@9"D-"B @(" @("!R971U<FX@)"!M87 @*%PH
M;F%M92P@9FEE;&1S*2 M/B H<VEM<&QE3F%M92!N86UE+"!M87 @9FEE;&0@
M9FEE;&1S*2D@9&5T86EL<PT*(" @('=H97)E(&9I96QD("A?+" H0V]N5"!N
M86UE*2D@/2!S;B!N86UE#0H@(" @(" @(" @9FEE;&0@*%\L("A!<'!4("A#
M;VY4(&YA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<RD-"BTM('@R(#T@)"AR96EF>2 G)T1E8R @/CX](&QI9G0@+B!S
M:&]W("X@='EP94EN9F\@+B!T>6-O;FDI#0H-"G@T(#T@)"AD;R H5'E#;VY)
M(&0I(#PM(')E:69Y("<G1&5C#0H@(" @(" @(" @*%\L7RQ?+&]U="D@/"T@
M='EP94EN9F\@*')E='5R;B!D*0T*(" @(" @(" @(&QI9G0@*'-H;W<@;W5T
M*2D-"@T*='0Q(#T@)"AG96Y?<F5N9&5R("<G0F]D>2 ^/CT@;&EF=" N('!P
M<FEN="D-"@T*9&%T82!497-T7U1(4B ]($-H87(Q($-H87(@?"!);G0Q($EN
M=&5G97(@26YT#0H-"BTM('HW(#T@<')I;G142"!Z-0T*>C@@/2!P<FEN=%1(
M(%MD?"!I;G-T86YC92!42%]296YD97(@5&5S=%]42%(@=VAE<F4-"B @(" @
M(" @(" @(" @(" @(" @(" @(')E;F1E<B H0VAA<C$@>"D@/2!(<TQI=" D
M($AS0VAA<B D("=A)R -"B @(" @(" @(" @(" @(" @(" @(" @(')E;F1E
M<B H26YT,2!X('DI(#T@2'-,:70@*$AS26YT('@I('Q=#0H-"GDQ(#T@<')I
M;G1!4U0@6V1\(&EN<W1A;F-E(%1(7U)E;F1E<B!497-T7U1(4B!W:&5R90T*
M(" @(" @(" @(" @(" @(" @(" @(" @<F5N9&5R("A#:&%R,2!X*2 ]($AS
M3&ET("0@2'-#:&%R("0@)V$G( T*(" @(" @(" @(" @(" @(" @(" @(" @
M<F5N9&5R("A);G0Q('@@>2D@/2!(<TQI=" H2'-);G0@>"D@?%T-"BTM(&]U
M='!U="!O9B!F=6YC=&EO;B!Z. T*)"AS97%U96YC92!;*&EN<W1A;F-E1" H
M8WAT(%M=*0T*(" @("AA<'!4("AC;VY4("AM:TYA;64@(E1(7U)E;F1E<B(I
M*2 H8V]N5" H;6M.86UE(")497-T7U1(4B(I*2D-"B @("!;*&9U;D0@*&UK
M3F%M92 B<F5N9&5R(BD-"B @(" @(" @6RAC;&%U<V4@6RAC;VY0("AM:TYA
M;64@(D-H87(Q(BD@6RAV87)0("AM:TYA;64@(G@B*2E=*5T-"B @(" @(" @
M(" @("AN;W)M86Q"#0H@(" @(" @(" @(" @(" H:6YF:7A%("A*=7-T("AC
M;VY%("AM:TYA;64@(DAS3&ET(BDI*2 H=F%R12 H;6M.86UE("(D(BDI#0H@
M(" @(" @(" @(" @(" @(" H2G5S= T*(" @(" @(" @(" @(" @(" @(" @
M*&EN9FEX12 H2G5S=" H8V]N12 H;6M.86UE(")(<T-H87(B*2DI("AV87)%
M("AM:TYA;64@(B0B*2D-"B @(" @(" @(" @(" @(" @(" @(" @("A*=7-T
M("AL:71%("A#:&%R3" G82<I*2DI*2DI#0H@(" @(" @(" @("!;72DL#0H@
M(" @(" @(" H8VQA=7-E#0H@(" @(" @(" @("!;*&-O;E @*&UK3F%M92 B
M26YT,2(I(%LH=F%R4" H;6M.86UE(")X(BDI+" H=F%R4" H;6M.86UE(")Y
M(BDI72E=#0H@(" @(" @(" @(" H;F]R;6%L0@T*(" @(" @(" @(" @(" @
M*&%P<$4@*&-O;D4@*&UK3F%M92 B2'-,:70B*2D-"B @(" @(" @(" @(" @
M(" @("AA<'!%("AC;VY%("AM:TYA;64@(DAS26YT(BDI("AV87)%("AM:TYA
D;64@(G@B*2DI*2D-"B @(" @(" @(" @(%M=*5TI72E=*0T*
`
end
2
2