removed trailing whitespace (#955)

This commit is contained in:
Stefan Hoeck 2021-01-21 12:33:03 +01:00 committed by GitHub
parent 68eecce0f4
commit fb08004041
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
82 changed files with 541 additions and 633 deletions

View File

@ -24,4 +24,3 @@ doSort (S k) = do let xs = sort $ randishInts 12000 $ natToInteger k
main : IO ()
main = do max <- getLine
doSort (integerToNat (cast max))

View File

@ -38,4 +38,3 @@ modifyIORef : HasIO io => IORef a -> (a -> a) -> io ()
modifyIORef ref f
= do val <- readIORef ref
writeIORef ref (f val)

View File

@ -32,4 +32,3 @@ public export %inline
setField : {s : _} -> Struct s fs -> (n : String) ->
{auto fieldok : FieldType n ty fs} -> ty -> IO ()
setField s n val = primIO (prim__setField s n fieldok val)

View File

@ -33,5 +33,3 @@ repl : HasIO io =>
(prompt : String) -> (onInput : String -> String) -> io ()
repl prompt fn
= replWith () prompt (\x, s => Just (fn s, ()))

View File

@ -18,4 +18,3 @@ public export
||| Right-to-left monadic bind, flipped version of `>>=`.
(=<<) : Monad m => (a -> m b) -> m a -> m b
(=<<) = flip (>>=)

View File

@ -170,4 +170,3 @@ lazyFilterRec pred (x :: xs) with (pred x)
rewrite appendAssociative (reverse revSkipped) [y] (z :: zs) in
rewrite sym (reverseOntoSpec [y] revSkipped) in
filterHelper (y :: revSkipped) (z :: zs)

View File

@ -380,4 +380,3 @@ DivisionTheoremUniqueness numer denom denom_nz q r x prf =
rewrite sym $ sndDivmodNatNZeqMod numer denom denom_nz denom_nz in
rewrite DivisionTheoremUniquenessDivMod numer denom denom_nz q r x prf in
(Refl, Refl)

View File

@ -14,4 +14,3 @@ multRightCancel (S a) 0 r@(S predr) r_nz ar_eq_br impossible
multRightCancel (S a) (S b) r@(S predr) r_nz ar_eq_br =
cong S $ multRightCancel a b r r_nz
$ plusLeftCancel r (a*r) (b*r) ar_eq_br

View File

@ -208,4 +208,3 @@ lexTo : (TokenData a -> Bool) ->
lexTo pred tmap str
= let (ts, (l, c, str')) = tokenise pred 0 0 [] tmap (fastUnpack str) in
(ts, (l, c, pack str'))

View File

@ -211,5 +211,3 @@ Ord a => Ord b => Ord (a, b) where
compare (x1, y1) (x2, y2)
= if x1 /= x2 then compare x1 x2
else compare y1 y2

View File

@ -25,4 +25,3 @@ infixr 9 .
infixr 0 $
infixl 9 `div`, `mod`

View File

@ -36,4 +36,3 @@ Uninhabited (True = False) where
public export
Uninhabited (False = True) where
uninhabited Refl impossible

View File

@ -52,6 +52,3 @@ main : IO ()
main = do putStr "Enter a number: "
x <- getLine
printLn (interp [] fact (cast x))

View File

@ -37,4 +37,3 @@ Show a => Show (Vect n a) where
show' Nil = ""
show' (x :: Nil) = show x
show' (x :: xs) = show x ++ ", " ++ show' xs

View File

@ -44,4 +44,3 @@ natToBin Z = Nil
natToBin k with (parity k)
natToBin (j + j) | Even = False :: natToBin j
natToBin (S (j + j)) | Odd = True :: natToBin j

View File

@ -14,4 +14,3 @@ plus_ind n m
(\k, k_rec => S k_rec) -- Inductive step plus_ind (S k) m
-- where k_rec = plus_ind k m
n

View File

@ -1,4 +1,2 @@
plus_commutes : (n, m : Nat) -> plus n m = plus m n
plus_assoc : (n, m, p : Nat) -> plus n (plus m p) = plus (plus n m) p

View File

@ -188,4 +188,3 @@ piBindNames loc env tm
piBind [] ty = ty
piBind (n :: ns) ty
= IPi loc erased Implicit (Just (UN n)) (Implicit loc False) (piBind ns ty)

View File

@ -45,4 +45,3 @@ checkDot rig elabinfo nest env fc reason tm (Just gexpty)
pure (metaval, gexpty)
_ => throw (GenericMsg fc ("Dot pattern not valid here (Not LHS) "
++ show tm))

View File

@ -27,4 +27,3 @@ checkPrim fc StringType = (PrimVal fc StringType, TType fc)
checkPrim fc CharType = (PrimVal fc CharType, TType fc)
checkPrim fc DoubleType = (PrimVal fc DoubleType, TType fc)
checkPrim fc WorldType = (PrimVal fc WorldType, TType fc)

View File

@ -49,4 +49,3 @@ fromOctChars = fromOctChars' 1
export
fromOct : String -> Maybe Int
fromOct = fromOctChars . unpack

View File

@ -61,4 +61,3 @@ main
-- | Left err => do putStrLn "Buffer read fail"
-- closeFile f
-- closeFile f

View File

@ -29,4 +29,3 @@ main = do printLn (foo Nat)
printLn (foo (List Int))
printLn (strangeId 42)
printLn (strangeId (the Int 42))

View File

@ -12,4 +12,3 @@ main = do Right () <- createDir "testdir"
printLn ok
writeFile "test.txt" "hello\n"
printLn !currentDir

View File

@ -40,4 +40,3 @@ main
printLn (the Bits16 (fromInteger (-1)))
printLn (the Bits32 (fromInteger (-1)))
printLn (the Bits64 (fromInteger (-1)))

View File

@ -46,4 +46,3 @@ mLetBind x y
= do let Just res = maybeAdd x y
| Nothing => Just Z
Just res

View File

@ -24,4 +24,3 @@ namespace Set
keepUnique : List b -> List b
keepUnique {b} xs = toList (fromList xs)

View File

@ -100,4 +100,3 @@ public export
data Dec : Type -> Type where
Yes : a -> Dec a
No : (a -> Void) -> Dec a

View File

@ -1,3 +1,2 @@
foo : Int -> Int -> Int
foo x x = x + x

View File

@ -32,4 +32,3 @@ foo = 3
bar : Fin 5
bar = 8

View File

@ -1,4 +1,3 @@
foo : (x : Nat) -> case x of
Z => Nat -> Nat
S k => Nat

View File

@ -46,4 +46,3 @@ mLetBind x y
= do let Just res = maybeAdd x y
| Nothing => Just Z
Just res

View File

@ -17,4 +17,3 @@ len : forall xs . Env xs -> Nat
-- neither of these are fine
len': Env xs -> Nat
append' : Vect n a -> Vect m a -> Vect (n + m) a

View File

@ -2,4 +2,3 @@ import Data.Vect
dvec : (n : Nat) -> {default (replicate n 1) xs : Vect n Nat} -> Nat
dvec n = foldr (+) Z xs

View File

@ -19,4 +19,3 @@ lookup (FS k) (x :: xs) = lookup k xs
zip : Vect n a -> Vect n b -> Vect n (a, b)
zip [] [] = []
zip (x :: xs) (y :: ys) = (x, y) :: zip xs ys

View File

@ -21,4 +21,3 @@ Eq Foo where
test2 : String
test2 = showIfEq MkFoo MkBar

View File

@ -8,5 +8,3 @@ main : IO ()
main = printLn $ T == T
%default covering

View File

@ -7,4 +7,3 @@ public export
plus : Nat -> Nat -> Nat
plus Z y = y
plus (S k) y = S (plus k y)

View File

@ -4,4 +4,3 @@ import Mult
thing : Nat -> Nat
thing x = mult x (plus x x)

View File

@ -7,4 +7,3 @@ public export
plus : Nat -> Nat -> Nat
plus Z y = y
plus (S k) y = S (plus k y)

View File

@ -4,4 +4,3 @@ import Mult
thing : Nat -> Nat
thing x = mult x (plus x x)

View File

@ -2,4 +2,3 @@ module A
public export
defA : Int -> Int

View File

@ -1,4 +1,3 @@
module B
import A

View File

@ -16,4 +16,3 @@ suc x y prf = ?quux
suc' : x = y -> S x = S y
suc' {x} {y} prf = ?quuz

View File

@ -9,4 +9,3 @@ append xs ys
= case xs of
[] => ?bar_3
(x :: zs) => ?bar_4

View File

@ -8,4 +8,3 @@ dupAll : Vect n a -> Vect n (a, a)
dupAll xs = zipHere xs xs
where
zipHere : forall n . Vect n a -> Vect n b -> Vect n (a, b)

View File

@ -110,4 +110,3 @@ public export
data Dec : Type -> Type where
Yes : a -> Dec a
No : (a -> Void) -> Dec a

View File

@ -18,4 +18,3 @@ Functor (Test c d) where
-- renamed)
Functor (Test a b) where
map = ?bar

View File

@ -17,4 +17,3 @@ interface BadFinite t where
implementation BadFinite (Fin k) where
badcard = k
badto = id

View File

@ -6,4 +6,3 @@ interface Foo m where
-- clash, so one has to be renamed.
Eq k => Foo (\s, t => List (s, t)) where
bar x y z = ?bang

View File

@ -4,4 +4,3 @@ interface Monad m => FooBar m where
Foo : {0 a : Type} -> a -> m a -> Type
Bar : {0 A : Type} -> m A -> Type
foo : {0 A : Type} -> (x : A) -> (ma : m A) -> Foo x ma -> Bar ma

View File

@ -5,4 +5,3 @@ interface Monad m => FooBar m where
Foo : {A : Type} -> A -> m A -> Type
bar : {A : Type} -> (ma : m A) -> m (DPair A (\ a => Foo a ma))
foobar : {A : Type} -> (ma : m A) -> map DPair.fst (bar ma) = ma

View File

@ -19,4 +19,3 @@ data Nat = Z | S Nat
take : Nat -> Stream a -> List a
take Z xs = Nil
take (S k) (x :: xs) = List.(::) x (take k xs)

View File

@ -41,4 +41,3 @@ doorProg
| Left d => deleteDoor d
d <- closeDoor d
deleteDoor d

View File

@ -40,4 +40,3 @@ doorProg
Right d' <- openDoor d
| Left d => deleteDoor d
?foo

View File

@ -45,4 +45,3 @@ holetest1 x y = plus ?this y
holetest2 : (1 x : Nat) -> (1 y : Nat) -> Nat
holetest2 x y = plus x ?that

View File

@ -11,4 +11,3 @@ baz = test foo -- fine!
bar : Nat
bar = test foo -- bad!

View File

@ -15,4 +15,3 @@ test bytes_list = do
let int9 = (index 12 bytes_list * 8) + (index 13 bytes_list * 4) + (index 14 bytes_list * 2) + (index 15 bytes_list)
let int10 = (index 12 bytes_list * 8) + (index 13 bytes_list * 4) + (index 14 bytes_list * 2) + (index 15 bytes_list)
pure int1

View File

@ -28,4 +28,3 @@ eqBigs = Refl
eqBigs' : bigEx' 800000 = bigEx' 800000
eqBigs' = Refl

View File

@ -27,4 +27,3 @@ testDVect = MkDVect 94 [1,2,3,4,5]
testPerson : Person
testPerson = MkPerson "Wowbagger" 1337 10 (\x => S x)

View File

@ -30,4 +30,3 @@ c = MkFlexiString "hello"
d : FlexiString {k = ASCII}
d = MkFlexiString ['h', 'i']

View File

@ -14,4 +14,3 @@ mfunc fn g (ma, mb)
func2 : (a -> c) -> (b -> d) -> a -> b -> (c, d)
func2 f g a b = MkPair (f a) (g b)

View File

@ -25,4 +25,3 @@ segfaults = Fix (Lam (Var (count 0)))
cycleDetected : {len : _} -> {ctx : Vect len Typ} ->
Term (TLam TNat TNat) ctx
cycleDetected = Fix (Var (count 0))

View File

@ -26,4 +26,3 @@ safeStrHead4 : (s : String) -> {pr : NonEmpty (unpack s)} -> Char
safeStrHead4 {pr=foo} s with (unpack s)
safeStrHead4 {pr=bar} s | [] = absurd bar
safeStrHead4 s | (c::_) = c

View File

@ -29,4 +29,3 @@ main = do printLn (foo Nat)
printLn (foo (List Int))
printLn (strangeId 42)
printLn (strangeId (the Int 42))

View File

@ -12,4 +12,3 @@ main = do Right () <- createDir "testdir"
printLn ok
writeFile "test.txt" "hello\n"
printLn !currentDir

View File

@ -40,4 +40,3 @@ main
printLn (the Bits16 (fromInteger (-1)))
printLn (the Bits32 (fromInteger (-1)))
printLn (the Bits64 (fromInteger (-1)))

View File

@ -2,5 +2,3 @@ module Main
main : IO ()
main = putStrLn ?greeting

View File

@ -5,4 +5,3 @@ import Partial
import Reverse
import AveMain
import Let_Where

View File

@ -5,4 +5,3 @@ import Vectors
import WordLength
import WordLength_vec
import XOR

View File

@ -3,4 +3,3 @@ printLength = putStr "Input string: " >>= \_ =>
getLine >>= \input =>
let len = length input in
putStrLn (show len)

View File

@ -11,5 +11,3 @@ checkEqNat (S k) Z = Nothing
checkEqNat (S k) (S j) = case checkEqNat k j of
Nothing => Nothing
Just eq => Just (sameS _ _ eq)

View File

@ -14,5 +14,3 @@ area : Shape -> Double
area (Triangle base height) = 0.5 * rectangle_area base height
area (Rectangle length height) = rectangle_area length height
area (Circle radius) = pi * radius * radius

View File

@ -26,5 +26,3 @@ area : Shape -> Double
area (Triangle base height) = 0.5 * rectangle_area base height
area (Rectangle length height) = rectangle_area length height
area (Circle radius) = pi * radius * radius

View File

@ -21,4 +21,3 @@ filterKeys test input with (storeView input)
= if test value
then key :: filterKeys test store | rec
else filterKeys test store | rec

View File

@ -24,5 +24,3 @@ data Command : Schema -> Type where
Add : SchemaType schema -> Command schema
Get : Integer -> Command schema
Quit : Command schema

View File

@ -7,4 +7,3 @@ record Album where
constructor MkAlbum
title : String
tracks : List String

View File

@ -3,4 +3,3 @@ import Control.Monad.State
increment : Nat -> State Nat ()
increment inc = do current <- get
put (current + inc)

View File

@ -21,4 +21,3 @@ treeLabelWith lbls (Node left val right)
treeLabel : Tree a -> Tree (Integer, a)
treeLabel tree = snd (treeLabelWith [1..] tree)

View File

@ -23,4 +23,3 @@ treeLabelWith (Node left val right)
treeLabel : Tree a -> Tree (Integer, a)
treeLabel tree = evalState [1..] (treeLabelWith tree)

View File

@ -57,4 +57,3 @@ treeLabelWith (Node left val right)
treeLabel : Tree a -> Tree (Integer, a)
treeLabel tree = fst (runState (treeLabelWith tree) [1..])