diff options
Diffstat (limited to 'include/haskellf')
-rw-r--r-- | include/haskellf | 71 |
1 files changed, 48 insertions, 23 deletions
diff --git a/include/haskellf b/include/haskellf index 8a019f2..b1064a1 100644 --- a/include/haskellf +++ b/include/haskellf @@ -18,6 +18,7 @@ export @Haskell def @HaskellSetup named pipe { } # pipe through this first named numbered { No } # want lines numbered? + named blanknumbered { Yes } # blank lines numbered? named style named @OrIfPlain left x right y { @BackEnd @Case { PlainText @Yield y else @Yield x } } @@ -27,6 +28,7 @@ def @HaskellSetup named fixedfont { Courier }# font family named fixedsize { -1.0p } # font size named fixedline { 1.0vx } # line-space + named fixedblanklinescale { 1.0 } # blank-line scale named fixedspace { lout } # spacing mode named fixedtabin { 4 } # tab interval named fixedtabout { 4s } # tab width @@ -54,6 +56,7 @@ def @HaskellSetup named varyingfont { } # font family named varyingsize { 1.0f } # font size named varyingline { 1.0vx } # line-space + named varyingblanklinescale { 1.0 } # blank-line scale named varyingspace { lout } # spacing mode named varyingtabin { 4 } # tab interval named varyingtabout { 1.5f } # tab width @@ -81,6 +84,7 @@ def @HaskellSetup named symbolfont { } # font family named symbolsize { 1f } # font size named symbolline { 1.0vx } # line-space + named symbolblanklinescale { 1.0 } # blank-line scale named symbolspace { lout } # spacing mode named symboltabin { 4 } # tab interval named symboltabout { 1.7f } # tab width @@ -112,24 +116,26 @@ def @HaskellSetup @A "$>" def @Haskell - named style { style } # style - named numbered { numbered } # want numbered lines? - named pipe { pipe } # pipe through this first - named font { dft } # font family - named size { dft } # font size - named line { dft } # line-space - named space { dft } # spacing mode - named tabin { dft } # tab interval - named tabout { dft } # tab width - named braces { dft } # braces font - named identifiers { dft } # ident. font - named keywords { dft } # keyword font - named operators { dft } # operator font - named numbers { dft } # number font - named strings { dft } # string font - named comments { dft } # comment font - named linenumbers { dft } # line numbers font - body @Body # filtered, see below + named style { style } # style + named numbered { numbered } # want numbered lines? + named blanknumbered { blanknumbered } # numbered blank lines? + named pipe { pipe } # pipe through this first + named font { dft } # font family + named size { dft } # font size + named line { dft } # line-space + named blanklinescale { dft } # blank-line scale + named space { dft } # spacing mode + named tabin { dft } # tab interval + named tabout { dft } # tab width + named braces { dft } # braces font + named identifiers { dft } # ident. font + named keywords { dft } # keyword font + named operators { dft } # operator font + named numbers { dft } # number font + named strings { dft } # string font + named comments { dft } # comment font + named linenumbers { dft } # line numbers font + body @Body # filtered, see below @Begin def @Test # returns x unless x is dft @@ -191,16 +197,26 @@ def @HaskellSetup } } + def wantblanknumbered + { + blanknumbered @Case { + { No no } @Yield "-M" + { NoPrint noprint } @Yield "-N" + { Yes yes } @Yield "" + } + } + pipe @Case { "" @Yield { - "prg2lout -r -lHaskell" wantnumbered -i{@FilterIn} - -o{@FilterOut} -e{@FilterErr} + "prg2lout -r -lHaskell" wantblanknumbered wantnumbered + -i{@FilterIn} -o{@FilterOut} -e{@FilterErr} -t{@InitTab} -T{@InitTabWidth} } else @Yield { "cat" @FilterIn "|" pipe "|" - "prg2lout -r -lHaskell" wantnumbered -o{@FilterOut} - -e{@FilterErr} -t{@InitTab} -T{@InitTabWidth} + "prg2lout -r -lHaskell" wantblanknumbered wantnumbered + -o{@FilterOut} -e{@FilterErr} + -t{@InitTab} -T{@InitTabWidth} } } } @@ -233,6 +249,15 @@ def @HaskellSetup } + def @InitBLS + { + blanklinescale @Test + iffixed { fixedblanklinescale } + ifvarying { varyingblanklinescale } + ifsymbol { symbolblanklinescale } + } + + def @InitSpace { space @Test @@ -473,7 +498,7 @@ def @HaskellSetup { @InitFontFamily Base @InitSize } @Font @InitSpace @Space - { @InitLine lines nohyphen } @Break @Body + { @InitLine lines nohyphen "blanklinescale" @InitBLS } @Break @Body @End @Haskell |