File: Stdenv.lhs

package info (click to toggle)
frown 0.6.2.3-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, stretch
  • size: 8,440 kB
  • ctags: 247
  • sloc: haskell: 35,175; makefile: 173; yacc: 23
file content (44 lines) | stat: -rw-r--r-- 10,562 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%   Frown --- An LALR(k) parser generator for Haskell 98                      %
%   Copyright (C) 2001-2005 Ralf Hinze                                        %
%                                                                             %
%   This program is free software; you can redistribute it and/or modify      %
%   it under the terms of the GNU General Public License (version 2) as       %
%   published by the Free Software Foundation.                                %
%                                                                             %
%   This program is distributed in the hope that it will be useful,           %
%   but WITHOUT ANY WARRANTY; without even the implied warranty of            %
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             %
%   GNU General Public License for more details.                              %
%                                                                             %
%   You should have received a copy of the GNU General Public License         %
%   along with this program; see the file COPYING.  If not, write to          %
%   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,          %
%   Boston, MA 02111-1307, USA.                                               %
%                                                                             %
%   Contact information                                                       %
%   Email:      Ralf Hinze <ralf@cs.uni-bonn.de>                              %
%   Homepage:   http://www.informatik.uni-bonn.de/~ralf/                      %
%   Paper mail: Dr. Ralf Hinze                                                %
%               Institut für Informatik III                                   %
%               Universität Bonn                                              %
%               Römerstraße 164                                               %
%               53117 Bonn, Germany                                           %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

> module Stdenv
> where
> import Lexer2
> import Atom
> import Haskell                hiding (  Decl  )
> import Grammar
> import GParser2

> stdenv                        :: [Decl]
> stdenv                        =
>     [TypeSig (App (Var (ident "opt")) (Var (ident "x")),[]) [(Var (ident "x"),[])] False,Production (App (Var (ident "opt")) (Var (ident "x")),[]) [],Production (App (Var (ident "opt")) (Var (ident "x")),[]) [(Copy,Nonterm (Var (ident "x"),[]))],TypeSig (App (Var (ident "opt")) (Var (ident "x")),[[Conid "Maybe",White " ",Varid "a"]]) [(Var (ident "x"),[[Varid "a"]])] False,Production (App (Var (ident "opt")) (Var (ident "x")),[[Conid "Nothing"]]) [],Production (App (Var (ident "opt")) (Var (ident "x")),[[Conid "Just",White " ",Varid "a"]]) [(Copy,Nonterm (Var (ident "x"),[[Varid "a"]]))],TypeSig (App (Var (ident "many")) (Var (ident "x")),[]) [(Var (ident "x"),[])] False,Production (App (Var (ident "many")) (Var (ident "x")),[]) [],Production (App (Var (ident "many")) (Var (ident "x")),[]) [(Copy,Nonterm (App (Var (ident "many")) (Var (ident "x")),[])),(Copy,Nonterm (Var (ident "x"),[]))],TypeSig (App (Var (ident "many1")) (Var (ident "x")),[]) [(Var (ident "x"),[])] False,Production (App (Var (ident "many1")) (Var (ident "x")),[]) [(Copy,Nonterm (Var (ident "x"),[])),(Copy,Nonterm (App (Var (ident "many")) (Var (ident "x")),[]))],TypeSig (App (Var (ident "many")) (Var (ident "x")),[[LeftBracket,Varid "a",RightBracket]]) [(Var (ident "x"),[[Varid "a"]])] False,Production (App (Var (ident "many")) (Var (ident "x")),[[Varid "s",White " ",LeftBracket,RightBracket]]) [(Copy,Nonterm (App (Var (ident "many'")) (Var (ident "x")),[[Varid "s"]]))],TypeSig (App (Var (ident "many'")) (Var (ident "x")),[[LeftBracket,Varid "a",RightBracket,White " ",Varsym "->",White " ",LeftBracket,Varid "a",RightBracket]]) [(Var (ident "x"),[[Varid "a"]])] False,Production (App (Var (ident "many'")) (Var (ident "x")),[[Varsym "\\",White " ",Varid "as",White " ",Varsym "->",White " ",Varid "as"]]) [],Production (App (Var (ident "many'")) (Var (ident "x")),[[Varsym "\\",White " ",Varid "as",White " ",Varsym "->",White " ",Varid "s",White " ",LeftParen,Varid "a",White " ",Consym ":",White " ",Varid "as",RightParen]]) [(Copy,Nonterm (App (Var (ident "many'")) (Var (ident "x")),[[Varid "s"]])),(Copy,Nonterm (Var (ident "x"),[[Varid "a"]]))],TypeSig (App (Var (ident "many1")) (Var (ident "x")),[[LeftBracket,Varid "a",RightBracket]]) [(Var (ident "x"),[[Varid "a"]])] False,Production (App (Var (ident "many1")) (Var (ident "x")),[[Varid "a",White " ",Consym ":",White " ",Varid "as"]]) [(Copy,Nonterm (Var (ident "x"),[[Varid "a"]])),(Copy,Nonterm (App (Var (ident "many")) (Var (ident "x")),[[Varid "as"]]))],TypeSig (App (App (Var (ident "sepBy")) (Var (ident "x"))) (Var (ident "sep")),[]) [(Var (ident "x"),[]),(Var (ident "sep"),[])] False,Production (App (App (Var (ident "sepBy")) (Var (ident "x"))) (Var (ident "sep")),[]) [],Production (App (App (Var (ident "sepBy")) (Var (ident "x"))) (Var (ident "sep")),[]) [(Copy,Nonterm (App (App (Var (ident "sepBy1")) (Var (ident "x"))) (Var (ident "sep")),[]))],TypeSig (App (App (Var (ident "sepBy1")) (Var (ident "x"))) (Var (ident "sep")),[]) [(Var (ident "x"),[]),(Var (ident "sep"),[])] False,Production (App (App (Var (ident "sepBy1")) (Var (ident "x"))) (Var (ident "sep")),[]) [(Copy,Nonterm (Var (ident "x"),[]))],Production (App (App (Var (ident "sepBy1")) (Var (ident "x"))) (Var (ident "sep")),[]) [(Copy,Nonterm (App (App (Var (ident "sepBy1")) (Var (ident "x"))) (Var (ident "sep")),[])),(Copy,Nonterm (Var (ident "sep"),[])),(Copy,Nonterm (Var (ident "x"),[]))],TypeSig (App (App (Var (ident "sepBy")) (Var (ident "x"))) (Var (ident "sep")),[[LeftBracket,Varid "a",RightBracket]]) [(Var (ident "x"),[[Varid "a"]]),(Var (ident "sep"),[])] False,Production (App (App (Var (ident "sepBy")) (Var (ident "x"))) (Var (ident "sep")),[[LeftBracket,RightBracket]]) [],Production (App (App (Var (ident "sepBy")) (Var (ident "x"))) (Var (ident "sep")),[[Varid "as"]]) [(Copy,Nonterm (App (App (Var (ident "sepBy1")) (Var (ident "x"))) (Var (ident "sep")),[[Varid "as"]]))],TypeSig (App (App (Var (ident "sepBy1")) (Var (ident "x"))) (Var (ident "sep")),[[LeftBracket,Varid "a",RightBracket]]) [(Var (ident "x"),[[Varid "a"]]),(Var (ident "sep"),[])] False,Production (App (App (Var (ident "sepBy1")) (Var (ident "x"))) (Var (ident "sep")),[[Varid "s",White " ",LeftBracket,RightBracket]]) [(Copy,Nonterm (App (App (Var (ident "sepBy1'")) (Var (ident "x"))) (Var (ident "sep")),[[Varid "s"]]))],TypeSig (App (App (Var (ident "sepBy1'")) (Var (ident "x"))) (Var (ident "sep")),[[LeftBracket,Varid "a",RightBracket,White " ",Varsym "->",White " ",LeftBracket,Varid "a",RightBracket]]) [(Var (ident "x"),[[Varid "a"]]),(Var (ident "sep"),[])] False,Production (App (App (Var (ident "sepBy1'")) (Var (ident "x"))) (Var (ident "sep")),[[Varsym "\\",White " ",Varid "as",White " ",Varsym "->",White " ",Varid "a",White " ",Consym ":",White " ",Varid "as"]]) [(Copy,Nonterm (Var (ident "x"),[[Varid "a"]]))],Production (App (App (Var (ident "sepBy1'")) (Var (ident "x"))) (Var (ident "sep")),[[Varsym "\\",White " ",Varid "as",White " ",Varsym "->",White " ",Varid "s",White " ",LeftParen,Varid "a",White " ",Consym ":",White " ",Varid "as",RightParen]]) [(Copy,Nonterm (App (App (Var (ident "sepBy1'")) (Var (ident "x"))) (Var (ident "sep")),[[Varid "s"]])),(Copy,Nonterm (Var (ident "sep"),[])),(Copy,Nonterm (Var (ident "x"),[[Varid "a"]]))],TypeSig (App (App (Var (ident "optSepBy")) (Var (ident "x"))) (Var (ident "sep")),[]) [(Var (ident "x"),[]),(Var (ident "sep"),[])] False,Production (App (App (Var (ident "optSepBy")) (Var (ident "x"))) (Var (ident "sep")),[]) [],Production (App (App (Var (ident "optSepBy")) (Var (ident "x"))) (Var (ident "sep")),[]) [(Copy,Nonterm (Var (ident "x"),[]))],Production (App (App (Var (ident "optSepBy")) (Var (ident "x"))) (Var (ident "sep")),[]) [(Copy,Nonterm (App (App (Var (ident "optSepBy")) (Var (ident "x"))) (Var (ident "sep")),[])),(Copy,Nonterm (Var (ident "sep"),[]))],Production (App (App (Var (ident "optSepBy")) (Var (ident "x"))) (Var (ident "sep")),[]) [(Copy,Nonterm (App (App (Var (ident "optSepBy")) (Var (ident "x"))) (Var (ident "sep")),[])),(Copy,Nonterm (Var (ident "sep"),[])),(Copy,Nonterm (Var (ident "x"),[]))],TypeSig (App (App (Var (ident "optSepBy")) (Var (ident "x"))) (Var (ident "sep")),[[LeftBracket,Varid "a",RightBracket]]) [(Var (ident "x"),[[Varid "a"]]),(Var (ident "sep"),[])] False,Production (App (App (Var (ident "optSepBy")) (Var (ident "x"))) (Var (ident "sep")),[[Varid "s",White " ",LeftBracket,RightBracket]]) [(Copy,Nonterm (App (App (Var (ident "optSepBy'")) (Var (ident "x"))) (Var (ident "sep")),[[Varid "s"]]))],TypeSig (App (App (Var (ident "optSepBy'")) (Var (ident "x"))) (Var (ident "sep")),[[LeftBracket,Varid "a",RightBracket,White " ",Varsym "->",White " ",LeftBracket,Varid "a",RightBracket]]) [(Var (ident "x"),[[Varid "a"]]),(Var (ident "sep"),[])] False,Production (App (App (Var (ident "optSepBy'")) (Var (ident "x"))) (Var (ident "sep")),[[Varsym "\\",White " ",Varid "as",White " ",Varsym "->",White " ",Varid "as"]]) [],Production (App (App (Var (ident "optSepBy'")) (Var (ident "x"))) (Var (ident "sep")),[[Varsym "\\",White " ",Varid "as",White " ",Varsym "->",White " ",Varid "a",White " ",Consym ":",White " ",Varid "as"]]) [(Copy,Nonterm (Var (ident "x"),[[Varid "a"]]))],Production (App (App (Var (ident "optSepBy'")) (Var (ident "x"))) (Var (ident "sep")),[[Varsym "\\",White " ",Varid "as",White " ",Varsym "->",White " ",Varid "s",White " ",Varid "as"]]) [(Copy,Nonterm (App (App (Var (ident "optSepBy'")) (Var (ident "x"))) (Var (ident "sep")),[[Varid "s"]])),(Copy,Nonterm (Var (ident "sep"),[]))],Production (App (App (Var (ident "optSepBy'")) (Var (ident "x"))) (Var (ident "sep")),[[Varsym "\\",White " ",Varid "as",White " ",Varsym "->",White " ",Varid "s",White " ",LeftParen,Varid "a",White " ",Consym ":",White " ",Varid "as",RightParen]]) [(Copy,Nonterm (App (App (Var (ident "optSepBy'")) (Var (ident "x"))) (Var (ident "sep")),[[Varid "s"]])),(Copy,Nonterm (Var (ident "sep"),[])),(Copy,Nonterm (Var (ident "x"),[[Varid "a"]]))]]