Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ compat ] Resolve build errors #11

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Crypto/Random/JS.idr
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public export
HasIO io => MonadRandom io where
random_bytes Z = pure []
random_bytes n =
case codegen of
"node" => buffer_content prim_io__randomBytes n
"javascript" => buffer_content prim_io__getRandomValues n
_ => assert_total $ idris_crash "no random backend availible"
case codegen of
"node" => buffer_content prim_io__randomBytes n
"javascript" => buffer_content prim_io__getRandomValues n
_ => assert_total $ idris_crash "no random backend availible"
2 changes: 1 addition & 1 deletion src/Network/TLS/Parsing.idr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Parserializer
encode : a -> List c
decode : Parser i e a

infixr 5 <*>>
export infixr 5 <*>>

export
apair : (Semigroup e, Monoid i) => Parserializer c i e a -> Parserializer c i e b -> Parserializer c i e (a, b)
Expand Down
4 changes: 2 additions & 2 deletions src/Utils/Bytes.idr
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ shiftR' x i = maybe_a_a zeroBits $ do
export
rotl : FiniteBits a => {n : Nat} -> {auto prf : ((S n) = bitSize {a})} -> Fin (S n) -> a -> a
rotl FZ x = x
rotl (FS i) x = (shiftL x $ bitsToIndex (coerce prf $ FS i)) .|. (shiftR x $ bitsToIndex $ invFin $ coerce prf $ weaken i)
rotl (FS i) x = (shiftL x $ bitsToIndex (coerce prf $ FS i)) .|. (shiftR x $ bitsToIndex $ complement $ coerce prf $ weaken i)

export
rotr : FiniteBits a => {n : Nat} -> {auto prf : ((S n) = bitSize {a})} -> Fin (S n) -> a -> a
rotr FZ x = x
rotr (FS i) x = (shiftR x $ bitsToIndex (coerce prf $ FS i)) .|. (shiftL x $ bitsToIndex $ invFin $ coerce prf $ weaken i)
rotr (FS i) x = (shiftR x $ bitsToIndex (coerce prf $ FS i)) .|. (shiftL x $ bitsToIndex $ complement $ coerce prf $ weaken i)
Loading