mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-15 04:11:34 +03:00
fix issue with literal type checking for strings
This commit is contained in:
parent
7ceedde7fd
commit
41954bb504
@ -126,9 +126,9 @@ verticalCells k ifEmpty ls = let cs = List.map (\l -> L.fill bg (L.pad 5 0 l)) (
|
||||
|
||||
explorerCells : k -> List (Layout k) -> Layout k
|
||||
explorerCells k ls =
|
||||
let last l = L.fill bg (L.pad' { left = 10, right = 5, top = 6, bottom = 8 } l)
|
||||
let last l = L.fill bg (L.pad' { left = 10, right = 10, top = 6, bottom = 8 } l)
|
||||
col = L.leftAlignedColumn ls
|
||||
fmt l = L.fill bg (L.pad' { left = 10, right = 5, top = 6, bottom = 6 } l)
|
||||
fmt l = L.fill bg (L.pad' { left = 10, right = 10, top = 6, bottom = 6 } l)
|
||||
cs = List.map fmt (List.take (List.length col - 1) col) ++
|
||||
List.map last (List.drop (List.length col - 1) col)
|
||||
in case cs of
|
||||
|
@ -70,7 +70,7 @@ checkLiteral : Literal -> T.Type -> Bool
|
||||
checkLiteral lit admissible = case (lit,admissible) of
|
||||
-- weird parser bug prevents use of T.Unit T.Distance as a pattern
|
||||
(Distance _, T.Unit d) -> d == T.Distance
|
||||
(Str _, T.Unit s) -> s == T.Distance
|
||||
(Str _, T.Unit s) -> s == T.String
|
||||
(Number _, T.Unit n) -> n == T.Number
|
||||
(_, T.Forall n (T.Universal n')) -> if n == n' then True else False
|
||||
_ -> False
|
||||
|
Loading…
Reference in New Issue
Block a user