Skip to content

Commit 0129efe

Browse files
Maksym ShamraiSergeyKuz1001
Maksym Shamrai
authored andcommitted
first fix
1 parent 2a6a114 commit 0129efe

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/CFG2TM.hs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{-# LANGUAGE TupleSections #-}
2+
{-# OPTIONS_GHC -Wno-incomplete-patterns #-}
23

34
module CFG2TM where
45

@@ -24,7 +25,7 @@ iSST = State "q_{1}^{2}"
2425
first :: [Relation] -> Symbol -> [String]
2526
first _ (T (Terminal t)) = [t]
2627
first rels Eps = concatMap (\(Relation (n, _)) -> follow rels (N n)) . filter (\(Relation (_, e : _)) -> e == Eps) $ rels
27-
first rels (N n) = concatMap (\(Relation (_, h : _)) -> first rels h) . filter (\(Relation (x, _)) -> x == n) $ rels
28+
first rels s@(N n) = concatMap (\(Relation (_, h : _)) -> first rels h) . filter (\(Relation (x, h : _)) -> x == n && h /= s) $ rels
2829

2930
follow :: [Relation] -> Symbol -> [String]
3031
follow rels n = concatMap (first rels)

stack.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# resolver: ./custom-snapshot.yaml
2020
# resolver: https://example.com/snapshots/2018-01-01.yaml
2121

22-
resolver: lts-18.9
22+
resolver: lts-18.5
2323

2424
# User packages to be built.
2525
# Various formats can be used as shown in the example below.

0 commit comments

Comments
 (0)