Propagate type application, temporary remove nested pattern matching, fix void output
This commit is contained in:
parent
6260dc2c41
commit
c3bcdfa81b
4 changed files with 175 additions and 140 deletions
|
|
@ -1,4 +1,5 @@
|
|||
{-# LANGUAGE LambdaCase #-}
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
module Codegen.LlvmIr (
|
||||
LLVMType (..),
|
||||
|
|
@ -57,6 +58,7 @@ instance ToIr LLVMType where
|
|||
Ref ty -> toIr ty <> "*"
|
||||
Function t xs -> toIr t <> " (" <> intercalate ", " (map toIr xs) <> ")*"
|
||||
Array n ty -> concat ["[", show n, " x ", toIr ty, "]"]
|
||||
CustomType "void" -> "void"
|
||||
CustomType (Ident ty) -> "%" <> ty
|
||||
|
||||
data LLVMComp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue