haskell / happy

The Happy parser generator for Haskell
Other
276 stars 85 forks source link

Examples don't work #197

Open knothed opened 3 years ago

knothed commented 3 years ago

Many of the examples do not work. They seem to use outdated techniques of happy and often import modules that don't exist.

ghost commented 2 years ago

ErrorTest.ly LexerTest.ly MonadTest.ly

- import Char
+ import Data.Char
ghost commented 2 years ago

Calc.ly

- import Char
+ import Data.Char

after running happy Calc.ly an error results

$ runghc Calc.hs

Calc.hs:0:53: error:
    * Variable not in scope: main :: IO a0
    * Perhaps you meant `min' (imported from Prelude)
$ 
ghost commented 2 years ago
$ happy PgnParser.ly
PgnParser.ly:26: unrecognised directive: %newline
$
ghost commented 2 years ago

DavesExample.ly

> import Lexer
> import Convert
> import PreludeGlaArray

ErlParser.ly

> import GenUtils
> import Lexer
> import AbsSyn
> import Types
> import ParseMonad.Class

SimonsExample.ly

> import Type
> import Lexer