This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
-- stack --resolver=nightly-2015-11-04 --install-ghc runghc --package Earley | |
{-# LANGUAGE RecursiveDo, RankNTypes #-} | |
module Main where | |
import Control.Applicative | |
import Text.Earley | |
import System.Environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
-- In the following Haddock comment, place point in the first "Lorem | |
-- ipsum" line and then run M-x fill-paragraph. Nothing will happen. | |
-- | Lorem ipsum etc Lorem ipsum etc Lorem ipsum etc Lorem ipsum etc Lorem ipsum etc Lorem ipsum etc Lorem ipsum etc Lorem ipsum etc | |
-- Lorem ipsum etc Lorem ipsum etc | |
-- But it works fine in the following comment. Place point in the | |
-- first line of the next comment and run M-x fill-paragraph. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Cartel without the header | |
module Main where | |
import Cartel | |
import System.Exit | |
getCabal :: Betsy IO Cabal | |
getCabal = do | |
-- Assumes of course you have some modules in "lib". | |
-- Really, since this computation does not make flags, there's |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have had problems getting Haddock to function properly on OSX. | |
See for example: | |
https://github.com/haskell/cabal/issues/1790 | |
Apparently there is an issue with OS X because it uses Clang, and its | |
C preprocessor is doing something funny. Previously people reported fixes | |
by having Haddock pass "-optP-P" to the C compiler, but this has not worked | |
for me. | |
Confusing the whole thing is that on OS X /usr/bin/gcc is actually Clang. |

