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
{-# LANGUAGE DataKinds, GADTs, DeriveGeneric #-} | |
import GHC.Generics | |
data T a where | |
MkT1 :: T True | |
MkT2 :: T False | |
data T2 = T2 (T False) | |
deriving Generic |
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
// core | |
#include <QObject> | |
#include <QTimer> | |
#include <QDebug> | |
// network | |
#include <QLocalSocket> | |
#include <QLocalServer> | |
// widgets |
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
module Control.Monad.Step | |
( Step | |
, MonadStep(..) | |
, mapStep | |
, mapStep_ | |
, runStepWithMask | |
, runStep | |
, evalScriptWithMask | |
, evalScript ) | |
where |
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
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE PatternSynonyms #-} | |
{-# LANGUAGE MagicHash #-} | |
{-# LANGUAGE UnboxedTuples #-} | |
module Control.Monad.Exception | |
( Exception(..) | |
, SomeException( SomeException ) | |
, StackInfo(..) | |
, throw |
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
data Linker = Emplty | Dash | Equal | Octothrope | |
deriving (Eq, Ord, Show) | |
data Polygon edge vertex | |
= Polygon !vertex !edge !(Polygon edge vertex) | |
| Line !vertex !edge !vertex | |
deriving (Eq, Ord, Show, Functor, Foldable, Traversable) | |
data SignumForm = Prefix | Postfix | Binary | |
deriving (Eq, Ord, Show) |
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
main :: IO () | |
main = do | |
tid1 <- forkIO $ magicMask $ do | |
localTid <- myThread | |
tid2 <- forkIO $ do | |
threadDelay (42 * 42) | |
killThread localTid | |
forever $ threadDelay 777 | |
tid3 <- forkIO $ do |
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
{-# LANGUAGE Rank2Types #-} | |
module Managed where | |
-- base | |
import Data.IORef | |
-- exceptions | |
import Control.Monad.Catch |
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
-- base | |
import Control.Applicative | |
import Control.Monad | |
import Data.Maybe | |
import Data.Word | |
import Data.Proxy | |
import GHC.TypeLits |
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
module CoCoCoOutput where | |
import Control.Exception | |
import Control.Concurrent.Async | |
import Control.Concurrent.Chan | |
import Control.Monad | |
import Data.Function |
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
{-# LANGUAGE ExistentialQuantification #-} | |
-- base | |
import Control.Exception | |
import Control.Concurrent.MVar | |
import Control.Monad | |
import Data.IORef | |
import System.IO.Unsafe |