-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Use `llvm-codegen` - Use LLVM 17 - Use GHC 9.4.8 - Use cabal 3.8 - Add build requirements to README - Update actions
- Loading branch information
1 parent
7f9ae50
commit 484ac57
Showing
26 changed files
with
567 additions
and
664 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,15 @@ | ||
{-# LANGUAGE LambdaCase #-} | ||
{-# LANGUAGE NumericUnderscores #-} | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
module Utils where | ||
|
||
import CodeGen.TimedValue (Nanoseconds (..)) | ||
import Configuration.AppConfiguration (Input (..)) | ||
import Data.Text (Text) | ||
import qualified Data.Text as Txt | ||
import System.FilePath (takeBaseName) | ||
|
||
readText :: Input -> IO Text | ||
readText (FileInput path) = Txt.pack <$> readFile path | ||
readText StdInput = Txt.pack <$> getContents | ||
|
||
inputToModuleName :: Input -> Text | ||
inputToModuleName = \case | ||
StdInput -> "unnamed" | ||
FileInput filePath -> Txt.pack $ takeBaseName filePath | ||
|
||
ns2s :: Nanoseconds -> Double | ||
ns2s ns = let Nanoseconds ns' = ns in fromInteger ns' / 1_000_000_000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source-repository-package | ||
type: git | ||
location: https://github.com/luc-tielen/llvm-codegen.git | ||
tag: 83b04cb576208ea74ddd62016e4fa03f0df138ac | ||
|
||
packages: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.