From: Mark Wooding Date: Mon, 30 Nov 2009 09:20:49 +0000 (+0000) Subject: haskell: Trivial reformatting. X-Git-Url: https://git.distorted.org.uk/~mdw/fringe/commitdiff_plain/eee4486fb912094ea6c900c42a66cf8dd4d5bd96 haskell: Trivial reformatting. Oh, and notice that we don't need flexible instances any more. --- diff --git a/Makefile b/Makefile index b79bf6a..6d4455d 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ c-fringe: c-fringe.o ### Haskell. HC = ghc -HFLAGS = -O2 -XFlexibleInstances +HFLAGS = -O2 CLEANFILES += *.hi *.hc .SUFFIXES: .hs .hs.o:; $(HC) -c $(HFLAGS) -o $@ $< diff --git a/haskell-fringe.hs b/haskell-fringe.hs index 4ca9a3e..f7aa711 100644 --- a/haskell-fringe.hs +++ b/haskell-fringe.hs @@ -1,13 +1,13 @@ --- -*-haskell-*- --- --- Haskell implementation of a `same-fringe' solver. +--- -*-haskell-*- +--- +--- Haskell implementation of a `same-fringe' solver. import IO import System import Monad ----------------------------------------------------------------------------- --- Parser combinators. +--- Parser combinators. -- A very simple parser monad. newtype Parser t a = Parser { runparse :: [t] -> Either String (a, [t]) } @@ -56,7 +56,7 @@ eof = do _ -> fail "trailing junk" ----------------------------------------------------------------------------- --- Tree data type. +--- Tree data type. data Tree a = Leaf | Node (Tree a) a (Tree a) deriving (Show) @@ -85,7 +85,7 @@ parseTree cs = parse cs $ do t <- tree; eof; return t _ -> return Leaf ----------------------------------------------------------------------------- --- Main program. +--- Main program. -- Report MSG as an error and quit. bail msg = do