-
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.
- Loading branch information
Showing
5 changed files
with
40 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,22 @@ | ||
{-# LANGUAGE LinearTypes, UnicodeSyntax, BlockArguments #-} | ||
module Main where | ||
|
||
|
||
{- Examples from the thesis -} | ||
|
||
{- Lets -} | ||
|
||
f1 :: (a ⊸ b) -> a ⊸ b | ||
f1 use x = let y = use x in y | ||
|
||
{- Recursive lets -} | ||
|
||
{- Cases -} | ||
|
||
|
||
-- ROMES:TODO: I have to invoke the linear core plugin directly with the | ||
-- examples, since otherwise compiling Haskell with type errors is not | ||
-- possible, and `-fdefer-type-errors` makes the program useless, only having | ||
-- runtime type errors... | ||
main :: IO () | ||
main = putStrLn "Hello, Haskell!" |
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,10 @@ | ||
{-# LANGUAGE LinearTypes #-} | ||
module Bug where | ||
|
||
-- f :: a -> b | ||
-- f x = x | ||
|
||
f1 :: (a %1 -> b) -> a %1 -> b | ||
f1 use x = let y = use x in y | ||
|
||
|
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