p
Size: a a a
p
p
bar = hello
where
hello = 10
[1/1 MissingTypeDeclaration] src/Main.purs:15:1
v
15 bar = hello
16 where
17 hello = 10
^
No type declaration was provided for the top-level declaration of bar.
It is good practice to provide type declarations as a form of documentation.
The inferred type of bar was:
Int
in value declaration bar
p
ЗП
ЗП
mergeRight :: SplitArray ~> SplitArrayтак не работает
mergeRight xs =
case uncons xs of
Nothing -> []
Just {head: Text c, tail} -> let (Tuple d lTail) = go tail in Text (c <> d) : mergeRight lTail
Just r -> r.head : mergeRight r.tail
where
go tail = case uncons tail of
Just { head: Delim d', tail: tail' } -> Tuple d' tail'
_ -> Tuple [] tail
ЗП
mergeRight :: SplitArray ~> SplitArray
mergeRight xs =
let
go tail = case uncons tail of
Just { head: Delim d', tail: tail' } -> Tuple d' tail'
_ -> Tuple [] tail
in
case uncons xs of
Nothing -> []
Just {head: Text c, tail} -> let (Tuple d lTail) = go tail in Text (c <> d) : mergeRight lTail
Just r -> r.head : mergeRight r.tail
p
p
mergeRight :: SplitArray ~> SplitArray
mergeRight xs =
case uncons xs of
Nothing -> []
Just {head: Text c, tail} -> let (Tuple d lTail) = go tail in Text (c <> d) : mergeRight lTail
Just r -> r.head : mergeRight r.tail
where
go tail = case uncons tail of
Just { head: Delim d', tail: tail' } -> Tuple d' tail'
_ -> Tuple [] tail
VY
SplitArray ~> SplitArray
p
SplitArray ~> SplitArray
VY
p
forall a . SplitArray a -> SplitArray aЗП
mergeRight :: SplitArray ~> SplitArray
mergeRight xs =
case uncons xs of
Nothing -> []
Just {head: Text c, tail} -> let (Tuple d lTail) = go tail in Text (c <> d) : mergeRight lTail
where
go tail = case uncons tail of
Just { head: Delim d', tail: tail' } -> Tuple d' tail'
_ -> Tuple [] tail
Just r -> r.head : mergeRight r.tail
ЗП
where на уровне casemergeRight :: SplitArray ~> SplitArray
mergeRight xs =
case uncons xs of
Nothing -> []
Just {head: Text c, tail} -> let (Tuple d lTail) = go tail in Text (c <> d) : mergeRight lTail
Just r -> r.head : mergeRight r.tail
where
go tail = case uncons tail of
Just { head: Delim d', tail: tail' } -> Tuple d' tail'
_ -> Tuple [] tail
p
where на уровне case, Ну да я об этом и написалp
[1/1 MissingTypeDeclaration] src/Main.purs:15:1
v
15 foo =
16 case a of
17 10 -> "Hello"
18 _ -> show a
19 where
20 a = 13
^
No type declaration was provided for the top-level declaration of foo.
It is good practice to provide type declarations as a form of documentation.
The inferred type of foo was:
String
in value declaration foo
VY
forall a . SplitArray a -> SplitArray aA ~> BЗП
where больше нельзя использовать в паттерн гардах