Skip to content

Commit

Permalink
ByteArray Core eval: filter type arguments from constructor arguments
Browse files Browse the repository at this point in the history
When we're evaluating `OpByteArrayFromListByte` we need to extract the
list of bytes from the nexted list constructors that are passed to the
Op. The polymorphic type of the list is passed in as the first argument
to the constructor, so we remove it.
  • Loading branch information
paulcadman committed Aug 8, 2024
1 parent fc1925c commit a35367c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Juvix/Compiler/Core/Evaluator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ geval opts herr tab env0 = eval' env0
nilTag <- builtinConstructorTag BuiltinListNil
if
| t == nilTag -> return []
| t == consTag -> case xs of
| t == consTag -> case (filter (not . isType') xs) of
(hd : tl) -> do
uint8Hd <- uint8FromNode hd
uint8Tl <- concatMapM listUInt8FromNode tl
Expand Down

0 comments on commit a35367c

Please sign in to comment.