Skip to content
Snippets Groups Projects

WIP: WEB!

14 files
+ 1244
8
Compare changes
  • Side-by-side
  • Inline

Files

+ 3
6
@@ -37,7 +37,6 @@ import Copar.Coalgebra.Parser
import Copar.Parser.Types
import qualified Copar.Parser.Lexer as L
import Copar.Functors
import Copar.Functors.SomeFunctor ( SomeFunctor )
import Copar.FunctorExpression.Desorting
import Copar.FunctorExpression.Type
import Copar.FunctorDescription
@@ -51,8 +50,8 @@ functorExpressionParser
=> FunctorExpression f Precedence
-> [[FunctorParser f]]
-> Parser (FunctorExpression f Sort)
functorExpressionParser varReplacement functors = do
((annotateSorts . replaceVar) <$> functorsParser (concat functors))
functorExpressionParser varReplacement functors =
annotateSorts . replaceVar <$> functorsParser (concat functors)
where
replaceVar Variable = varReplacement
replaceVar other = other
@@ -217,6 +216,4 @@ readStdin
, (SymbolTable, Encoding (Label TheFunctor) (F1 TheFunctor))
)
)
readStdin config = do
content <- T.getContents
return $ parseCoalgebra config "(stdin)" content
readStdin config = parseCoalgebra config "(stdin)" <$> T.getContents
Loading