CurryInfo: curry-interface-2.0.1 / CurryInterface.Parser.classDecl

definition:
classDecl :: Parser IDecl
classDecl = tokenClass *!*> (case1 <|> case2) <*?*> (tokenCurlyBracketL *!*> parseList tokenSemicolon methodDecl <*?* tokenCurlyBracketR) <*?*> hiddenPragma
 where
  case1 :: Parser ([IMethodDecl] -> [Ident] -> IDecl)
  case1 = (tokenParenL *> qualIdent <* skipSomeWs) *>= f
  case2 :: Parser ([IMethodDecl] -> [Ident] -> IDecl)
  case2 = (qualIdent <* skipSomeWs) *>= h
  f :: QualIdent -> Parser ([IMethodDecl] -> [Ident] -> IDecl)
  f qi =
      (IClassDecl [] qi <$> (Just <$> (tokenTyping *!*> kind <* tokenParenR)) <*!*> (map Ident <$> typeVariableListNE) <*!*> funDeps)
       <!>
      ((IClassDecl <$> (((:) <$> (Constraint qi . unwrapApply <$> typeExpr) <*> (tokenComma *!*> parseList tokenComma constraint)) <* tokenParenR <*!* tokenDoubleArrow <* skipSomeWs) *>=
           (flip withOptionalKind qualIdent)) <*!*> (map Ident <$> typeVariableListNE) <*!*> funDeps)
  h :: QualIdent -> Parser ([IMethodDecl] -> [Ident] -> IDecl)
  h qi = (((IClassDecl <$> (singleton . Constraint qi <$> typeExprs) <*!* tokenDoubleArrow <* skipSomeWs) *>=
           (flip withOptionalKind qualIdent)) <*?*> (map Ident <$> typeVariableListNE) <*!*> funDeps) 
          <!>
         (IClassDecl [] qi Nothing <$> (map Ident <$> typeVariableListNE) <*!*> funDeps)
demand:
no demanded arguments
deterministic:
deterministic operation
documentation:
--- A parser for a Class Declaration | class [Context =>] QualIdent [KindExpr] TypeVariable \{ MethodList \} [Pragma]
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{() |-> {<*>._#lambda10}}
name:
classDecl
precedence:
no precedence defined
result-values:
{<*>._#lambda10}
signature:
String -> [(CurryInterface.Types.IDecl, String)]
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term