Skip to content

Commit

Permalink
Fix example under GHC810
Browse files Browse the repository at this point in the history
  • Loading branch information
nc6 committed Apr 23, 2024
1 parent 3758b16 commit a851663
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bin/Main.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedRecordDot #-}
{-# LANGUAGE NoFieldSelectors #-}

module Main (main) where

Expand Down Expand Up @@ -131,8 +129,8 @@ run (Opts cmd cddlFile) = do
Left err -> putStrLnErr (show err) >> exitFailure
Right mt -> do
stdGen <- getStdGen
let term = generateCBORTerm mt (Name x.itemName) stdGen
in case x.outputFormat of
let term = generateCBORTerm mt (Name $ itemName x) stdGen
in case outputFormat x of
AsTerm -> print term
AsFlatTerm -> print $ toFlatTerm (encodeTerm term)
AsCBOR -> print . toStrictByteString $ encodeTerm term
Expand Down

0 comments on commit a851663

Please sign in to comment.