Skip to content

Commit

Permalink
compiler: further simplify #22 example
Browse files Browse the repository at this point in the history
  • Loading branch information
Zilin Chen authored and Zilin Chen committed Mar 6, 2018
1 parent 620847a commit fe84554
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cogent/tests/pass_ext2-mount.cogent
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type FsState = {
}

malloc_FsState: () -> Result (FsState take (..)) ()
deserialise_Ext2Superblock: () -> Result (Ext2Superblock, U32) ()
deserialise_Ext2Superblock: () -> Result Ext2Superblock ()

wordarray_create : all (a :< DS). () -> Result (WordArray a) ()

Expand All @@ -32,12 +32,13 @@ fs_mount _ =

and state_t = state_t { superblock_num = sb_num }
in deserialise_Ext2Superblock ()
| Success (super, _) ->
| Success super ->
wordarray_create ()
| Success prealloc_offsets =>
let state = state_t {
super,
flags,
-- superblock_num = sb_num,
prealloc_offsets = Some prealloc_offsets
}
in Success state
Expand Down

0 comments on commit fe84554

Please sign in to comment.