This file contains hidden or 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 FlexibleInstances #-} | |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE LambdaCase #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| module Test.Syd.Scratchpad where | |
| import Control.Concurrent.STM | |
| import Control.Exception |
This file contains hidden or 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 LambdaCase #-} | |
| module Main where | |
| import Data.List | |
| import System.Environment (getArgs, getProgName) | |
| import System.Exit (exitFailure) | |
| import Prelude | |
| main :: IO () |
This file contains hidden or 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
| import Control.Monad | |
| import Data.List | |
| import Data.Ord | |
| import Text.Printf | |
This file contains hidden or 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
| import Control.Monad | |
| import Data.List | |
| import Data.Ord | |
| import Text.Printf | |
| men = | |
| [ (3, 3), | |
| (1, 3), | |
| (3, 3), | |
| (3, 3), |
This file contains hidden or 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
| -- V a b == a ± b | |
| -- | |
| -- For example: | |
| -- V 100 2 = 100 mm ± 2mm | |
| data V = V | |
| { -- Middle value | |
| value :: Double, | |
| -- Must be positive | |
| tollerance :: Double | |
| } |
This file contains hidden or 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
| selectUnValued :: (MonadIO m, UnValueAll a a', SqlSelect (SqlExpr a) a) => SqlQuery (SqlExpr a) -> SqlPersistT m [a'] | |
| selectUnValued = fmap (map unValueAll) . select | |
| unValueAll :: (UnValueAll a a') => a -> a' | |
| unValueAll = unV | |
| class UnValueAll a b where | |
| unV :: a -> b | |
| instance UnValueAll (Value a) a where |
OlderNewer